random texture for element

random texture for element

sislisokak
Explorer Explorer
2,027 Views
4 Replies
Message 1 of 5

random texture for element

sislisokak
Explorer
Explorer

hi there,

i just started to using arnold so got tons of questions.. but first of all is there a way to create random texture for elements? for example trees leafs..

i tried to use switch rgba but couldnt figure it how "how to generate random index for leafs id" ...

or am i missing something?

may be something like as vray's multitex or as forest pack's forest color? 

btw i use 3ds max 

 

0 Likes
Accepted solutions (1)
2,028 Views
4 Replies
Replies (4)
Message 2 of 5

madsd
Advisor
Advisor
Accepted solution

Hi,

You need to generate the ID yourself.

Do this with the Data Channel modifier adding a random ID pr. element on a channel, any channel will do, as long as you call that channel with a UVW map set to same channel in the shader.
Do note that this is a bit memory intensive when being generated and fills when rendering.

You can then use this Array and retrigger a reshuffle shade space.
Look at youtube for Mads Drøschler and find a video I did dealing with this, atleast I think I uploaded a video some years ago on the subject.

Do note, Arnold does not fetch or seed element IDs natively, it is a 3ds max native thing, Arnold works for many hosts so they arnt automatically just adding host centric features, I rose the issue years ago.

0 Likes
Message 3 of 5

sislisokak
Explorer
Explorer

thanks madsd actually i was trying your answer from 2019 🙂
"It's the other way around.
You use the Jitter to drive an RGBA Switch pluged into the index, and you make sure that the Jitter has the right data channel to work with, an Integer feed in greytones, based on forexample material ID pr face, or some other construct that generates the face ID for you.
Then you can use a randimize node and hit Shuffle and numbers will randomly populate.
Its same technic to do variated colors or textures on a tree with 1000s of leafs to create randomization.".. 

i just couldnt figure "randomize node" ... 

as i do understand "materialID-->color jitters "input"-->switch RGBA s "index"--->surface shaders "base color"..

and somewhere between  (color jitters "input"-->randomize node?-->switch RGBA s "index") if i m mistaken ... 

 

0 Likes
Message 4 of 5

madsd
Advisor
Advisor

Randomize, or shuffle node, could be both an Arnold Jitter node, or an OSL shader, one of the randomizers, set to Integer. The data you generate on the mesh through Data Channel will then react to a reshuffle.

Forgive me, it's been years since I touched the subject, I might need to go look at my own tutorial to learn how to do it 🙂

0 Likes
Message 5 of 5

dohh2008
Community Visitor
Community Visitor

So complicated