Arnold for Houdini--assigning different textures to primitive groups within same object

   3835   1   0
User Avatar
Member
63 posts
Joined: Jan. 2016
Offline
Hey all, Im trying to get Arnold set up and functioning within houdini. I have a problem that I cant seem to get to the bottom of. Basically I have a series of petals, 6 of them. Each petal is part of its own group and has a primitive id per petal. All the copies are in one sop. I have same uvs for each petal, but I want to call different textures for each version of the petal within the same shader.



In mantra, I can do this by setting up local variable overrides, and forcing the shader to pick up the desired file using a primitive string attribute that points to the file locations:

so in this case i just have six petals- each with a primitive id attribute. I feed this into a string attribute (see below)



s@disppath=sprintf(“/Users/PROJECTS/TREE_BLOOM/tex/disp_test_new/disp_test.%d.exr”,s@id);

and I now have a per polygon link to the textures i want

first two picks show how I set this up successfully.







Now arnold supposedly has this functionality as well— the arnold help docs say you can use the <attr:> token to call information from the object into the shader.

https://docs.arnoldrenderer.com/pages/viewpage.action?pageId=14354005 [docs.arnoldrenderer.com]

So I set up a similar workflow- the file locations I need are inside a string attribute called disppath, and then I simply input this into the filename

$JOB/tex/disp_tests/shader_multipletexture_setup_disp/<attr:disppath> for the shader itself.







I cant get it to render though……looking at the last six lines of the console it is telling me that the point attribute of class string is unspported (not sure why it has to be a point attribute?)

00:00:00 1262MB WARNING | skipping unsupported point attribute of class string (varying string user data) “disppath”
00:00:00 1262MB WARNING | skipping unsupported point attribute of class string (varying string user data) “_id”





As a note: I switched the attribute from prim to point when i saw the console indicated I needed a point attribute, and I have the attribute being passed through on the object itself as well. I had also tried to add a user data string attribute on the shader itself–but this also failed and gave me the same message.



Any thoughts on what I might be doing wrong? I wish there was more documentation on this . If you need it I can try and make a small package with the textures and geo for you to take a look.







Thank you!
Edited by jtk700cln - Dec. 21, 2018 23:36:41

Attachments:
manta_material_override.PNG (262.1 KB)
mantra-shader.PNG (286.0 KB)
arnoldsetup.PNG (200.0 KB)
arnoldsetup2.PNG (298.8 KB)

User Avatar
Member
2 posts
Joined: Dec. 2018
Offline
did you find any solution for this?i am stuck in a similar scenario
  • Quick Links