usdgeom-mesh-subdivision#

Code

VG.010

Validator

latest+

Compatibility

core usd

Tags

🚀

Summary#

Do not subdivide meshes with Normals.

Description#

In OpenUSD, mesh primitives are subdivided by default (the default value of UsdGeom.Mesh->subdivisionScheme is “catmullClark”). Care needs to be taken to set it to “None” when subdivision is not required.

Meshes which are intended to be subdivided are not expected to provide Surface Normals.

Subdivision should be used selectively to create smooth surfaces or enable displacement. Do not use subdivision when the mesh is already sufficiently tessellated.

Why is it required?#

Subdividing meshes unnescessarily creates:

  • Increased “time to first pixel” (scene translation time)

  • Higher memory usage

  • Reduced rendering performance

Examples#

#usda 1.0

# Invalid: Unnecessary subdivision on simple shape
def Mesh "OverSubdividedCube" {
    uniform token subdivisionScheme = "catmullClark"
    int[] faceVertexCounts = [4, 4, 4, 4, 4, 4]
    int[] faceVertexIndices = [0, 1, 2, 3, ...]
    normal3f[] normals = [(0,0,1), (0,0,1), (0,0,1), (0,0,1), ...] # Meshes that have normals should not have subdivision attributes
    point3f[] points = [(0,0,0), (1,0,0), (1,1,0), (0,1,0), ...]
}

# Valid: No subdivision for simple shape
def Mesh "SimpleCube" {
    uniform token subdivisionScheme = "none"
    int[] faceVertexCounts = [4, 4, 4, 4, 4, 4]
    int[] faceVertexIndices = [0, 1, 2, 3, ...]
    normal3f[] normals = [(0,0,1), (0,0,1), (0,0,1), (0,0,1), ...]
    point3f[] points = [(0,0,0), (1,0,0), (1,1,0), (0,1,0), ...]
}

How to comply#

  • Set subdivisionScheme to None if subdivision is not required

  • Remove unnecessary subdivision attributes

  • Fix in source application

Validation#

The Omniverse Asset Validator has a check that warns of meshes with normals which are also subdivided, as this often stems from overlooking the fact that the default value of subdivisionScheme is catmullClark.

For More Information#