Support Unicode primvar name in usdview

Hi experts,

Since USD 24.03 supports Unicode identifiers, materials using primvar with Unicode name can be generated by USD toolkit. For example:

But when I use usdview to open these materials, usdview reports errors:

Is this a bug of usdview or as design?


Hi GreatWhite, it looks like the situation is–

  • GLSL doesn’t currently allow non-ASCII identifiers
  • HdSt tries to generate a valid identifier by replacing any invalid characters (bytes) with _ while still preserving that identifiers don’t start with _. Because your UTF-8 string has no ASCII characters, it ends up producing an empty string which cannot be an identifier

We’re proposing a “transcoding” algorithm that can convert any UTF-8 string to an ASCII or XID identifier be added to OpenUSD. This might be a valid use case to better support non-ASCII primvar names. OpenUSD-proposals/proposals/transcoding_invalid_identifiers/ at 4b2a201b03cb121ce767e9e7f32573f02c882bdf · PixarAnimationStudios/OpenUSD-proposals (

1 Like