Page 1 of 1

Random color per object

Posted: Wed Jan 15, 2020 12:06 am
by agnes_io
I know you can get random color per instance, but it would be very useful if it was possible to get a random color for any object in the scene, like redshift and arnold can do, to use for texture offsets or color offsets. There is a workaround to use mograph but that is not always practical.

Is there any way to do this in OSL?

Re: Random color per object

Posted: Wed Jan 15, 2020 8:34 am
by bepeg4d
Hi,
you can do it also with c4doctane, with a couple of clicks.
Select all the desired objects, apply an Octane Object tag, and enter num in the Instance ID field, to assign a different sequential number to each object.
Then use the Instance Range node to pilot a gradient, or an OSL random projection node:
880CD5A2-BD7A-4219-9A31-73F771A86CC4.jpeg
ciao Beppe

Re: Random color per object

Posted: Tue Jan 21, 2020 12:23 am
by agnes_io
Great tip, thanks!

But where is the OSL random projection node? Can only see 'OSLProjection' which doesn't seem to do much...

Re: Random color per object

Posted: Tue Jan 21, 2020 9:11 am
by bepeg4d