shader random color by loose part
I make an extensive use of the array modifier to create walls, fences, etc... But when the object is finished I always need to separate by loose parts to use the object random parameter to vary the color. It would be far better if I could keep the object procedural. Is it possible to generate a random id by loose part? (it exists with vRay) Someone show an example here : blenderartists.org/t/cycles-random-color-for-loose-parts-of-the-mesh/675086
6 Comments
Just discovered that this can be achieved (now?) with the "Geometry" node in the shader workspace. The geometry node has a "Random per Island" output.
Pretty sure you can do this in Animation Nodes?
I know you can index array objects and probably apply a random viewport colour from there?
Someone check me on this?
@ammusionist: I think it's possible. I love animation nodes! But sometimes it's very quicker just to array a mesh with some loose part than to use animation nodes to duplicates a group of objects. (not to mention I use also the curve modifier to follow a curve)
You can do it manually with a noise texture and a dedicated uv map layout. check here how. blender.stackexchange.com/questions/73290/is-it-possible-to-randomize-color-of-separated-meshes-inside-1-object
A proper input would be great tho!
@alan zirpoli: Thanks Alan, but think this technics force you to apply the array modifier (this is what I want to avoid here)
"You can scale each mesh in UV space into a point" : you can't do this if you don't have acces to each loose part.
To build upon alan's comment, you can do this without applying the modifier. The modifiers has a UV section where you can define an offset in U and V separately. The offset wil be constant, but on a noise map will give the illusion of randomness. You still need a dedicated UV map where you scale your UV at zero though. Unfortunatly the modifier doesn't let you choose the UV you apply the offset to, so if you need an accurate UV map this won't fit for you