usdgeom-mesh-normals-should-be-correct#

Code

VG.028

Validator

Manual

Compatibility

core usd

Tags

Summary#

Normals should be authored to accurately represent the intended surface appearance.

Description#

Surface normals are critical for proper lighting and shading calculations in rendering systems. Normals must be authored with appropriate interpolation methods and orientations to ensure the intended visual appearance is achieved. Smooth surfaces should use vertex or face-varying interpolation for smooth shading, while hard edges and creases should use face or uniform interpolation to maintain sharp boundaries. All normals should consistently face outward from the surface to ensure proper lighting calculations and avoid rendering artifacts.

Examples#

#usda 1.0

# Smooth surface with proper vertex interpolation
def Mesh "SmoothSphere" {
    point3f[] points = [(0,0,0), (1,0,0), (0,1,0), (1,1,0)]
    int[] faceVertexCounts = [4]
    int[] faceVertexIndices = [0, 1, 2, 3]
    
    # Smooth normals for curved surface
    normal3f[] normals = [
        (0, 0, 1),   # Vertex 0 normal
        (0, 0, 1),   # Vertex 1 normal  
        (0, 0, 1),   # Vertex 2 normal
        (0, 0, 1)    # Vertex 3 normal
    ]
    token normals:interpolation = "vertex"  # Smooth interpolation
}

# Hard-edged cube with face interpolation
def Mesh "HardEdgedCube" {
    point3f[] points = [(0,0,0), (1,0,0), (1,1,0), (0,1,0)]
    int[] faceVertexCounts = [4]
    int[] faceVertexIndices = [0, 1, 2, 3]
    
    # Face normals for hard edges
    normal3f[] normals = [
        (0, 0, 1)    # Single normal per face
    ]
    token normals:interpolation = "uniform"  # Hard edge interpolation
}

How to comply#

  • Use appropriate interpolation methods: “vertex” for smooth surfaces, “uniform” for hard edges

  • Ensure consistent outward-facing normal orientation

  • Author normals that accurately represent surface curvature

  • Test rendering in target visualization systems

  • Use face-varying interpolation for surfaces with mixed smooth/hard areas

For More Information#

Notes#