This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
VR Development
双精度坐标
应用程序接口
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

3D模型要求

This article describes the recommended methods of importing 3D geometry (3D models) to UNIGINE by means of UnigineEditor.本文介绍了通过 UnigineEditor 将3D几何(3D模型)导入UNIGINE的推荐方法。

Geometry几何#

The FBX file format is recommended for working with 3D geometry. Export to .fbx is supported by the most popular 3D editors: Autodesk Maya, Autodesk 3ds Max, Blender, Modo, etc.建议使用 FBX 文件格式来处理3D几何。最受欢迎的3D编辑器支持导出到.fbx:Autodesk Maya,Autodesk 3ds Max,Blender,Modo等。

After importing the .fbx file into UNIGINE a so-called runtime file is generated in an internal MESH file format for the source file. The created .mesh file is saved to the data/.runtimes folder that is created in the same directory as the source .fbx file in the data root folder.导入后,将.fbx文件导入UNIGINE,以内部 MESH runtime文件格式生成所谓的 文件源文件。创建的.mesh文件保存到data/.runtimes文件夹,该文件夹与data根文件夹中的源.fbx文件位于同一目录中。

In terms of UnigineEditor, the imported file becomes an Asset, a "unit of work" that is useful in world building. After adding to the virtual world, geometry of the asset (same as any object in the scene) becomes the node and can be seen in the World Hierarchy window. Any material, assigned to this geometry, becomes the single surface of this node (surfaces can be found in the Surfaces section on the Node tab of the Parameters window). 用UnigineEditor来说,导入的文件成为资源,这是一个“工作单元”,在构建世界时很有用。添加到虚拟世界后,资源的几何形状(与场景中的任何对象相同)将成为节点,并且可以在 World Hierarchy 窗口中看到。分配给该几何体的任何材质都将成为该节点的单个 surface (可以在 Node 选项卡的 Surfaces 部分中找到表面。 Parameters 窗口)。

The mesh limitations set in UNIGINE:在UNIGINE中设置的网格限制:

Maximum number of vertices per mesh每个网格的最大顶点 4294967295
Maximum number of surfaces per mesh每目最大表面 32768

For example, in the 3D editor we have the car model consisting of five parts (the frame and four wheels). Two materials (car paint and glass) are assigned to the frame, one material (rubber) is assigned to each wheel. After exporting the model to .fbx and then importing to UNIGINE, five .mesh files will be created (according to the amount of car parts in the 3D editor):例如,在3D编辑器中,我们具有由五个部分(框架和四个轮子)组成的汽车模型。两种材质(汽车漆和玻璃)被分配给框架,一种材质(橡胶)被分配给每个车轮。将模型导出到.fbx然后导入到UNIGINE之后,将创建五个.mesh文件(根据3D编辑器中汽车零件的数量):

  • Each of the four wheels will have one surface, as one material has been assigned.由于分配了一种材质,所以四个轮子中的每个轮子都会有一个表面。
  • The frame will have two surfaces (as two materials have been assigned).框架将具有两个表面(因为已经分配了两种材质)。
  • The names of the surfaces will correspond to the names of materials, assigned in the 3D editor.曲面的名称将与3D编辑器中分配的材质名称相对应。
  • UNIGINE materials will be created automatically on the .fbx file import; their names will also correspond to the names of the 3D editor materials.UNIGINE 材质将在导入.fbx文件时自动创建;它们的名称也将与3D编辑器材质的名称相对应。

Texture Coordinates纹理坐标#

UNIGINE supports two UV channels for geometry. To specify whether to use 1st or 2nd channel use materials settings. For example, you can use the 1st channel for tiling, and the 2nd channel for the light map.UNIGINE支持两个UV通道用于几何图形。要指定使用第一通道还是第二通道,请使用材质设置。例如,您可以将第一个通道用于平铺,将第二个通道用于光照贴图。

Level of Details详细程度#

