This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
基础
专业(SIM)
UnigineEditor
界面概述
Version Control
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
统一的Unigine着色器语言 UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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

CAD导入指南

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一起定义导入模型的三角剖分。
Use LODs Defines if Levels of Detail (LODs) are to be used for the imported model.定义是否将自动创建详细级别(LOD)用于导入的模型。

Levels of Detail
详细程度#

Automatic LOD Generation feature based on the meshoptimizer library will help create several variations of one object with different level of detail (LODs).基于meshoptimizer的自动LOD生成功能将帮助创建一个对象的多个不同细节层次(LOD)变体。

To use the feature choose Auto-Generated in the Use LODs dropdown and configure the settings listed below - the Engine will do the rest, generating all LODs automatically based on your configuration.要使用该功能,请在 Use LODs 下拉列表中选择 Auto-Generated 并配置下面列出的设置 - 引擎将完成剩下的工作,并根据您的配置自动生成所有 LOD。

注意
See the video tutorial on how to configure LODs for more details.详情请参见如何配置 LOD视频。

You can also enable the Merge Static Meshes option for more optimization.您还可以启用Merge Static Meshes选项以进行更多优化。

Number of LODs Number of Levels of Detail.详细级别数。
Target Polycount

Desired degree of geometry simplification for each LOD (target geometry complexity percentage from the initial number of polygons).每个LOD所需的几何简化程度(目标几何复杂度与初始多边形数量的百分比)。

注意
Please keep in mind that this is only a target value, that in some cases may be unreachable for the mesh simplifier. In case any artefacts with the topology of the simplified meshes occur, try increasing this value.请记住,这只是一个目标值,在某些情况下,网格简化器可能无法达到。如果出现任何具有简化网格拓扑的伪影,请尝试增加此值。
Normals Preserve This parameter indicates the impact of normals on mesh topology simplification. Higher values increase the influence of normals, by the value of 0 normals are ignored. Avoid setting too high values as this may restrict simplifier too much and simplification will fail (as normals may differ significantly). Default setting is suitable for most cases.该参数表示法线对网格拓扑简化的影响。较高的值会增加法线的影响,0 的值会忽略法线。避免设置太高的值,因为这可能会过多地限制简化器并且简化将失败(因为法线可能会有很大差异)。默认设置适用于大多数情况。
Recalculate Normals by Angle Enables recalculation of normals in the process of mesh simplification based on the specified angle threshold. If an angle between the normals to adjacent polygons exceeds this value, normals will be recalculated between them to smoothen the look of the geometry and get rid of possible shading issues.启用基于指定角度阈值的网格简化过程中的法线重新计算。如果相邻多边形的法线之间的角度超过此值,则将在它们之间重新计算法线以平滑几何体的外观并消除可能的阴影问题。
Min Visibility

The minimum distance on which this LOD is visible in camera local axes.在摄像机局部轴上可见此LOD的最小距离。

-inf — the LOD is visible by default.-inf:默认情况下,LOD可见。

Max Visibility

The maximum distance on which this LOD is visible in camera local axes.此LOD在相机局部轴中可见的最大距离。

inf — the LOD is visible by default.inf:默认情况下,LOD可见。

Min Fade

Over this distance, the surface fades in until it is completely visible. Along this distance the engine automatically interpolates the level of detail from completely invisible to completely opaque. Fading-in starts when the camera has reached the minimum distance of surface visibility and is in the full visibility range.在这个距离上,表面逐渐消失,直到完全可见。沿着这个距离,引擎会自动将细节级别从完全不可见插入到完全不透明。当相机达到表面能见度的最小距离并且处于完整的能见度范围内时,淡入开始。

Max Fade

Over this distance, the surface fades out until it is completely invisible. Fading out starts when the camera has reached the maximum distance of surface visibility and is out of the full visibility range.在这个距离上,表面逐渐消失,直到完全不可见。当相机达到表面能见度的最大距离并且超出整个能见度范围时,就会开始淡出。

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 CAD files.This mode allows reusing the existing graph-based base materials and avoiding creation of multiple unique base materials when importing CAD files.
    This mode allows reusing the existing graph-based base materials and avoiding creation of multiple unique base materials when importing CAD files.
    Inherited Material Graphs - 使用自动选择的基于图形的材质作为基础材质。此模式查找具有适当功能的最合适的基于图形的自动生成材质,并从中继承导入的材质。如果在项目中没有找到这种基于图形的材质,它将自动生成并用作基础材质。
    注意
    This mode allows reusing the existing graph-based base materials and avoiding creation of multiple unique base materials when importing CAD 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,则其中只有一个保留)。指定的前缀)。为避免这种情况,应使用不同的前缀顺序导入模型。
Merge Similar Materials Merge materials with identical settings but having different names.可以合并具有相同设置但名称不同的材质。

Texture Import Options
Texture Import Options#

Import Textures Import textures stored in the CAD file. If textures are imported, the corresponding texture assets are created in the same folder, where the CAD asset is stored.启用从CAD文件导入纹理。如果导入纹理,则对应的纹理资源在存储CAD资源的同一文件夹中创建。
Invert G-Channel For Normal Maps Invert the G-channel in normal maps.反转法线贴图中的G通道。

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 file will be displayed.如果在资源浏览器中双击导入的CAD资源,则将显示在运行时生成并存储在CAD容器中的.mesh.node文件。

最新更新: 2024-12-13
Build: ()