Int to float issue

I`m running into issue using user attribute converted to float in shading networks.

See attached scene and render, i`m using integer attribute named class to drive rotation of the texture. Simply to get variation in shading per element.
If the integer is converted to float, it will produce artifacts in render.
When i use user float, but load integer instead, it works as expected.

Todays nightly W10, let me know if you can reproduce it.

thank you


texture_offset.zip (40.9 KB)

Thanks, Peter!

I’ve logged the issue as HOU-1335. The VRScene export looks correct so I assume this is an issue with the convert node.

I’ll keep you posted. Cheers!

> When i use user float, but load integer instead, it works as expected.

So, could you use that approach for now? (it’s “faster” anyway, since no intermediate conversion node involved).

So, the “fix” is to use TexUserFloat for that case.

Details: attributes are stored as map channels (value per face vertex); those values are interpolated at hit point.

In case of querying “int” value may be interpolated as (52.0,52.0,52.0) which will become 52.
However floating point computation may interpolate it as (51.993,51.993,51.993) which is basically the same float value, but “int” may become “51”.
That’s why it’s better to use user float directly without intermediate conversion in that case.

Interesting insight, will keep that in mind, thank you.

psanitra, anyway, I have one idea how to optimize this case. Will keep you posted.