Solaris: Resolve texture paths based on primitive attributes

   1764   5   1
User Avatar
Member
15 posts
Joined: March 2014
Offline
Hi,

In other applications, I can use primitive properties to drive the texture path in render time (like setting the texture path in the texture node as "<shape.tex_dir>/<shape.name>_diff.tex", where "<shape>" is the primitive and "tex_dir" is a userProperties or user custom attribute.

Does Solaris support such substitutions? Or is there an alternative way to achieve this?
User Avatar
Member
918 posts
Joined: March 2014
Offline
I've done texture path assignments many times in the past with primitive attributes in SOPs/Mantra. I'm still new so Solaris and thought this would work with USD primvars, but I'm not having any luck with the texture showing up in Karma's render.

The primitive string attribute shows up as a USD primvar with the given value, but reading that in the material builder seems to fail.

As always, any info from the devs is much appreciated.
Edited by Andy_23 - Oct. 3, 2021 09:47:02
User Avatar
Member
918 posts
Joined: March 2014
Offline
Hey Belal,

please find attached a HIP that shows texture assignment per primitive string attribute in Solaris with Karma.

Have fun.

Attachments:
texture_attrib_v01.hip (296.2 KB)

User Avatar
Member
15 posts
Joined: March 2014
Offline
Thanks Andy for sharing this... this worked color primvars, but didn't work string primvars, as well as that it didn't work with userProperties

your implementation is the right way, but it seems that Houdini itself didn't import the desired attributes (or at least not importing string attributes).

Development team input on this will be appreciated
User Avatar
Member
918 posts
Joined: March 2014
Offline
Hi Belal,

I'm not sure I understand. In my HIP the texture is read and rendered from a string attribute.

Attachments:
string_attribute_texture.jpg (89.2 KB)

User Avatar
Member
15 posts
Joined: March 2014
Offline
You created the attribute in houdini, did you try if this attribute is on a primitive in a usd file? (this what didn't work at my end, if primitive box is from a usd referenced file, and this box has a primvars:whatEver this primvar works as long as it's not string, if it's set to string, then it didn't work), on the other hand, only primvars: works, having userProperties:whatEver doesn't work as they are not imported even when I tried to load them in the import data files in SOP Import).
  • Quick Links