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
Programming
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
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

MeshViewer

Warning
ResourceEditor tool is deprecated and no longer supported. We can't guarantee the stable work of the tool.

MeshViewer is a robust tool used for fast preview of the exported geometry, animation and textures. It allows for converting loaded data into Unigine supported formats. Besides that, it has a set of useful features to help artists in optimization of created models.

MeshViewer module

MeshViewer supports:

  • Vertex color
  • Multiple animations
  • Morph targets (blend shapes) from .dae and .mesh files

Usage

MeshViewer uses a simplified set of shaders to speed up the loading, so its primary purpose is a fast display and visual check of the data obtained from a 3D editor.

MeshViewer is a convenient way to perform the following operations:

  • Fast preview of models exported from a 3D editor (see supported formats).
  • Convert geometry data from external file formats into a native Unigine mesh.
  • Export animated meshes as a simple geometry.
  • Check UV mapping and texturing of the model.
  • Try out tessellation and parallax mapping according to the loaded textures.
  • Quickly test the model for possible problems:
  • Manage model geometry: save a mesh without some of its surfaces, save selected surfaces of the model as separate meshes.
  • Optimize the model:
  • Save the textured model as a project. After that, the set up model can be loaded in one click.

Display Modes

Models can be operated in three display modes. To switch between them, choose the mode in the drop-down list in the upper left corner of a window:

  • Mesh - display a loaded mesh with applied textures in the viewport.
  • TexCoord 0 - display the first UV set.
  • TexCoord 1 - display the second UV set.

The Mesh and the TexCoord 0 Modes

Current Animation

If the model contains animation, it can be operated in different animation modes. To switch between them, choose the mode in the drop-down list in the upper left corner of a window, next to the Display mode list:

  • Bind pose - display a loaded mesh in the bind animation pose.

The other poses, if exist, will be displayed in the drop-down list under the Bind pose option.

Mesh Options

Mesh options are present at the right side of the MeshViewer window:

Load  Mesh Load a model stored in any of supported formats:
  • Unigine mesh (.mesh)
  • Unigine animation (.anim)
  • Unigine skinned mesh (.smesh)
  • Unigine skinned mesh animation (.sanim)
  • Wavefront (.obj)
  • COLLADA (.dae)

Loading options available in the opened dialog window:

  • Flip Y/Z axes and invert Y axis - load the model with the proper orientation in Unigine coordinate system. If models were initially created in one of the following 3D packages, they require this option to be enabled:
    • ZBrush
    • Mudbox
    • Poser
    • Silo
    • Blender
    Notice
    Autodesk 3ds Max flips axes automatically, so you don't need to enable this option.
  • Flip tangent space orientation - flip the orientation of the tangent space for the correct model lighting.
  • Vertex cache optimization - reorder an indexed triangle list for improved vertex cache utilization. When turned on, the model may take more time to load.
Notice
Though you can load animation using this option, there is a special option, Load Anim, made for quick and convenient animation loading.
Notice
You can also load the mesh by pressing Ctrl+O.
Save  Mesh Save a model into one of the following formats:
  • .mesh (for geometry and animation)
  • .anim (for animation)

Saving options available in the opened dialog window:

  • Flip Y/Z axes and invert Y axis - load the animation with the proper orientation in Unigine coordinate system.
  • Flip tangent space orientation - flip the orientation of the tangent space for the correct model lighting.
  • Vertex cache optimization - reorder an indexed triangle list for improved vertex cache utilization. When turned on, the model may take more time to load.
  • Current animation only - save only the current animation with specified animation range.
Notice
To save geometry without animation, use Export Mesh.

If no surfaces are selected, the whole mesh (all non-hidden surfaces) will be saved. If one or several separate surfaces are selected (for multiple selection hold Shift or Ctrl), only specified geometry will be saved into the file. The same options as for loading are used for saving.

Notice
Models that have third-party formats can be saved into the .mesh format only.
Also note that if the Vertex cache optimization option was enabled when loading a mesh, there is no need to enable it again. Remember, however, that this optimization should be used on any step: either when the model is exported from 3D editor, loaded into MeshViewer or saved.
Notice
Though you can save animation using this option, there is a special option, Save Anim, made for quick and convenient animation saving.
Notice
You can also save the mesh by pressing Ctrl+S.
Load  Anim Load an animation stored in any of supported formats:
  • Unigine mesh (.mesh)
  • Unigine animation (.anim)
  • Unigine skinned mesh (.smesh)
  • Unigine skinned mesh animation (.sanim)
  • COLLADA (.dae)

Loading options available in the opened dialog window:

  • Flip Y/Z axes and invert Y axis - load the animation with the proper orientation in Unigine coordinate system.
