Color variation on multi sub material
#3
(02-19-2022, 04:04 AM)tyFlow Wrote: You could try the Instance ID operator...that assigns a gbuffer value to particles which Arnold may be able to interpret (not sure if the Arnold devs implemented that, but it should work in VRay, for example).

An alternative way would be to create a Gradient Ramp texmap, set interpolation mode to solid and then evenly space your 10 colors apart in the gradient. Then in tyFlow, use a Mapping operator to assign a mapping override to particles. Set the override value to 1 and variation to 100%. Since that will assign a random X-coordinate (between 0-1) to your particle's UVW channel, they will effectively choose one of your 10 colors in the gradient ramp you apply to them at random.

Thank you for your prompt reply.

I've tried the gradient ramp method, but i don't seem to be able to get it working.
The preview on the viewport seems fine, but when rendering, all the objects are of the same color. To be more precise, it's only showing the first color on the gradient ramp.

In Arnold, i was able to create an OSL shader that returns the particle ID, and get the color variation working. Still doing some tests to check if it's working ok.
  Reply


Messages In This Thread
Color variation on multi sub material - by JoaoPS - 02-18-2022, 07:22 PM
RE: Color variation on multi sub material - by JoaoPS - 02-21-2022, 03:49 PM

Forum Jump: