Skip to content

[EMSUSD-3929] primvars:normals authored as float3[] instead of normal3f[] #40

Description

@devinm-nvidia

Describe the bug
When Exporting via USD Exporter the normals are authored in a float3 type.

Steps to reproduce
Steps to reproduce the behavior:

  1. Create an object
  2. Export Selected to a .usd file type
  3. Be sure geometry normals are authored to primvars
  4. Evaluate .usd in usd view
Image

Expected behavior
Please refer to this documentation,
https://openusd.org/dev/api/_usd__page__datatypes.html#Usd_Roles

and this:
https://openusd.org/dev/api/class_usd_geom_point_based.html#ac9a057e1f221d9a20b99887f35f84480

This is spelled out in the USD schema itself: UsdGeomPointBased declares the attribute as normal3f[] normals, and the same type is expected for primvars:normals. Pixar's Sdf datatypes doc lists normal3f with role "Normal" / meaning "transform as a normal," while float3 has no role at all.

Repro: export any mesh with normals and inspect the .usda. You'll see float3[] primvars:normals where it should read normal3f[].

Image

Fix: author the attribute with SdfValueTypeNames->Normal3fArray instead of Float3Array. The values don't need to change, just the declared type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions