Closed nxkb closed 2 years ago
Usually good to compare with a working version from ArKit.
The problem is a typo in the material definition of your asset. The output name of UsdPrimvarReader_float2
is result
, not results
. You might as well replace token outputs:glslfx:surface.connect
with token outputs:surface.connect
while you are editing the file so it is closer to standards.
Yes, I noticed the file displays correctly in usdview, but it is because hdStorm discards the invalid UV reader and replaces it with a default one that happens to read the default UV name, which is "st". Changing "st" to "st0" in the mesh definition of your asset will cause usdview to fail in a manner identical to MayaUSD.
Awesome, thanks for catching that @JGamache-autodesk. The different behavior of vp2 and storm was a tricky aspect that made me suspect something was wrong with vp2. I've updated and it works well now.
You might as well replace
token outputs:glslfx:surface.connect
withtoken outputs:surface.connect
while you are editing the file so it is closer to standards.
We added that glslfx specifier to our assets for specificity and future proofing because it seems to be what is recommended here: "Typically [UsdMaterial] consists of one or more UsdRelationship properties that target other prims of type Shader - though a target/client is free to add any data that is suitable. We strongly advise that all targets adopt the convention that all properties be prefixed with a namespace that identifies the target, e.g. "rel ri:surface = </Shaders/mySurf>"."
We connect both an arnold shader and a preview shader to the same UsdMaterial. Although those use different connection styles anyway (rel/output), the advice seems applicable there too.
Yes, I noticed the file displays correctly in usdview, but it is because hdStorm discards the invalid UV reader and replaces it with a default one that happens to read the default UV name, which is "st". Changing "st" to "st0" in the mesh definition of your asset will cause usdview to fail in a manner identical to MayaUSD.
Got it. Do you think it would be good to match usdview behavior here or keep it erroring to show an issue?
@nxkb based on the conversation above, can we close this issue?
closing this one for now. if this is still an issue, please feel free to re-open
@santosg87 yep, ok to close. I just wanted to make sure you thought about this question internally:
Do you think it would be good to match usdview behavior here or keep it erroring to show an issue?
Describe the bug Assets with preview shaders that have textures do not display properly in viewport 2.0.
Steps to reproduce Steps to reproduce the behavior:
asset-prpNikeShoes.usd
fileExpected behavior I want the preview shader's textures to display as they do in usdview.
Attachments prpNikeShoes.zip
Specs (if applicable):