Krabl Mesh Library
A C# library to process meshes in Unity3D
|
A collection of static calls to easily use the Krabl Mesh Library in Unity3D scripts.
|
static |
Simplify a mesh by collapsing edges until the target face count is reached.
unityMesh | The mesh to simplify. |
targetFaceCount | The number of triangles to reduce the mesh to. If this is higher than the initial number of triangles, no processing will occur. |
highQuality | Use slower, but more precise calculations. |
|
static |
Subdivides a mesh by applying a quads-based subdivision algorithm. Optionally, triangles are first merged to quads if possible to produce a better topology. For every iteration the face count of the mesh quadruples. The result mesh has quad topology.
unityMesh | The mesh to subdivide. |
iterations | The number of iterations the algorithm should perform. High numbers (>3) quickly lead to producing more triangles than unity can handle! (>65k). |
trisToQuads | Attempt to convert triangles to quads before the subdivision (highly recommended). |
|
static |
Change the normals of a mesh to produce a flat-shaded look. This will increase the vertex count as all vertices need to be split.
unityMesh | The mesh to flat shade. |
|
static |
Change to normals of a mesh to produce a smooth-shaded look. This will reduce the vertex count and all mesh corners will just have one normal.
unityMesh | The mesh to smooth shade. |