shown in other instead.
MeshViewer is a robust tool for fast preview of exported geometry, animation and textures. It allows for converting loaded data into Unigine static geometry format and smoothing normals. Besides that, it has a set of useful features to help artists in optimization of created models.
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).
- Preview skinned animation (only for .smesh files).
- Convert geometry data from external file formats into a native Unigine mesh. Export Unigine animated meshes as a simple geometry.
- Set materials to 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:
- View UV seams
- Check overlaps in UV coordinates
- Visualize tangent space to light the model correctly
- Manage model geometry: save a mesh without some of its surfaces. You can also save selected surfaces of the model as separate meshes.
- Optimize your model:
- Automatically remove invisible polygons.
- Ensure efficient usage of vertex cache by a model at rendering time.
- Smooth curved surfaces.
- Save the textured model as a project. After that, the set up model can be loaded in one click.
Please note that the project with the applied textures and surfaces cannot be exported to Unigine engine. MeshViewer is for preview purposes only.
MeshViewer can operate in three display modes. To switch between them, choose the mode in the drop-down list in the upper left corner of a window.
|Load mesh||Load an exported static object (stored in a Unigine .mesh format) or animation (in .smesh and .sanim format).
|Save mesh||Save a model into the same Unigine native format as the current one (to save them into a .mesh, use Export mesh option):
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 a file.For saving, the same options as for loading are applied.
|Load project||Load a saved MeshViewer project (.proj file), which contains a model, textures and all settings made for them.|
|Save project||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
Projects are supported only by the ResourceEditor. They cannot be loaded into the Unigine engine world.
|Export mesh||Save the model geometry into a Unigine native .mesh format in two clicks. Animation and bones, if any, will be ignored.
|Smooth mesh||Smooth all curving parts of mesh. This option does not affect the geometry, but only how the mesh is shaded.
Smoothing can be applied to static geometry (in .mesh file) and animated models (in .smesh file). If one or several separate surfaces are selected (by holding SHIFT or CTRL), only they will be smoothed rather than the whole model.
|Reduce mesh||Cull invisible polygons. Each polygon is tested whether it is visible by tracing rays to it from all directions. Invisible polygons are automatically removed, thus decreasing the number of triangles the graphics card will have to process at rendering time. This optimization is very useful, for example, if a mesh was created from several overlapping models.
|Reload all||Reload all resources: a mesh and its textures. This option does not affect set up parameters for surfaces and textures. The hot key is CTRL + R.|
|Info||Display information about the mesh and one selected surface in the upper left corner of the viewport. Such data is shown as:
|Compass||Toggle a XYZ compass in the upper right corner of the viewport. The hot key is C.|
|Triangles||Toggles showing the base grid plane, as well as triangles of the mesh (its selected surfaces) or a wireframe (if enabled). The hot key is T.|
|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: 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
|Bones||Show bones of the skinned mesh.|
|Names||Show names of the bones of the skinned mesh.|
|Dual Quat||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. (In the Unigine-based application dual quaternions can be enabled with Use dual quat option).
|Surfaces||Show a dialog window with a list of surfaces and their visualization parameters.
The Surfaces window has the following options:
|Textures||Show a dialog window with texture settings for the selected surface.
On the texture tab you can load the texture, view or clear the loaded texture. If multiple surfaces are selected, these operations will performed for all the textures.
The texture window has the following tabs:
Preview skinned animation is supported only for .smesh files.
- Simply click Play if animation is stored in one .smesh 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:
- Click Load mesh and select .smesh file with a bind pose.
- Click Load mesh again and select .sanim file with animation data.
- Check Animation only at the bottom of the dialog window.
- Play the animation applied to the skinned mesh.
- From — the first frame to start animation playback from
- To — the last frame to animation playback with
- Fps — the speed of animation playback
- Play — play the animation in a loop
Supported File Formats
MeshViewer can export data from several external formats.
Supported formats of geometry/animation data are as follows. Previewing animation data is supported only for Unigine skinned meshes (SMESH format).
- Unigine mesh (MESH)
- Unigine skinned mesh (SMESH)
- Unigine animation for skinned mesh (SANIM)
- 3ds Max (3DS)
- LightWave Objects (LWO)
- Wavefront (OBJ)
- ASCII Scene Export (ASE)
- COLLADA (DAE)
- Quake 3 level model (BSP)
- Doom 3 level model (MAP)
- Quake 2 level model (MD2)
- Doom 3 skinned model (MD5MESH)
- Doom 3 animation (MD5ANIM)
- QuakeWars skinned model (MD5B)
- QuakeWars animation (ANIMB)
Supported formats of textures:
- Targa (TGA)
- Portable Network Graphics (PNG)
- JPEG (JPG)
- Photoshop Document (PSD)
- Direct Draw Surface (DDS)
- CTRL + left mouse button / double click — select a surface or deselect a previously selected surface. Hold SHIFT to select/deselect more surfaces.
- CTRL + O — load mesh.
- CTRL + S — save mesh.
- CTRL + R — reload all files.
- I — toggle mesh info.
- C — toggle a XYZ compass.
- T — toggle base grid, surface triangles or a wireframe (if enabled).
- G — reset pivot from the mesh to the camera.
- 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.