기술 자료

Asset Transformer Studio


User Manual

Python API

Changelog

Asset Transformer Studio


Repair Mesh

How to repair meshes in Asset Transformer Studio
읽는 시간 5분최근 업데이트: 25일 전

Repair Mesh
A good mesh repair is key for a good optimization.
Before being optimized, a mesh needs to be clean: with connected edges, no overlapping triangles, with triangle faces oriented consistently and in the correct direction, etc.
A simple example showing how important repaired meshes are is decimation: see this page.
To repair meshes, use the Repair Mesh function, available in the Mesh menu.

What it does

The Repair Mesh function automatically performs several actions:

Detect and remove duplicate triangles

Some triangles can be duplicated multiple times and overlapping (meaning with coincident vertices), making the polycount too high and potentially creating visual artifacts (Z-fighting).
The process removes them: only one triangle is preserved. This is automatic — no parameter needs to be enabled in the dialog box.

Vertices welding (proximity tolerance)

This process welds, or merges, together vertices that have the same position (using a tolerance) but different attributes.
Typically, non-manifold borders of a mesh or hard edges are candidates for welding, and the welding will recreate connectivity information at those locations if vertices fall into the given tolerance.
The tolerance is given in the
Tolerance
parameter:
Tolerance parameter
The default value is 0.1mm and generally gives good results.

Sew mesh boundaries

To avoid visible gaps and cracks in the input mesh, this process sews (stitches) boundaries that are unconnected:
Sew boundaries
Fix T-junction
Unconnected boundaries are closed even if the vertices are not coincident, by fixing T-junctions:
Fix T-junction 2
The tolerance is given in the
Tolerance
parameter (the same value is used for welding and sewing boundaries):
Tolerance parameter
The default value is 0.1mm and generally gives good results.
If gaps bigger than 0.1mm are observed on the meshes, this value needs to be raised — but not too much, to avoid removing gaps that are part of the mesh topology, like a hole or a marking.
참고
In Asset Transformer Studio, disconnected edges (also called free boundaries) are represented as blue edges when the wireframe is turned on.

Removing degenerate triangles

This process removes degenerate triangles, meaning triangles that are almost flat (all boundaries overlapping). This is automatic — no parameter needs to be enabled.

Fixing orientation of adjacent faces consistently

Orienting triangle faces consistently on a model's meshes is one of the biggest challenges in 3D data preparation.
Real-time 3D apps use single-sided materials (or shaders) in order to preserve performance, by rendering only the faces of the mesh that are visible to the camera/user.
This requires meshes to have their triangle faces properly and consistently oriented (see About Face and Vertex Normals).
In the Repair Mesh dialog box, when the parameter
Orient
is enabled, the Orient Polygon Faces algorithm is run, trying to orient all the adjacent faces of each mesh consistently.
This actually does two things: find potential strips of triangles that form a Möbius strip and crack it. Then, orient triangles so that all triangles in the same strip are oriented the same way.
Orient faces
참고
Saying that a face is correctly oriented can often be subjective, as it depends on the position of the viewer. The orientation of the faces in the Repair Mesh algorithm aims at normalizing the orientation on a continuous set of triangles, but it cannot ensure that the final result will be correct for the user.
Although it fixes everything on most volumetric shapes (such as CAD models), the Orient Polygon Faces algorithm can have trouble orienting faces properly when dealing with surfaces or shells (as opposed to closed volumes).
To help the algorithm get the best result possible on this kind of mesh, the
Crack Non Manifold
parameter splits non-manifold edges to get two or more manifold edges, when possible.
참고
Set the parameter
Orient
to false if you are happy with the triangle face orientation and do not want to damage it!
Other functions and methods are available to help orient the faces of a model correctly:
참고
To easily spot misoriented triangle faces in the viewport, set the Backface culling rendering mode to
BF Color
to draw them with a flat pink color.

General behavior

The Repair Mesh function repairs the meshes existing in a part independently from other parts of the scene.
So, if 2 mesh boundaries need to be stitched together and if some triangle faces need to be oriented consistently to each other, they need to be in the same part.
Use the merging functions from the Scene menu to merge parts together.
If no part is selected in the scene, Repair Mesh will be executed on all parts of the scene (hidden parts included). If you wish to repair only some targeted parts, select them first.

Example

Here is an example of a mesh that requires repair: a car door with disconnected edges (blue edges) and inverted triangle faces (pink faces).
Applying the Repair Mesh function with default values repairs the mesh, saving a few triangles, and making it ready for use or further optimization.
Repair Mesh example

To go further

More repair functions
Beside Repair Mesh, there are many mesh repair functions available. You can find them in the Function List (F12) in the
Algo
module.
Each subprocess of Repair Mesh explained above can be found as a unitary function, giving more control over the parameterization: