Houdini Arnold Operator assign shader based on primitive attribute

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi guys
I'm currently trying to assign different shaders to a bunch of shapes in the same geo node using Arnold Operators in Houdini. Each shape has a primitive attribute called name with a unique value.
Now I'm trying to assign shaders to these shapes based on their names, but Arnold doesn't respond to any of the methods in the help documents on operators.
If I use an assign material node to assign a shader to a collection that grabs the whole geo node, everything works well. However trying to isolate the assignment further has been fruitless so far.
I've tried this:
COLLECTION NODE Selection: /obj/myObjects* Collection: myCollection ASSIGN MATERIAL NODE: Selection: #myCollection Shader Network: /shop/grey_mat
This works, all objects get a grey shader. Now this next thing doesn't work:
COLLECTION NODE Selection: /obj/myObjects* Collection: myCollection ASSIGN MATERIAL NODE: Selection: #myCollection and *.(name=='*nameValue*') Shader Network: /shop/grey_mat
Now no shaders are assigned even though they primitives in the geo node does have the primitive attribute. I've also tried this method, which doesn't work either:
COLLECTION NODE Selection: /obj/myObjects* Collection: myCollection ASSIGN MATERIAL NODE: Selection: #myCollection and *nameValue* Shader Network: /shop/grey_mat
Funny thing is, when I load similar geometry as a packed alembic. All the above methods work and shaders are assigned correctly. Anyone know what I'm doing wrong?
Any help is appreciated.