This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Plugins for 3ds Max

Manual Installation

If Unigine plugins were not installed automatically, do the following:

  1. Go to the Unigine SDK folder, plugins/Max/ directory and choose the plugin depending on the installed version of 3ds Max.
  2. Copy all the files, such as
    • MeshExport.dle
    • MeshSkinnedExport.dle
    • MeshImport.dli
    • MeshSkinnedImport.dli
    • etc
    into the 3ds Max plugins folder: for example, 3ds Max 2011/plugins.
  3. In the Unigine SDK folder, choose plugins/Max/UnigineExport/UnigineExport.ms and copy it into 3ds Max Scripts folder: for example, 3ds Max 2011/Scripts or 3dsMax8/Scripts/Startup.
  4. Restart 3ds Max to get plugins ready to work.
  5. If you want to export nodes, add a path to the folder where ImageDDS resides to your %PATH% environment variable.
    On Windows XP:
    1. Right-click My Computer and choose Properties.
    2. In the Advanced tab, click Environment Variables.
    3. Edit the Path system variable (under System variables).
    On Windows Vista and Windows 7:
    1. Right-click Computer and choose Properties.
    2. Select the Advanced system settings category on the right, click Environment Variables.
    3. Edit the Path system variable (under System variables).

How to Use the Plugin

Unigine panel in 3ds Max
Unigine panel in 3ds Max
After installation that you can enable Unigine exporter on the Utilities panel:
  1. Go to Utilities panel.
  2. Open the Configure Button Sets dialog.
  3. Choose Unigine and add it to the listed button sets.

To export 3ds Max models, use the following options:
  • Export As... allows to choose the file and save exported models.
  • Quick Export saves exported models into the same file (as previously specified in Export As... option).

For other export options, see below.

You can also use the following menu on the main menu bar to export/import models:

Unigine menu in 3ds Max

Unigine menu in 3ds Max

Export Static Geometry into Mesh

To export static geometry into .mesh file:

  1. Select models to be exported.
  2. Do any of the following:
    • On the UnigineTools Exporter panel choose Type: Static mesh.
    • Select Unigine menu on the main bar -> Mesh export.
    • Select File -> Export selected or Export (to export the whole scene) and choose .mesh format.
  3. Set up export options.

See also Export into Multiple Meshes.

Mesh Export Options

Export into a mesh from 3ds Max
Static geometry export
(into MESH format)
Options:
  • Align — set a point that will be used as the origin of coordinates:
    • World — use the origin of world coordinates.
    • Center — use the center of the model's bounding sphere.
    • Bottom — use the bottom of the model's bounding sphere.
    • Top — use the top of the model's bounding sphere.
    • Pivot — use the pivot coordinates.
      Notice
      When exporting relative to the pivot, the value of the Scale option is ignored. It is reset to the default 100 %.
  • Scale — scaling ratio. This value scales the size of static geometry.
  • Precision — required precision of exported values (number of digits after a decimal point to keep).
  • Vertex optimization — optimization that reorders an indexed triangle list to improve vertex cache utilization. This option can be turned off for a quicker export; however, it should always be turned on if exporting the final version of assets.
  • Split by material — if Multi-materials are used, polygons with the same sub-material assigned are exported as a separate surface.
    • Sub-materials are considered the same if they have the same name.
    • Exported surfaces will be named after names of sub-materials (<objectName>_<materialName>_<submaterialName>).
  • Groups as surfaces — export objects combined in a group as one surface. The surfaces will be named after the names of groups.

UV mapping:
  • Channel 1 — UVW channel that should be copied into the 1st UV channel of the exported file. Enter 0 to fill the channel with zeros.
  • Channel 2 — UVW channel that should be copied into the 2nd UV channel of the exported file. Enter 0 to fill the channel with zeros.

Export Animated Object Into Skinned Mesh

You can export animated (skinned) mesh baked together with its animation in one file. It is also possible to export only the bind pose of the model (and after that, use it in the engine with separately exported animations, see details below).

In both cases, to export a skinned mesh into .smesh file:

  1. Select a skinned mesh to be exported.
  2. Do any of the following:
    • On the UnigineTools Exporter panel choose Type: Skinned mesh.
    • Select Unigine menu on the main bar -> MeshSkinned export.
    • Select File -> Export selected or Export (to export all scene) and choose .smesh format.
  3. Set up export options.

Notice
  • The maximum number of bones per surface is equal to 96 to avoid crashes on graphics APIs of DirectX 9 level. If the number exceeds this limit, small child bones will be simply ignored by export.
  • Each vertex can have up to 4 bones assigned to it.

SMESH Export Options

