arnold-usd icon indicating copy to clipboard operation
arnold-usd copied to clipboard

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

Open jhodgson opened this issue 3 years ago • 3 comments

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 avatar Sep 20 '21 09:09 jhodgson

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 avatar Oct 01 '21 11:10 jhodgson

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 ?

sebastienblor avatar Nov 16 '21 09:11 sebastienblor

Issue synced internally to ARNOLD-13289