Page 1 of 1

Random material_color_texture per instance

Posted: Thu Aug 09, 2018 5:31 am
by lacilaci
Hi,
In cycles you can assign a random color/texture for a material and use gradient ramp to drive what input will be present more over others, then each object/instance that has this material will have those attributes randomized.

In max there is even a plugin called mlutitexture that allow to load a set of textures and then assign them per object, or per mesh element(that is like an uv island in blender but not defined by uv seams but loose/unconnected geometry)

I think the best way would be to have a node that allows to either use color per input(custom number of inputs) or load a texture as an input. Then each input could have a % parameter to be able to define how often that input is present and even better if the inputs of that node could take in also materials. Then apply those randomized materails per object/instance (blender doesn't know mesh elements as a component afaik.)

Another way, if possible, would be having something like "Object Info" node from cycles(attached image O_info).

For example this Object info node can be used as input in other nodes to randomize various parameters.
This allows for grass patches in particle systems to use a single texture that you can input into hue/saturation node as color but at the same time in saturation input you put random from object info and this randomizes saturation of the texture per object/instance in the particle system or all objects that have this material. You can get nice natural variations easily. To control how strong is the randomization in cycles you can use colorramp node inserted between random and whatever is the next input(image- Random.jpg).

Downside of the random/Object info is that you can't load or specify a list of textures so it makes it a bit more complex if you want to use many textures. So another node could be useful "image texture list" that would for example be able to load a full folder of textures.

Re: Random material_color_texture per instance

Posted: Thu Aug 09, 2018 4:17 pm
by B.Y.O.B.
This feature is also on my wishlist since a while.
I also tried to implement it once, but it is not super trivial, so I'll need a bit help from Dade.

Re: Random material_color_texture per instance

Posted: Thu Aug 09, 2018 4:49 pm
by lacilaci
B.Y.O.B. wrote: Thu Aug 09, 2018 4:17 pm This feature is also on my wishlist since a while.
I also tried to implement it once, but it is not super trivial, so I'll need a bit help from Dade.
I see, in my simple mind I was hoping you could just make cycles nodes work with luxrender :D.
Besides the randomization also triplanar(i think i saw it in the poll) and the new AO node would be helpfull for objects not having UV's.