If you want to create several variations of one object with different levels of detail (LOD), it is recommended to create them as separate surfaces. This will allow you to reduce the amount of nodes in the hierarchy and simplify the settings of the LODs visibility. The amount of polygons in the neighbouring LODs should differ at least 2-3 times. The recommended amount of LODs is 2 or 3 (more LODs will cause big CPU load).如果要为一个对象创建具有不同细节级别(LOD)的多个变体,建议将它们创建为单独的曲面。这将允许您减少层次结构中的节点数量,并简化LOD可见性的设置。相邻LOD中的多边形数量应相差至少2-3倍。建议的LOD数量为2或3(更多的LOD将导致较大的CPU负载)。

To import LODs (different objects) to UNIGINE as different surfaces of one node, choose the Merge static meshes option on FBX import.要将LOD(不同对象)作为一个节点的不同曲面导入UNIGINE,请在FBX导入中选择 合并静态网格物体 选项。

Textures贴图#

UNIGINE supports the most popular bitmap texture formats: .png, .jpg, .tiff, .dds, .tga, .rgb, .rgba, .psd, .hdr, .pgm, .ppm, .sgi with support for: UNIGINE支持最流行的位图纹理格式:.png.jpg.tiff.dds.tga.rgb.rgba.psd.hdr.pgm.ppm.sgi,并支持:

  • 8, 16 and 32 bit precision per channel每个通道 8 16 32 位精度
  • Alpha channel阿尔法通道
  • Baked MIP-levels烘焙的MIP级别

You can import texture of any type listed above: the runtime .dds file will be generated (if necessary) automatically.您可以导入纹理以上列出的任何类型:运行时.dds文件将自动生成(如有必要)。

Texture resolution should be power of two, for example: 128×128, 256×256, 512×512, 1024×1024, 2048×2048, etc. Both square and rectangular textures are supported (for example, 256×1024 pixels).纹理分辨率应为2的幂,例如: 128×128 256×256 512×512 1024×1024 2048×2048 等。同时支持正方形和矩形纹理(例如, 256×1024 像素)。

Texture resolution should not exceed 16384×16384.纹理分辨率不应超过 16384×16384

The texture postfix is important as it defines the compression algorithms and used color channels. For example, the postfix _alb is for albedo textures, _n and _nrgb for normal textures, etc. The full list of postfixes is available here.纹理后缀很重要,因为它定义了压缩算法和使用的颜色通道。例如,后缀 _alb 用于反照率纹理, _n _nrgb 用于 normal 纹理等。完整的后缀列表可在此处获得。

Animation动画#

UNIGINE supports skinned mesh animation (3D model vertices have corresponding bones and their weights). The animated 3D model can be stored in two ways: UNIGINE支持蒙皮网格动画(3D模型顶点具有相应的骨骼及其权重)。动画3D模型可以两种方式存储:

  • In a single .mesh file containing both geometry and animation. This variant is usually used for simple objects (for example, lift doors).在包含几何和动画的单个 .mesh 文件中。此变体通常用于简单的物体(例如,电梯门)。
  • In separate files: .mesh (containing only geometry) and .anim (containing bones and their weights). Separate files are usually used for complex objects with a number of animation (for example, characters).在单独的文件中: .mesh (仅包含几何图形)和 .anim (包含骨骼及其重量)。单独的文件通常用于具有许多动画(例如,字符)的复杂对象。

To export animation to .fbx from 3D editor choose Animation and Bake Animation and specify which frames should be exported. When importing the animated .fbx file to UNIGINE, separate .mesh (containing geometry) and .anim (containing animation) files will be created.要将动画从3D编辑器导出到 .fbx ,请选择 Animation Bake Animation 并指定应导出的帧。将动画的 .fbx 文件导入UNIGINE时,将创建单独的 .mesh (包含几何图形)和 .anim (包含动画)文件。

The limitations set in UNIGINE:在UNIGINE中设置的网格限制:

Maximum amount of weights per vertex每个顶点的最大权重 4
Maximum amount of bones per surface每个表面的最大 128
Maximum number of active morph targets per surface每个表面的最大活动的变形目标 7 for DX11 and OpenGL; unlimited for DX12 and Vulkan (100 is set by default)7为DX11和OpenGL;DX12和Vulkan无限制(100是默认设置)

Names名字#

For file and surface names it is recommended to use English, low case, without spaces.对于文件名和表面名,建议使用英文,小写字母,无空格。

最新更新: 2023-12-19
Build: ()