Export into a skinned mesh from 3ds Max
Skinned mesh export
(into SMESH format)
Options:
  • Align — set a point that will be used as the origin of coordinates:
    • World — use the origin of world coordinates.
    • Center — use the center of the mesh's bounding sphere.
    • Bottom — use the bottom of the mesh's bounding sphere.
    • Top — use the top of the mesh's bounding sphere.
  • Scale — scaling ratio. This value scales the size of a skinned mesh.
  • Precision — required precision of exported values (number of digits after a decimal point to keep).
  • Vertex Optimization — optimization that reorders an indexed triangle list to improve a vertex cache utilization. This option can be turned off for a quicker export; however, it should always be turned on if exporting the final version of assets.
  • Split by material — if Multi-materials are used, polygons with the same sub-material assigned are exported as a separate surface.
    • Sub-materials are considered the same if they have the same name.
    • Exported surfaces will be named after names of sub-materials (<objectName>_<materialName>_<submaterialName>).
  • Groups as surfaces — export objects combined in a group as one surface. The surfaces will be named after the names of groups.

UV mapping:
  • Channel 1 — UVW channel that should be copied into the 1st UV channel of the exported file. Enter 0 to fill the channel with zeros.
  • Channel 2 — UVW channel that should be copied into the 2nd UV channel of the exported file. Enter 0 to fill the channel with zeros.

Animation:
  • Bind pose — export only the zero static frame. (In case of checking Bind pose option, animation needs to be exported separately).
  • All frames — export all the frames that currently displayed on a time track.
  • Custom frame range — export only the specified animation frames:
    • Start Time — the first frame of the exported animation.
    • End Time — the last frame of the exported animation.
  • Invert time — invert the animation sequence (export it playing from the last frame to the first one).

Export Only Animation of Skinned Mesh

You can export only animation (bones transformations) of a skinned mesh into a separate file. The mesh itself is exported as a Bind pose into SMESH file. This way, you can have only one mesh and choose what animations to set for it.

To export only animation into .sanim file:

  1. Select a skinned mesh which animation is going to be exported.
  2. Do any of the following:
    • On the UnigineTools Exporter panel choose Type: Animation frames.
    • Select Unigine menu on the main bar -> MeshSkinned animation export.
    • Select File -> Export selected or Export (to export the whole scene) and choose .sanim format.
  3. Set up export options.

SANIM Export Options

Export only skinned animation from 3ds Max
Skinned mesh animation export
(into SANIM format)
Animation:
  • All frames — export all the frames that currently displayed on a time track.
  • Custom frame range — export only the specified animation frames:
    • Start Time — the first frame of the exported animation.
    • End Time — the last frame of the exported animation.
  • Invert time — invert the animation sequence (export it playing from the last frame to the first one).

Export into Multiple Meshes

To export static models as separate .mesh files into a specified directory:

  1. Select multiple models.
  2. Select Unigine menu on the main bar -> Multi Mesh export.
  3. Set up export options.

Export Per-Frame Object Transformations

You can export a per-frame sequence of object transformations: its position, rotation and scale in each frame.

To export object transformations into .spline file:

  1. Animate the object, or attach it to a spline so it moves along it.
  2. Select only the object.
  3. On the UnigineTools Exporter panel choose Type: Transformation.
  4. Set up export options.

SPLINE Export Options

Export into a spline from 3ds Max
Object transformations export
(into SPLINE format)
Options:
  • Align — for transformations, this option is not valid. The origin of world coordinates is always used.
  • Scale — scaling ratio. This value scales only the position component of transformations — a path of the moving object.
  • Precision — required precision of exported values (number of digits after a decimal point to keep).

Animation:
  • All frames — export transformations of the object from all the frames.
  • Custom frame range — export transformations of the object from only the specified frames:
    • Start Time — the first frame to export.
    • End Time — the last frame to export.
  • Invert time — invert the transformation sequence (export it from the last frame to the first one).

Export Meshes and Materials into Nodes

Both static geometry and materials of objects can be exported at the same time. Meshes (.mesh files under meshes folder), textures (under textures folder) and a material library (.mat file) are created by that.

Notice
It is not recommended to use this type of export at the production stage, because Unigine has an in-built material system (with inheritance support for extremely efficient rendering at run-time) and a different set of shaders.

To export all data at once:

  1. Select objects to export if you want to export a part of the scene.
  2. Select Unigine menu on the main bar -> Node export. All exported nodes will be automatically named after 3ds Max objects.
  3. Set up node export options.
  4. Click Ok and save .node file. Additional files and folders will be automatically created.

Notice
This feature exports only those surfaces that have materials assigned to them. Other surfaces will be skipped.

NODE Export Options

Export into a node from 3ds Max

