Jump to content

random texture assignment


artzor

Recommended Posts

hi guys,

i'm doing a little project for a friend and need some help...

i want to scatter points on a surface and then use a copy sop to get a bunch of random planes, and i want them to have different textures

so i'm thinking somehow getting rand($PT) from the scattered points into the material to drive a switch operator which just has different textures coming into it...

but i can't get it to work :(

thanks!

Link to comment
Share on other sites

thanks AndrewVK, but i do really want to learn how to do this myself :)

-edit -

haha, figured it out, you can just stamp a rand($PT)

and then in a material operater add a local overide with the stamp as an integer value...

houdini is niiiiicccceee!!!

Edited by artzor
Link to comment
Share on other sites

working great :)

which leads me to the next challenge, how this applies to instanced points instead of scattered points...???

Turn on "Use Template Point Attribute" (Copy Sop -> Attribute Tab )

Put this string: shop_materialpath material_override

to "To Primitive" field

Link to comment
Share on other sites

thanks again AndrewVK :)

my last question on this subject, my shader setup is quite tedious now...

i've stamped a rand($PT) and put that through to local overides in the material op.

then i'm using the local overide parameter to flip a switch node which has lots of strings(images) going into it...

is there a way to get the local overide parameter into one string,

so if i have images 0.jpg, 1.jpg 2.jpg etc i can just go images\`switcher`.jpg

make sense?

edit : it works with paramters like `$F` in the string name but i can't seem to get the value from the local overide (which came from copy stamping)

Edited by artzor
Link to comment
Share on other sites

  • 5 years 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...