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

Warning reading USD shader parameters of type unsigned int in the reader #888

Open
jhodgson opened this issue Sep 20, 2021 · 3 comments
Open
Labels
bug Something isn't working procedural Related to the Arnold Procedural

Comments

@jhodgson
Copy link
Contributor

jhodgson commented Sep 20, 2021

Shader parameters of type unsigned int are represented by integer parameters in Houdini, and these are currently translated as integer primitives attributes in usd.

The best way to fix this is to tag the houdini parameters with their usd type using the sidefx::shader_parmtype tag since this will result in the correctly translated usd types. But the Houdini material translation python scripts don't support the Sdf.ValueTypeNames.UInt type (see HTOA-1841) so there is an exception setting the scalar values.

This has been fixed in Houidini after version 18.5.707

@jhodgson jhodgson added bug Something isn't working procedural Related to the Arnold Procedural labels Sep 20, 2021
@jhodgson
Copy link
Contributor Author

jhodgson commented Oct 1, 2021

Shaders with parameters of type unsigned in are in some cases being represented as signed ints in the usd description (HTOA-1839).

  • When running kick to resave such a usd file as an ass files, the value is saved correctly but there is a warning

Coding Error (secondary thread): in _FailGet at line 570 of /Users/ansono/devel/upstreams/arnold-kook/usd/build/usd-21.08_static_darwin_clang-10.0.1_cxx14/pxr/base/vt/value.cpp -- Attempted to get value of type 'int' from VtValue holding 'unsigned int'

  • When loading the usd file via a procedural and expanding to an ass file, the value is saved correctly.

See HTOA-1839 for creating the usd attributes with the correct unsigned type to work around this issue.

Archive.zip

@jhodgson jhodgson changed the title Support USD shader parameters of type unsigned int in the procedural Warning reading USD shader parameters of type unsigned int in the reader Oct 8, 2021
@jhodgson jhodgson added writer Related to the Arnold to USD writer and removed procedural Related to the Arnold Procedural labels Oct 8, 2021
@kikou kikou added procedural Related to the Arnold Procedural and removed writer Related to the Arnold to USD writer labels Oct 8, 2021
@sebastienblor
Copy link
Collaborator

The warning here doesn't come from the shaders, it comes from this in the render settings node
custom uint arnold:global:GI_diffuse_samples = 4
which is why it doesn't happen in the procedural since the options aren't translated in that case.

So, GI_diffuse_samples is set as a uint but it's an integer in arnold, I guess this should be changed in the HtoA side ?

@compso compso added this to Arnold USD Apr 8, 2022
@compso compso moved this to Todo in Arnold USD Apr 8, 2022
@autodesk-oss-arnold-bot
Copy link

Issue synced internally to ARNOLD-13289

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working procedural Related to the Arnold Procedural
Projects
Status: Todo
Development

No branches or pull requests

3 participants