This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm (Experimental)
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
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
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

CAD Import Guide

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Engineering / Sim SDK edition to use it.

CAD assets are imported into UNIGINE as any other asset. The following CAD formats are supported:

  • IGES
  • STEP
  • STL
  • BREP

Notice
For the CAD asset to be imported, the CadImporter plugin must be loaded.

Importing CAD Asset#

When you import a CAD asset, the import settings window appears:

Notice
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.

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 of the 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.
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.
Notice
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 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.

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.
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).
  • Overwrite Assets — overwrite existing materials (if any).
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 mesh_base material (diffuse, specular, gloss).
  • Metalness workflow — use the new standard of textures (albedo, metalness, roughness).
Add Prefix Enables to add a prefix for imported materials to avoid collision of names.
Notice
If multiple CAD models are imported together this feature does not guarantee that all materials with 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.

Lightmap UV Creation Options#

UV Channel UV channel to store the lightmap.
Lightmap Target Resolution Resolution of the resulting lightmap.
UV Padding Padding value.
Packing Quality The efficiency of UV islands layout on the texture.

Other Import Options#

Up Axis Provides an interface to choose an axis to be considered as the up vector of the World Coordinate System.
Front Axis Provides an interface to choose an axis to be considered as the forward vector of the World Coordinate System.
Scale Geometry scale multiplier.
Notice
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.

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.

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:

  • If the imported CAD asset stores a detail, a single static mesh will be a child of the 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.
A Detail
An Assembly

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.

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.

You can also merge the surfaces of the CAD model having the same material assigned by enabling the Merge Surfaces by Materials option.

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.

It is also possible to optimize the vertex cache when importing geometry. To do so, use the Optimize Vertex Cache option.

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.

Notice
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.

When the Import Materials option is disabled, all surfaces of the model will have the default mesh_base material assigned.

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 Existing Materials option is used. When unchecked, existing materials will be used.

UNIGINE supports two workflows for PBR materials: Metalness and Specular. Use the Workflow option to set the desired workflow.

Adding Imported CAD Asset to the World#

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.

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.

Last update: 2020-11-24
Build: ()