normal-attribute-exists.md#

Code

VG.027

Validator

Compatibility

rtx

Tags

Summary#

UsdGeomMesh (that is not utilizing subdivision) needs to have normal attributes.

Description#

UsdGeom.Mesh(s) that is not utilizing subdivision should be authored with normal attributes to enable proper visualization within all visualization environments. Otherwise geometry will appear as flat shading or facets and could be mis-interpreted as an error.

Note: This requirement does not apply to other types of UsdGeom other than UsdGeomMesh.

Why is it required?#

  • Requirement to visualize mesh (non subdivision) geometry and appear correct in any type of lighting or renderer.

Examples#

#usda 1.0
(
    metersPerUnit = 0.01
)

def Xform "World"
{
    def Cube "Cube"
    {
        float3[] extent = [(-1, -1, -1), (1, 1, 1)]
        double size = 2.0
        
        # Face normals for a cube (6 faces)
        normal3f[] normals = [
            (0, 0, 1),   
            (0, 0, -1),  
            (1, 0, 0),   
            (-1, 0, 0),  
            (0, 1, 0),   
            (0, -1, 0)
        ]
        uniform token normals:interpolation = "uniform"
        
        double3 xformOp:translate = (2000000000000.0, 0.0, 0.0)
        double3 xformOp:scale = (1.0, 1.0, 1.0)
        uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:scale"]
    }
}

How to comply#

  • Users should author normals from dcc application for meshes.