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

CAD导入指南

警告
本文介绍的功能在 Community SDK 版本中不可用。
您应该升级到 Engineering / Sim SDK版本才能使用它。

CAD assets are imported into UNIGINE as any other asset. The following CAD formats are supported:CAD资产以下列方式导入UNIGINE:任何其他资产。支持以下CAD格式:

  • IGES
  • STEP
  • STL
  • BREP
注意
For the CAD asset to be imported, the CadImporter plugin must be loaded.对于要导入的CAD资产,必须加载CadImporter插件。

Importing CAD Asset导入CAD资产#

When you import a CAD asset, the import settings window appears:导入CAD资产时,将显示导入设置窗口:

注意
To simplify sequential import of multiple similar assets, Asset Browser remembers previous asset import settings and offers to use them by default. To reset import settings to system defaults use the Restore Defaults button.为了简化多个相似资产的顺序导入,Asset Browser会记住以前的资产导入设置,并默认提供使用它们的功能。要将导入设置重置为系统默认值,请使用Restore Defaults按钮。

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创建选项#

UV For Lightmap UV channel to store the lightmap.紫外线通道来存储光照贴图。
Lightmap Target Resolution Resolution of the resulting lightmap.生成的光照贴图的分辨率。
Unwrap UV Channel 0 Enables automatic unwrapping for UV Channel 0.填充值。
Unwrap UV Channel 1 Enables automatic unwrapping for UV Channel 1.效率紫外线岛屿在纹理上的布局。

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:允许选择是使用现有材料还是用导入的材料覆盖它们。可用选项:

  • Take From Assets — use existing materials (if any).Take From Assets-使用现有材料(如果有)。
  • Overwrite Assets — overwrite existing materials (if any).Overwrite Assets —覆盖现有材料(如果有)。
Base Materials Mode

Enables to choose the base material for the imported materials. Available options:可以为导入的材料选择基材。可用选项:

  • Inherited Material Graphs - an autoselected graph-based material is used as the base material. This mode finds the most suitable autogenerated graph-based material with the appropriate functionality and inherits the imported materials from it. If such graph-based material isn't found in the project, it will be autogenerated and used as the base one.
    注意
    This mode allows reusing the existing graph-based base materials and avoiding creation of multiple unique base materials when importing FBX files.This mode allows reusing the existing graph-based base materials and avoiding creation of multiple unique base materials when importing FBX files.
    This mode allows reusing the existing graph-based base materials and avoiding creation of multiple unique base materials when importing FBX files.
    Inherited Material Graphs - 使用自动选择的基于图形的材料作为基础材料。此模式查找具有适当功能的最合适的基于图形的自动生成材质,并从中继承导入的材质。如果在项目中没有找到这种基于图形的材料,它将自动生成并用作基础材料。
    注意
    This mode allows reusing the existing graph-based base materials and avoiding creation of multiple unique base materials when importing FBX files.此模式允许在导入 FBX 文件时重复使用现有的基于图形的基础材质并避免创建多个唯一的基础材质。
  • Unique Material Graphs - an autogenerated graph-based material is used as the base material. In this mode all the imported materials will be inherited from the unique autogenerated graph-based materials.Unique Material Graphs - 使用自动生成的基于图形的材质作为基础材质。在这种模式下,所有导入的材质都将继承自独特的自动生成的基于图形的材质。
  • Inherited Mesh Base - the built-in mesh_base material is used as the base material for the imported materials.Inherited Mesh Base - 内置mesh_base材料作为进口材料的基础材料。
Workflow

Provides an interface to choose a workflow for the imported physically-based materials (if any). Available options:提供一个界面来选择工作流程进口的基于物理的材料(如果有)。可用选项:

  • Specular workflow — use the old standard of textures that was used in the mesh_base material (diffuse, specular, gloss).Specular workflow-使用在mesh_base材质(diffuse, specular, gloss)中使用的旧纹理标准。
  • Metalness workflow — use the new standard of textures (albedo, metalness, roughness).Metalness workflow-使用新的纹理标准(albedo, metalness, roughness)。
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将具有代表程序集零件的子节点层次结构。

A Detail (left) and An Assembly (right)一个细节(左)和一个装配体(右)

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选项。在这种情况下,将为导入的模型的曲面分配相应的材料。

注意
Materials are usually stored in the .step, .stp and .iges, .igs files. On their 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文件中。导入时,仅复制反照率(漫反射)颜色。将模型添加到场景后,应设置其他材质参数。

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 材质的两种工作流程:MetalnessSpecular

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文件。

最新更新: 2022-03-10
Build: ()