Unity3D基础教程3-2:网格(Meshes)

2014-08-11 21:07:58|?次阅读|上传:huigezrx【已有?条评论】发表评论

关键词:游戏, 虚拟现实, Unity3D|来源:唯设编程网

Material Generation 材料生成

Materials are found based on the following rules:

材料基于以下规则

◆  Unity gets the name of the main diffuse material bound to the objects in the scene.

◆  Unity获得主要绑定到对象的弥漫材料的名称在场景里。

◆  Unity looks for a material with this name in a Folder called Materials next to the scene.

◆  Unity寻找带有这个名称的材料在一个称为Materials文件夹里在场景附近。

◆  Unity goes up the project folders, looking for the Material in each Materials folder along the way.

◆  Unity到项目文件夹,寻找材料在每个材料文件夹沿着这个路。

If Unity can't find the Material, it tries to create one from the texture:

如果Unity不能发现材料,它将尝试从纹理建立一个:

Unity checks for a texture with the correct name in the same folder as the scene.

Unity检查一个正确名称的纹理在同样的文件夹里为一个场景。

Unity checks for a texture with the correct name in a folder called Textures next to the scene.

Unity检查一个带有正确名称的纹理在文件夹里称为Textures紧邻着场景。

Unity goes up the project folders, looking for the correct texture in each Textures folder along the way.

Unity到项目文件夹里,查找正确纹理在每个Textures的文件夹沿路线。

If Unity finds the texture, it creates a Materials folder next to it and creates a material in there.

如果Untiy找到纹理,它建立一个材料文件夹紧邻着它并在那里建立一个材料。

Colliders 碰撞器

Unity features two primary types of colliders: Mesh Colliders and Primitive Colliders. Mesh colliders are imported together with your geometry and are used for background objects. When you enable Generate Colliders in the Import Settings, a Mesh collider is automatically added when the mesh is added to the Scene. It has become solid as far as the physics system is concerned.

Unity配备两个主要类型碰撞器: 网格碰撞器和原始碰撞器 。 网格碰撞器被连同你的几何和为背景的对象一起被导入。 当启用生成碰撞器在导入设置时,一个网格碰撞器自动添加网格添加在网格添加到场景时 。 它已成为固体作为长久物理系统是关联的。

If you are moving the object around (a car for example), you can not use Mesh colliders. Instead, you will have to use Primitive colliders. In this case you should disable the Generate Colliders setting.

如果你是四处移动(例如汽车)的对象,你不能使用网格碰撞器。 相反,你将必须使用原始碰撞器。 在这种情况下你应该关闭生成碰撞器的设置。

Animations 动画

Animations are automatically imported from the scene. For more details about animation import options see Character Animation chapter.

从场景里,动画会自动导入。 有关动画导入选项的更多细节见角色动画的篇章。

Normal mapping and characters 法线映射和角色

If you have a character with a normal map that was generated from a high-polygon version of the model, you should import the game-quality version with a Smoothing angle of 180 degrees. This will prevent odd-looking seams in lighting due to tangent splitting. If the seams are still present with these settings, enable Split tangents across UV seams.

如果你有一个角色拥有法线映射,是由高面多边形模型版本生成的,你要引入一个拥有的平滑的180度角的游戏品质版本。 这将防止长相照明由于切线分裂接缝。 如果接缝仍 呈现这些设置,启用分割切线交叉UV裂缝。

If you are converting a greyscale image into a bumpmap, you don't need to worry about this.

如果你是转换成灰度图像到一个凸起映射(bumpmap)里,你不必为此担心。

Hints 提示

Merge your meshes together as much as possible. Make them share materials and textures. This has a huge performance benefit.

尽可能的归并你的网格在一起。 使它们共享的材料和纹理。 这是一个巨大的性能优势。

If you need to set up your objects further in Unity (adding physics, scripts or other coolness), save yourself a world of pain and name your objects properly in your 3D application. Working with lots of pCube17 or Box42-like objects is not fun.

如果你需要进一步设置你的对象在Unity里(添加加物理,脚本或其它冷色),保存你自己努力的世界和命名你的项目属性在你的3D应用程序中里。大量的pCube17或Box42类是对象工作不是开玩笑。

Make your meshes be centered on the world origin in your 3D app. This will make them easier to place in Unity.

让你的网格在 世界里中心原点对齐在你的3D应用里。 这将使它们更容易地放置在Unity里。

See Also参见

◆  Modeling Optimized Characters 角色优化模型

◆   How do I use bump maps? 如何使用撞击地图?

◆   How do I fix the rotation of an imported model? 如何解决一个引入模式的旋转?

<12>
发表评论0条 】
网友评论(共?条评论)..
Unity3D基础教程3-2:网格(Meshes)