静态网格物体
A static mesh is an object that represents a collection of vertices, edges and triangular faces (organized in polygons) defining the object's geometry. The static mesh can be moved, rotated and scaled, but cannot be modified: vertices of the static mesh are immutable. 静态网格物体是一个对象,代表顶点,边和三角形面的集合(以多边形)定义对象的几何形状。静态网格物体可以移动,旋转和缩放,但不能修改:静态网格物体的顶点是不可变的。
Static meshes are usually used to add non-animated geometry: buildings, furniture, vehicles, and so on.静态网格物体通常用于添加非动画几何体:建筑物,家具,车辆等。
Static meshes consist of groups of polygons that are called surfaces. Each surface requires a separate draw call to the GPU. To render a surface, the material should be assigned to it. Each surface has 2 UV channels. Read more about surfaces and materials here.静态网格物体由称为 surfaces 的多边形组组成。每个表面都需要对GPU进行单独的绘制调用。要渲染表面,应为其指定材质。每个表面都有2个紫外线通道。在此处了解更多有关表面和材质的信息。
Static meshes are created in the third-party graphics programs (such as 3ds Max, Maya, etc.) and can be imported via UnigineEditor and converted to the UNIGINE native format (.mesh). In UNIGINE meshes have a float precision. That is why it is highly recommended to export meshes from third-party graphic programs near the origin and then place the mesh in UnigineEditor.静态网格物体是在第三方图形程序(例如3ds Max, Maya等)中创建的,可以通过UnigineEditor 导入并转换为UNIGINE原始格式(.mesh)。在UNIGINE中,网格具有浮点精度。这就是为什么强烈建议从靠近原点的第三方图形程序中导出网格,然后将其放置在UnigineEditor中的原因。
The mesh limitations set in UNIGINE:在UNIGINE中设置的网格限制:
Maximum number of vertices per mesh每个网格的最大顶点数 | 4294967295 |
Maximum number of surfaces per mesh每目最大表面数 | 32768 |
See Also也可以看看#
- The ObjectMeshStatic class to edit static meshes via API用于通过API编辑静态网格物体的ObjectMeshStatic类
- A set of samples located in the data/samples/objects/ folder: 位于data/samples/objects/文件夹中的一组样本:
Adding a Static Mesh添加静态网格物体#
To add a static mesh to the scene via UnigineEditor do the following:要通过UnigineEditor向场景中添加静态网格物体,请执行以下操作:
- Run UnigineEditor. 运行 UnigineEditor。
- On the Menu bar, click Create -> Mesh -> Static.
- In the dialog window that opens, choose the path to the .mesh file.在打开的对话框窗口中,选择.mesh文件的路径。
- Place the mesh somewhere in the world.将网格物体放置在世界上某个地方。