This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Программирование
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

CAD Import Guide

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:

The list of available import options includes the following:

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.
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.
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.
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.
Overwrite Existing Materials Enables to choose whether to overwrite materials that exist in the project or not. When unchecked, existing materials will be used.
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.
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).
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.
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.

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: 10.08.2018
Build: ()