Jump to content

Unable to obtain stamp variable properly


Recommended Posts

Dear friends,

I am trying to place a different texture map on different boxes that have been copied to a grid.

In the 'uvquickshade' node I used this expression : $HIP/texture.`stamp("../copy1", "tex" , 2 )`.jpg to obtain the value of the texture file number (tex) which was calculated as a copy sop stamp variable.

However the copy stamping did not work and I always end up with the default value of 2, so only "$HIP/texture.2.jpg" is mapped to all the boxes.

What am I doing wrong?

I attached the zip of all required files.

Thanks

odforceEnquiry.zip

Link to comment
Share on other sites

Unfortunately you can't simply copy stamp materials like this. The UVQuickShade is applying a material and there's no way to copy/stamp that in this case since the material inside is just being assigned and Houdini is using whatever the values on the node currently are when displaying the textures in the viewer. You would probably be better of making 4 copies of the UVQuickShade with the specific textures assigned and using your stamp expression in a switch.

Link to comment
Share on other sites

Which is what I eventually did.

However I was hoping for a more elegant approach and what if I have more than 20 or 30 different textures which I want to randomly assign to copied objects...30 uvquickshades to a switch will be tough.

Thanks for your help Graham.

Edited by siberian711
Link to comment
Share on other sites

you can override texture on material by creating string attribute of the same name as texture parameter on material and vary texture path in that attribute per polygon using attribcreate, copystamping, vops, literally anything

you can as well define overrides in Material SOP

an example of varying textures:

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...