Save  Anim Save the animation into one of the following formats:
  • .mesh
  • .anim

Saving options available in the opened dialog window:

  • Flip Y/Z axes and invert Y axis - load the animation with the proper orientation in Unigine coordinate system.
  • Current animation only - save only the current animation with specified animation range.
Load  Proj Load a saved MeshViewer project (.proj file), which contains a model, textures and all settings made for them.
Save  Proj Save a mesh with all its settings as a project (into a .proj file). This file contains a path to the mesh file and settings made for mesh surfaces (textures, parameters and flags). After being saved, a mesh can be quickly loaded.
Notice
Note that the project with the applied textures and surfaces cannot be exported to Unigine engine. MeshViewer is used for preview purposes only.
Export  Mesh Save the model geometry without animation and bones into a .mesh file. The same options as for loading are used for saving. Also note that:
  • If one or several separate surfaces are selected (by holding Shift or Ctrl), only they will be saved rather than the whole model.
  • Animated model will be exported as a simple static geometry as it is displayed in the current animation frame.
Export  Node Save the model with assigned textures into the .node and the .mat files. You can select the following options while exporting:
  • Parent Material - parent material for the material being exported.
  • Material Prefix - prefix to the material being exported.
  • Diffuse Texture - add a diffuse texture.
  • Normal Texture - add a normal texture.
  • Specular Texture - add a specular texture.
  • Material Export - name of the material being exported.
  • Node Export - name of the node being exported.
Smooth  Mesh Smooth all curving parts of mesh. This option does not affect the geometry, but only the way the mesh is shaded. If one or several separate surfaces are selected (by holding Shift or Ctrl), only they will be smoothed rather than the whole model. The smoothing options are:
  • Angle - a threshold angle for smoothing. If an angle between two polygons is smaller than the set threshold angle, they are smoothed. If it is unchecked, normals of all polygons are merged. The mesh will have no sharp edges — it will be all smooth. Unckecking Angle option is the same as setting threshold angle to 180 degrees. If the Angle is set to 0 degrees, no polygons are smoothed. Each polygon face will be shaded independently, resulting in a sharp and edgy appearance. The higher the angle (up to the maximum of 180 degrees), the more polygons are smoothed, as the angle between their faces is smaller then the threshold one.
  • Flip Tangent - flipping the tangent space orientation.
  • Seamless - cross-surface smoothing of a tangent space.

Smoothed Mesh (Angle option unchecked) Non-smoothed Mesh (Angle = 0)
Smoothed mesh. Angle unchecked.
Non-smoothed mesh. Angle = 0.
Optimize  Mesh There are several options available for mesh optimization:
  • Vertex cache - reorder the indexed triangles list for improved vertex cache utilization.
  • Back to front - render mesh polygons in the back-to-front order (from peripheral to central polygons).
Notice
For the difference between these rendering methods to be seen, enable the Overlaps option.
Reload All Reload all resources (mesh and its textures). This option does not affect set up parameters for surfaces and textures.
Notice
You can also reload resources by pressing Ctrl+R.

Visualization Options

The model can be displayed in the different ways. The set of visualizations options is the following:

Info Display information about the mesh and one selected surface in the upper left corner of the viewport. Such data is shown as:
  • Name /Surface - name of the mesh/surface.
  • Surfaces - number of surfaces.
  • Vertices - number of coordinate/triangle vertices.
  • Triangles - number of triangles.
  • Memory - taken system/video memory space.
  • Min and Max - coordinates of the minimum and maximum points of the axis-aligned bounding box. .
  • Center - bounding sphere center coordinates.
  • Radius - bounding sphere radius.
Notice
You can also enable the option by pressing I.
Compass Enable a XYZ compass in the upper right corner of the viewport.
Notice
You can also enable the option by pressing C.
Triangles Show the base grid plane, as well as triangles of the mesh (its selected surfaces) or a wireframe (if enabled).
Notice
You can also enable the option by pressing T.
 
Edges Show texture edges for the mesh (or its selected surfaces) in red.
Seams Show texture seams for the mesh (or its selected surfaces) in green.
Tangent Show the tangent space at polygon vertices of the mesh (or its selected surfaces). It represents texturing coordinates for face of each polygon with the triple of vectors: U, V and normal vector that is always perpendicular to the face itself.

This option is useful for detecting tangent space discontinuities, which may cause lighting artifacts. In areas where adjacent polygons have a different tangent space, there will be an noticeable edge; in areas where tangent space is the same, there will be a smoothly curved surface.

Tangent space

Tangent space: U, V and Normal
Overlaps Show overlaps in UV coordinates in different shades of red. The more saturated is the color, the more overlaps there are in the given point.

Overlaps in UV coordinates

