Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Both Storm and Prman delegate have problems with UsdPrimvarReader_float3 fallback value #1683

Closed
spitzak opened this issue Nov 12, 2021 · 5 comments

Comments

@spitzak
Copy link

spitzak commented Nov 12, 2021

Description of Issue

Prman gets black instead of fallback value. Storm just seems to mess up entirely, changing other settings and even leaving the fallback shading messed up.

Steps to Reproduce

  1. usdview the attached file. Try it in storm and prman, and turn the use of shaders on/off. This is the expected result
  2. Remove the /World/primvars:displayColor attribute (I could not figure out how to do this other than to edit the usda file), and try again.
  3. In prman it acts like the color is black (or at least very dark)
  4. In Storm everything renders transparent.

System Information (OS, Hardware)

Linux

Package Versions

USD 20.11
UsdPreviewSurface.usda.gz

Build Flags

@spitzak
Copy link
Author

spitzak commented Nov 12, 2021

previewprman
prmanpreview

@spiffmon
Copy link
Member

See also @spitzak 's description of fallback behavior on usd-interest .

@spitzak , regarding your #2 above, that is what UsdAttribute::Block() is for.

@jilliene
Copy link

Filed as internal issue #USD-7024

@spitzak
Copy link
Author

spitzak commented Nov 18, 2021

Some clarification: storm appears to be ignoring the fallback value for the color, just like PrMan.

Storm has another problem: if the "fallback" shader is not run first then it seems to be left in a bad state and all the objects are transparent. This can be shown by rendering the above file (which has UsdPreviewSurface assigned to everything) in usdview with "use scene materials" set to on. Contrast to what you get if "use scene materials" is off when you start usdview and you turn it on, in which case I think it is rendering correctly (except the color is wrong).

@spitzak
Copy link
Author

spitzak commented Nov 18, 2021

Although it is not really a fix, it might make sense to alter UsdPreviewSurface so the default color is (.5,.5,.5), so it matches the fallback shader whether or not this bug is fixed.

pixar-oss pushed a commit that referenced this issue Aug 4, 2023
Fixes #1683

(Internal change: 2288024)
pixar-oss pushed a commit that referenced this issue Sep 19, 2023
shader is now a float array, rather than a color. Additionally, when filling
a riley::Shading node for a shader during HdPrman's material processing, a
shader parameter with type SdrPropertyTypes->Float that is holding a GfVec3f is
now handled as a float array, instead of being ignored.

These two changes mean that the we now correctly read in the user input for the
UsdPrimvarReader_float3 fallback param while maintaining the UsdPreviewSurface
specification that the fallback param is a float type.

Fixes #1683

(Internal change: 2294933)
pixar-oss pushed a commit that referenced this issue Sep 19, 2023
aaye pushed a commit to aaye/OpenUSD that referenced this issue Sep 24, 2023
definition, as this was causing the shader to ignore the fallback value.

Role "none" will genericize the SdrPropertyType, such as changing
SdrPropertyTypes->Color to SdrPropertyTypes->Float, which seemed to cause the
fallback value to not be used properly.

Fixes PixarAnimationStudios#1683

(Internal change: 2286847)
aaye pushed a commit to aaye/OpenUSD that referenced this issue Sep 24, 2023
Fixes PixarAnimationStudios#1683

(Internal change: 2288024)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants