CAD导入指南
CAD assets are imported into UNIGINE as any other asset. The following CAD formats are supported:CAD资源以下列方式导入UNIGINE:任何其他资源。支持以下CAD格式:
- IGES
- STEP
- STL
- BREP
Importing CAD Asset导入CAD资源#
When you import a CAD asset, the import settings window appears:导入CAD资源时,将显示导入设置窗口:
The list of available import options includes the following:可用的导入选项列表包括以下内容:
Mesh Import Options网格导入选项#
Import Meshes | Import geometry meshes from the file.从文件导入几何体网格。 |
---|---|
Merge Static Meshes | Merges all children static meshes in one (names it after the parent mesh). All of the meshes surfaces will be copied and shown in the Surfaces hierarchy.将所有子静态网格物体合并为一个(以父网格物体命名)。所有的网格表面将被复制并显示在Surfaces层次结构中。 |
Merge Surfaces by Materials | Enables merging surfaces that have the same materials.启用具有相同材质的合并曲面。 |
Split by Grid |
Enables splitting of imported meshes. Too large models having sizes, that exceed 10000 units may have various artefacts (jitter, etc.) associated with positioning errors. You can eliminate such artefacts by splitting your mesh into multiple separate meshes. To do so, just enable this option and set the size of the grid cell (see the Grid Size parameter below) to be used for mesh splitting.启用导入网格的拆分。尺寸超过10000个单位的太大模型可能会出现与定位错误相关的各种伪像(抖动等)。您可以通过将网格划分为多个单独的网格来消除此类伪影。为此,只需启用此选项并设置用于网格划分的网格单元的大小(请参见下面的Grid Size参数)。 This option does not split surfaces.此选项不会拆分曲面。 |
Grid Size | Size of the grid cell to split imported meshes, in units.划分导入的网格的网格单元的大小,以单位为单位。 |
Repivot to Center | Places a pivot of generated mesh to its center. Can be used for meshes having their geometry located too far from their pivot, as this may lead to various artefacts (jitter, etc.) associated with positioning errors.将生成的网格的枢轴放置到其中心。可以用于其几何形状离其轴心太远的网格,因为这可能导致与定位误差相关的各种伪像(抖动等)。 |
Optimize Vertex Cache | Enables vertex cache optimization. This option reorders an indexed triangle list to improve vertex cache utilization at runtime. It can be turned off to accelerate saving process; however, it should always be turned on if saving the final version.启用顶点缓存优化。此选项对索引的三角形列表重新排序,以提高运行时的顶点缓存利用率。可以将其关闭以加快保存过程;但是,如果保存最终版本,则应始终将其打开。 |
Linear Deflection | Limits the distance between triangles and the original surface. It is used to define triangulation of the imported model together with the Angular Deflection.限制三角形与原始曲面之间的距离。它用于与Angular Deflection一起定义导入模型的三角剖分。 |
Angular Deflection | Limits the angle between adjacent triangles generated from a surface. It is used to define triangulation of the imported model together with the Linear Deflection.限制从曲面生成的相邻三角形之间的角度。它用于与Linear Deflection一起定义导入模型的三角剖分。 |
Lightmaps Options光照贴图UV创建选项#
Material Import Options物料导入选项#
Import Materials | Enables importing materials from the file. Materials are stored in the .step, .stp and .iges, .igs files. When importing, only the albedo (diffuse) color is copied. Other material parameters should be set up after the model is added to the scene.启用从文件导入材质。材质存储在.step, .stp和.iges, .igs文件中。导入时,仅复制反照率(漫反射)颜色。将模型添加到场景后,应设置其他材质参数。 |
---|---|
Assets Mode |
Enables to choose whether to use existing materials or to overwrite them with the ones imported. Available options:允许选择是使用现有材质还是用导入的材质覆盖它们。可用选项:
|
Base Materials Mode | Enables to choose the base material for the imported materials. Available options:可以为导入的材质选择基材。可用选项:
|
Workflow |
Provides an interface to choose a workflow for the imported physically-based materials (if any). Available options:提供一个界面来选择工作流程进口的基于物理的材质(如果有)。可用选项:
|
Add Asset Name as Prefix | Appends the name of the imported asset as a prefix to the imported materials names.将导入资源的名称作为前缀附加到导入的材质名称。 |
Add Prefix |
Appends the specified prefix for the imported materials names to avoid name collisions.允许为导入的材质添加前缀,以避免名称冲突。 If multiple CAD models are imported together this feature does not guarantee that all materials with the same names will be preserved, as only one prefix is used for all of them (if two models have different materials named black, only one of them shall remain with the specified prefix). To avoid such cases, models should be imported sequentially with different prefixes.如果将多个CAD模型一起导入,则此功能不能保证将保留所有具有相同名称的材质,因为所有材质都只使用一个前缀(如果两个模型的材质名为black,则其中只有一个保留)。指定的前缀)。为避免这种情况,应使用不同的前缀顺序导入模型。 |
Other Import Options其他导入选项#
Front Axis | Provides an interface to choose an axis to be considered as the forward vector of the World Coordinate System.提供一个接口,以选择要被视为世界坐标系的正向向量的轴。 |
---|---|
Up Axis | Provides an interface to choose an axis to be considered as the up vector of the World Coordinate System.提供一个接口,以选择要被视为世界坐标系的向上向量的轴。 |
Scale |
Geometry scale multiplier.几何比例乘数。 The default unit of length for CAD models can be millimeter, inch, etc. On model importing, it is transferred to meter used in UNIGINE. So, you may need to scale the model on importing to get the appropriate size. The specified value doesn't affect scale of the model added to the world.长度的用于CAD模型的缺省单元可以是毫米,英寸等。在模型的进口,将其转移到在UNIGINE使用米。因此,您可能需要在导入时缩放模型以获取适当的大小。指定的值不影响规模该模型已添加到全世界。 |
Hierarchy Options层次结构选项#
This auxiliary section is available in the Parameters window when selecting an imported CAD asset in the Asset Browser. It enables you to preview the content of the CAD asset imported with the current Mesh Import Options.在资源浏览器中选择导入的 CAD 资源时,此辅助部分在 Parameters 窗口中可用。它使您能够预览使用当前文件导入的 CAD 资源的内容网格导入选项.
Nodes | List of nodes obtained from the CAD asset.从 CAD 资源中获取的节点列表。 |
---|---|
Surfaces | List of surfaces of the selected node.选定节点的曲面列表。 |
Use Custom Settings | Enables custom Lightmaps options for the selected surface(s).启用自定义光照贴图选定曲面的选项。 |
Asset Preview资源预览#
This section is available in the Parameters window when selecting an imported CAD asset in the Asset Browser. It allows you to preview the imported model.在 Asset Browser 中选择导入的 CAD 资源时,此部分在 Parameters 窗口中可用。它允许您预览导入的模型。
Geometry几何学#
CAD model can be represented as a single detail or as an assembly. If parts of the assembly are stored in separate files, you should specify all of them on the assembly import.CAD模型可以表示为单个细节或装配体。如果部件的零件存储在单独的文件中,则应在部件导入中指定所有零件。
To import 3D geometry data contained in a CAD model, you should enable the Import Meshes option. When you add the imported geometry to the scene, it will be available in the World Hierarchy as a Dummy Node:要导入CAD模型中包含的3D几何数据,应启用Import Meshes选项。将导入的几何体添加到场景中时,它将在World Hierarchy中以Dummy Node的形式出现:
- If the imported CAD asset stores a detail, a single static mesh will be a child of the Dummy Node.如果导入的CAD资源存储了明细,则单个静态网格物体将是Dummy Node的子级。
- If the imported CAD asset stores an assembly, the Dummy Node will have a hierarchy of child nodes representing parts of the assembly.如果导入的CAD资源存储了程序集,则Dummy Node将具有代表程序集零件的子节点层次结构。
By default, the surfaces of each detail of the CAD model that have the same material are merged resulting in a single surface for each detail in most cases.默认情况下,将合并具有相同材质的CAD模型的每个细节的表面,从而在大多数情况下为每个细节生成单个表面。
If you enable the Merge Static Meshes option, all child meshes will be combined into a single one. At that, all surfaces of child meshes will be copied to the single parent mesh and will appear in its Surfaces hierarchy.如果启用Merge Static Meshes选项,则所有子网格将合并为一个。届时,所有子网格物体的表面都将被复制到单个父网格物体,并将出现在其Surfaces层次结构中。
You can also merge the surfaces of the CAD model having the same material assigned by enabling the Merge Surfaces by Materials option.您也可以通过启用Merge Surfaces by Materials选项合并具有指定材质的CAD模型的曲面。
Usually, the unit of length of the CAD models differs from meters. When importing a model into UNIGINE, it is transferred to meters. It may lead to improper size of the imported model: to adjust the scale of the imported geometry, you can use the Scale parameter.通常,CAD模型的长度单位不同于米。当导入模型到UNIGINE,它被转移到米。这可能会导致导入模型的尺寸不正确:要调整导入几何的比例,可以使用Scale参数。
It is also possible to optimize the vertex cache when importing geometry. To do so, use the Optimize Vertex Cache option.导入几何体时也可以优化顶点缓存。为此,请使用Optimize Vertex Cache选项。
Materials材质#
A CAD model can also store materials assigned to surfaces of the details. To import materials from a CAD model, enable the Import Materials option. In this case, the surfaces of the imported model will have the corresponding materials assigned.CAD模型还可以存储分配给明细表表面的材质。要从CAD模型导入材质,请启用Import Materials选项。在这种情况下,将为导入的模型的曲面分配相应的材质。
When the Import Materials option is disabled, all surfaces of the model will have the default mesh_base material assigned.禁用Import Materials选项时,将为模型的所有曲面分配默认的mesh_base材质。
When importing materials, you might have a situation when a material with a given name already exists in the project. You can choose whether to overwrite existing materials (the corresponding assets will be overwritten) or not. For this purpose, the Overwrite Assets option is used. When unchecked, the existing materials will be used.导入材质时,项目中可能已经存在具有给定名称的材质。您可以选择是否覆盖现有材质(对应的资源将被覆盖)。为此,使用了Overwrite Assets选项。如果未选中,则将使用现有材质。
Also you can choose the base material for the imported materials: it can be an autoselected/autogenerated graph-based material or the built-in mesh_base material.你也可以选择进口材质的基础材质:可以是自动选择/自动生成的基于图的材质或内置mesh_base材质。
If the Base Materials Mode is set to Inherited Mesh Base, you should use the Workflow option to set the desired one. UNIGINE supports two workflows for PBR materials: Metalness and Specular.如果 Base Materials Mode 设置为 Inherited Mesh Base,您应该使用 Workflow 选项来设置所需的选项。 UNIGINE 支持 PBR 材质的两种工作流程:Metalness 和 Specular。
Adding Imported CAD Asset to the World将导入的CAD资源添加到世界#
To add an imported CAD asset to the scene, drag it from the Asset Browser to the Viewport window. The corresponding node will be created and displayed in the World Hierarchy window. This node will have the same name as the imported CAD asset and a hierarchy of child nodes representing separate objects contained in the model.要将导入的CAD资源添加到场景中,请将其从资源浏览器到Viewport窗口。相应的节点将被创建并显示在World Hierarchy窗口中。该节点将具有与导入的CAD资源相同的名称,并且子节点的层次结构代表模型中包含的单独对象。
If you double-click the imported CAD asset in the Asset Browser, the .mesh and .node files generated in run-time and stored in the CAD container will be displayed.如果在资源浏览器中双击导入的CAD资源,则将显示在运行时生成并存储在CAD容器中的.mesh和.node文件。