Search Issue Tracker
Fixed
Fixed in 3.0.0-exp.3
Votes
0
Found in [Package]
3.0.0-exp.2
Issue ID
USDU-234
Regression
No
USD export PreviewSurface Prim missing class identifier #282
Originally reported on Github: [https://github.com/Unity-Technologies/usd-unity-sdk/issues/282]
_____________________________________________________________________________________
*Possibly *related tickets:
USDU-235 / USDU-236 / USDU-237 / USDU-238 / USDU-239
_____________________________________________________________________________________
Exporting an instanced prefab with materials into USD and then viewing it with {{usdview}} causes it to emit these error messages - and display the model with no material:
{code:java}
(USDtools) D:\python\usdmorph\HumanUsd\h64>usdview Human-0064-0.usda
Coding Error (secondary thread): in GetBehavior at line 540 of D:\transfer\USD\pxr\usd\usdShade\connectableAPIBehavior.cpp -- Could not find prim type '' for prim prim </Human_0064/Materials/Man001_color_28332/PreviewSurface> on stage with rootLayer @Human-0064-0.usda@, sessionLayer @anon:00000000295339F0@
... (4 more of the same)
Coding Error (secondary thread): in GetBehavior at line 540 of D:\transfer\USD\pxr\usd\usdShade\connectableAPIBehavior.cpp -- Could not find prim type '' for prim prim </Human_0064/Materials/Man001_color_28332/PreviewSurface> on stage with rootLayer @Human-0064-0.usda@, sessionLayer @anon:00000000295339F0@
ERROR: Usdview encountered an error while rendering.
Error in 'pxrInternal_v0_21__pxrReserved__::`anonymous-namespace'::_BehaviorRegistry::GetBehavior' at line 540 in file D:\transfer\USD\pxr\usd\usdShade\connectableAPIBehavior.cpp : 'Could not find prim type '' for prim prim </Human_0064/Materials/Man001_color_28332/PreviewSurface> on stage with rootLayer @Human-0064-0.usda@, sessionLayer @anon:00000000295339F0@'
... (6 more of the same)
Error in 'pxrInternal_v0_21__pxrReserved__::`anonymous-namespace'::_BehaviorRegistry::GetBehavior' at line 540 in file D:\transfer\USD\pxr\usd\usdShade\connectableAPIBehavior.cpp : 'Could not find prim type '' for prim prim </Human_0064/Materials/Man001_color_28332/PreviewSurface> on stage with rootLayer @Human-0064-0.usda@, sessionLayer @anon:00000000295339F0@'
{code}
The relevent USD lines are as follows:
{code:java}
{{ def Scope "Materials"
{
def Material "Man001_color_28332"
{
token outputs:displacement
token outputs:surface.connect = </Human_0064/Materials/Man001_color_28332/PreviewSurface.outputs:surface>
token[] requiredKeywords
def "PreviewSurface"
{
token info:id = "UsdPreviewSurface"
float inputs:clearcoat = 0
float inputs:clearcoatRoughness = 0.01
float3 inputs:diffuseColor = (0.18, 0.18, 0.18)}}
The errors go away if I add a {{Shader}} class to the "PreviewSurface" line like so:
def Shader"PreviewSurface"
{
{code}
Notes:
* Using Unity 2020.3.20f1
* Using USD Package 3..0.0-exp.2
* A repo with Python code that does a minimal parsing of a USDA file and repairs the issues 278, 282, 283, 284, 285 can be found at [https://github.com/MikeWise2718/usdmorph] - hopefully it won't be needed long before these are all repaired in a new version.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android] [Vulkan] Cubes stuck on the first few frames of rotation and application flickering when an Overlay Camera is added to the Camera Stack with MSAA enabled
- Profiling information icon does not update for Light Mode
- [Linux] Type to select functionality is missing for drop down menus
- TextMeshPro calculates Width Compression incorrectly when using certain values in the WD% field
- VFX Graph link contrasts fail WCAG guidelines
Add comment