Options for export into the node file format
Base:
  • Single mesh — merge all surfaces into a single mesh.
  • Selection only — export only selected objects. If not checked, the whole scene is exported.
  • Base material — set a base material: you can specify the existing material or create a new one. All node materials are inherited from this base material. By default, the base material is mesh_base.
  • Material prefix — set a prefix for names of the created material name. (For example, if the prefix is my_project_, materials are named my_project_MaterialName). By default, there is no prefix.
  • Path prefix — path prefix that should specify the path to a folder where .node file will be saved (relative to <UnigineSDK>/data directory).
    You can also specify a a path to the existing project. This way, if meshes, textures folders and a material library file are found at this location, the node will be simply added there.
  • Move textures — copy textures into the textures folder.
  • Compression — convert and compress exported textures into .dds format with ImageDDS tool.

Options:
  • Align — set a point that will be used as the origin of coordinates:
    • World — use the origin of world coordinates.
    • Center — use the center of the bounding sphere for each of the model (if a Single mesh option is unchecked).
    • Bottom — use the bottom of the object bounding sphere for each of the model (if a Single mesh option is unchecked).
    • Top — use the top of the object bounding sphere for each of the model (if a Single mesh option is unchecked).
    • Pivot — use the pivot coordinates for each of the model (if a Single mesh option is unchecked).
      Notice
      When exporting relative to the pivot, the value of the World scale option is ignored. It is reset to the default 100 %.
  • World scale — scaling ratio. This value scales models' geometry.
  • Precision — required precision of exported values (number of digits after a decimal point to keep).
  • Vertex optimization — optimization that reorders an indexed triangle list to improve a vertex cache utilization. This option can be turned off for a quicker export; however, it should always be turned on if exporting the final version of assets.
  • Groups as surfaces — export objects combined in a group as one surface. The surfaces will be named after the names of groups.

UV Mapping:
  • Channel 1 — UVW channel that should be copied into the 1st UV channel of the exported file. Enter 0 to fill the channel with zeros.
  • Channel 2 — UVW channel that should be copied into the 2nd UV channel of the exported file. Enter 0 to fill the channel with zeros.

Export Identical Objects into Reference Nodes

You can easily export identical objects that are positioned at different places of the scene. (For example, it could be lamp posts, trash bins, benches, etc.) As objects are absolutely identical, and there are many of them, they are exported as a reference node (.node file). Such node, with geometry and all materials, is loaded into memory once and is instanced across the whole scene. (Afterwards, in the Unigine editor, it also possible to modify materials or parameters only for one node instance, making it unique — for example, a broken lamp post — though instancing will not work for it in this case.)

Exported objects will be represented as the following hierarchy in Unigine:

  • Node dummy as a root (so that all nodes can be disabled/enabled in one click)
  • Reference nodes positioned in the scene as its children

To export identical objects into one .node file and automatically place them:

  1. Select identical objects that you want to export.
  2. Select Unigine menu on the main bar -> Nodes transform.
  3. Set up export node options. You can choose to export only positions of reference nodes (if a .node file already exists), or create a reference node and position its instances.

NODE Transformation Export Options

Export identical objects into a node from 3ds Max

Export of identical objects (into NODE format) and their transformations

  • Root node dummy — set the name of the node dummy (used a root for reference nodes in Unigine editor hierarchy).
  • Node path — path to the reference node (.node file) relative to <UnigineSDK>/data directory. You can specify an existing file (if an object was already exported), or create a new one.
  • Rename 'name_%' — renames reference nodes.
    • If this option is unchecked (by default), nodes are named after the names of objects.
    • If checked, reference nodes are named as 'new_name_%', where % is a number. (For example, 'lamp_post_%' renames all reference nodes into lamp_post_1, lamp_post_2, etc.)
  • World scale — scaling ratio. This value scales the position of the objects relative to each other.

Export of Camera

To export the path of the camera and changes of its field of view (FOV) along the way:

  1. Select cameras to be exported
  2. Select Unigine menu on the main bar -> Camera export

Each selected camera path will be exported in a separate texture file (without any extension) with the following format:

Output
N
position0.x position0.y position0.z rotation0.x rotation0.y rotation0.z rotation0.w fov0
…
positionN.x positionN.y positionN.z rotationN.x rotationN.y rotationN.z rotationN.w fovN
Here N is the number of time units (frames). The camera in each time unit is described by a single line containing a position, a rotation, and a field of view.

There is a special class for parsing file of this type, CameraPath. In order to use it, include data/core/scripts/camera.h.

Import of Unigine Mesh

To import the native Unigine mesh (.mesh file) into 3ds Max, choose one of possible options:

  • Select Unigine menu on the main bar -> Mesh import
  • Select File -> Import and choose .mesh file

Import of Unigine Skinned Mesh

To import the native Unigine skinned mesh (.smesh file) into 3ds Max, choose one of possible options:

  • Select Unigine menu on the main bar -> MeshSkinned import
  • Select File -> Import and choose .smesh file
Last update: 03.07.2017
Build: ()