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

Can a texture token refer to an operator set parameter string?

4 REPLIES 4
Reply
Message 1 of 5
philipborgMWE44
236 Views, 4 Replies

Can a texture token refer to an operator set parameter string?

Is it possible to set a file texture path as a string in an operator setParameter node and then refer to the string with a texture token in an image node within a shader?

eg - setParameter:

string difcol = 'path/to/texture'


image filename:

<attr:difcol>


If so, what would the correct syntax be please if the above is wrong?

Tags (3)
Labels (3)
4 REPLIES 4
Message 2 of 5

With set parameter, you can create a user data string.

Then your should be able to use it like any other user data string with the <attr> token.

I haven't tried it.



// Stephen Blair
// Arnold Renderer Support
Message 3 of 5

It's not currently working for me in the way I have it written above, I wondered if it was a syntax issue?

Message 4 of 5

It works, but there's a known issue with the colon in Windows drive specifications like C:
They get replaced with an underscore. Here's a debug-level Arnold log that shows what happens:

00:00:00  2084MB         | initializing 15 nodes ...
00:00:00  2084MB         |  [operators] init op: 'aiSetParameter1'
00:00:00  2084MB         |  [operators] cook op: 'aiSetParameter1' | node: '/pSphere1/pSphereShape1'
...
00:00:00  2084MB         | node initialization done in 0:00.00 (multithreaded)
00:00:00  2084MB         | [operators] post cook op: 'aiSetParameter1'
...
00:00:00  2155MB ERROR   |  [texturesys] could not read resolved image filename = "C_/Users/blairs/Documents/maya/projects/default/sourceimages/noicon.jpg"

This is how a working setup looks in ass:

set_parameter
{
 name aiSetParameter1
 selection "/pSphere1/pSphereShape1"
 assignment "string myParam='Users/blairs/Documents/maya/projects/default/sourceimages'"
 enable_assignment 1
}
image
{
 name aiImage1
 filename "C:/<attr:myParam>/noicon.jpg"
 color_space ""
 missing_texture_color 0 0 0 1
}






// Stephen Blair
// Arnold Renderer Support
Message 5 of 5

I have it working now, thanks - I had my collection defined wrongly.

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

Post to forums  

Autodesk Design & Make Report