MD Package Technical & APi Documentation
Smoothing Filters
Namespace: MDPackage.Utilities
Collection of mesh smoothing filters.
MDUtil_HumphreySmoothingFilter
// Modify and smooth mesh with the HC smoothing filter
public static Vector3[] CalculateHCFilter(Vector3[] inVerts, int[] inTris, MDM_SculptingLite.SculptingBrushData sculptingAttributes, float alpha = 0.8f, float beta = 0.94f)
// Modify and smooth mesh with the HC smoothing filter
public static Vector3[] CalculateHCFilter(Vector3[] inVerts, int[] inTris, float alpha = 0.8f, float beta = 0.94f)
MDUtil_LaplacianSmoothingFilter
// Modify and smooth mesh with the Laplacian smoothing filter
public static Mesh CalculateLaplacianFilter(Mesh mesh, float intensity, bool recalculateNormals = true)
// Modify and smooth mesh with the Laplacian smoothing filter
public static Vector3[] CalculateLaplacianFilter(Vector3[] vertices, int[] triangles, float intensity)
// Modify and smooth mesh with the Laplacian smoothing filter
public static Vector3[] CalculateLaplacianFilter(Vector3[] vertices, int[] triangles, float intensity, MDM_SculptingLite.SculptingBrushData sculptingAttributes)
Mesh Modification
Namespace: MDPackage.Utilities
Mesh subdivision & normals smoothing angle recalculation.
Read more here (Online documentation slide)
MDUtil_MeshSubdivision
// Subdivide mesh by specific level
public static void Subdivide(Mesh mesh, SubdivisionLevel level)
MDUtil_NormalsSmoothingAngle
// Recalculate normals with a specific smoothing angle. 90 degrees is a default value. Use 0 degrees for flat smoothing
public static void RecalculateNormalsWithSmoothingAngle(Mesh mesh, float angle = 90)
// Recalculate normals with a specific smoothing angle. 90 degrees is a default value. Use 0 degrees for flat smoothing
public static Vector3[] RecalculateNormalsWithSmoothingAngle(NormalsDataPckg normalData, float angle = 90)