Arnold for Houdini Forum
Rendering with Arnold in Houdini and Solaris using the HtoA plug-in.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HtoA attr token for varying texture input not working

Message 1 of 3
531 Views, 2 Replies

HtoA attr token for varying texture input not working

Hey all-- I am having issues trying to get the attr: token to work in houdini--basically trying to get 6 prim groups within an object to pull a different texture file from disk within the same shader

petal 1--texture 1

petal 2--texture 2

etc etc

I have an attribute called disppath-- which is primitive attribute that assigns the file name as a string to each primitive:



etc etc.

on the object:

under the arnold attributes tab i have exported the attirubte as 'disppath' under the prim attributes

on the shader:

For the filename input on the shader i have this



I am getting this error:

00:00:00 1276MB WARNING | [htoa.texture] No extension for filename "E:/PERSONAL_PROJECTS/TREE_BLOOM/tex/disp_tests/shader_multipletexture_setup_disp/<attr:disppath>": Cannot check TX existence, returning filename

and then nothing is rendering...

I have been trying all sorts of different approaches but nothing seems to give her :(.

what exactly am I doing wrong here?

Thanks in advance!

Message 2 of 3
in reply to: Anonymous

First prepare your Houdini Tex folder, in may case I've wood_a.jpg,,g wood_c.jpg
add an attribcreate for each object with the same name and different string name

Name: "color" or "disppath" or whatever name
Class: Primitive
String: wood_a
Name: "color" or "disppath" or whatever name
Class: Primitive
String: wood_b
Name: "color" or "disppath" or whatever name
Class: Primitive
String: wood_c

or you can use attribwrangle for each object
Run Over: Primitives
s@color='wood_a'; for object1
s@color='wood_b'; for object2
s@color='wood_c'; for object3

add <attr: color default:wood>.jpg to the image filename
$job/tex/<attr:color default:wood>.jpg


no need for user_data_string

One single shader for all object


here is the test render



Message 3 of 3
in reply to: Anonymous

thank you @rachid Hadj Abderrahmane !

The only issue i can see with this is that these are separate objects in your example--in my case I dont have separate objects I just have primitive groups with string attributes pointing to the different textures. Im thinking it SHOULD still work with just primitive groups as well, but I cant check until I get back to my other work station on the 6th :(. Ill keep you posted though. Hopefully this is the solution Im looking for. Just in case it is of any interest to you, my workaround at this point is to export the scene as an alembic, and automatically generate 'shapes' for the primitive groups. I then send this over to maya. Once the groups are separate objects, I can assign different textures to the shapes using attribute tokens in Maya to get the desired result. In hindsight I can probably just bring the alembic back into Houdini and use the same method---but thats another matter.

Thanks for the help!



Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report