Overlaps in UV coordinates
Bones Show bones of the mesh.
Names Show names of the bones.
Quaternions Use dual quaternions for the skinned mesh. When quaternions are used instead of simple matrices to describe rotation and position of vertices, it allows to reduce a twisting artifact between two bones, which is often seen at shoulder joints of characters. With dual quaternions character joints do not look deformed like a candy wrapper.

Disabled dual quaternions Enabled dual quaternions
Disabled quaternions
Enabled quaternions
Surfaces Show a dialog window with a list of surfaces and their visualization parameters.

The Surfaces window has the following options:
  • List of the available surfaces. Multiple selection by holding Shift or Ctrl is supported.
  • Name - edit the surface name.
  • Target - choose the morph target in the drop-down list, if there are any.
  • Transform - specify the texture coordinates transformation:
    • The first two fields set the scale factors to the X and Y axes respectively.
    • The third and the fourth fields set the offset factor to the X and Y axes. The values should be non-integer to produce a visible offset.
  • Enabled - enable the chosen surface.
  • Bound Box - display the bounding box enclosing the surface.
  • Wireframe - enable the wireframe view for the surface. This option is in effect only when Triangles are enabled as well.
  • Transparent - enable surface transparency.
  • Alpha Test - enable alpha testing for the applied material.
  • Two Sided - use double-sided surface.
Textures Show a dialog window with texture settings for the selected surface.

On the texture tab you can Load a new texture, View or Clear the loaded texture. If multiple surfaces are selected, these operations will be performed for all the textures.

The texture window has the following tabs:
  • Diffuse tab for a diffuse texture:
    • Color - edit the diffuse color component.
    • Scale - edit the brightness of the diffuse color.
  • Normal tab for a normal map:
    • Scale - edit the diffuse color scale.
  • Specular tab for a specular map.
    • Color - edit the specular color component.
    • Power - edit the size of the specular highlight:
      • Low values for wider highlights.
      • High values for pinpoint highlights.
    • Scale - edit the brightness of specular reflections:
      • Low values for matt surface
      • High values for glossy surface
  • Parallax tab for a parallax map. This map can be created in the NormalMapper.
    • Scale - edit the distance to displace pixels:
      • The higher the value, the further the pixels will appear to be pressed into the surface.
  • Height tab for a tessellation height map. This map can be created in the NormalMapper.
    • Factor - edit the amount of polygons of the control mesh:
      • The higher the value, the more refined the contour of the tessellated surface will be.
    • Scale - edit the height to displace vertex positions to (according to the provided height map):
      • The higher the value, the farther vertices are displaced and the more protruded the tessellated surface is.
Hierarchy Show a dialog window with the animation hierarchy.

Animation Options

Preview skinned animation is supported only for meshes containing animation.

  • Simply click Play if animation is stored in one .mesh file together with a mesh in a bind pose.
  • If a bind pose and animation are stored in a separate files, perform the following steps:
    1. Click Load Mesh and select.mesh file with a bind pose.
    2. Click Load Mesh again and select.anim file with animation data.
    3. Check Animation only at the bottom of the dialog window.
    4. Play the animation applied to the skinned mesh.

Animation options

  • From — the first frame to start animation playback from.
  • To — the last frame to end the animation playback with.
  • Fps — the speed of animation playback.
  • Play — play the animation in a loop.

Help

To open the help window, containing the brief information about the tool and the list of hot keys, click Help at the bottom right corner of the MeshViewer window.

Notice
You can also open the window by clicking F1.

Supported File Formats

Supported geometry and animation formats:

  • Unigine mesh (.mesh)
  • Unigine animation (.anim)
  • Unigine skinned mesh (.smesh)
  • Unigine skinned mesh animation (.sanim)
  • Wavefront (.obj)
  • COLLADA (.dae)

Supported textures formats:

  • Targa (.tga)
  • Portable Network Graphics (.png)
  • JPEG (.jpg)
  • Photoshop Document (.psd)
  • Direct Draw Surface (.dds)
Notice
.psd and .dds textures can be either of an 8 -bit or 16 -bit precision.

Controls

Selection

  • Ctrl+Left mouse button/Double click — select a surface or deselect a previously selected surface. Hold Shift to select/deselect more surfaces.

Hot Keys

  • Ctrl+O — load a mesh.
  • Ctrl+S — save a mesh.
  • Ctrl+R — reload all files.
  • I — toggle mesh info.
  • C — toggle a XYZ compass.
  • T — toggle base grid, surface triangles or a wireframe.
  • F — focus on the selected surface. It sets the pivot on the focused surface. To reset it, use G hotkey.
  • Space — deselect the selected surface.
  • F1 — show the help window.
Last update: 2018-04-26
Build: ()