Random color per object

Forums: Random color per object
Maxon Cinema 4D (Export script developed by abstrax, Integrated Plugin developed by aoktar)

Moderator: aoktar

Random color per object

Postby agnes_io » Wed Jan 15, 2020 12:06 am

agnes_io Wed Jan 15, 2020 12:06 am
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?
agnes_io
Licensed Customer
Licensed Customer
 
Posts: 24
Joined: Thu May 28, 2015 12:16 pm

Re: Random color per object

Postby bepeg4d » Wed Jan 15, 2020 8:34 am

bepeg4d Wed Jan 15, 2020 8:34 am
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
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 9959
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Re: Random color per object

Postby agnes_io » Tue Jan 21, 2020 12:23 am

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

But where is the OSL random projection node? Can only see 'OSLProjection' which doesn't seem to do much...
agnes_io
Licensed Customer
Licensed Customer
 
Posts: 24
Joined: Thu May 28, 2015 12:16 pm

Re: Random color per object

Postby bepeg4d » Tue Jan 21, 2020 9:11 am

bepeg4d Tue Jan 21, 2020 9:11 am
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 9959
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Return to Maxon Cinema 4D


Who is online

Users browsing this forum: Bing [Bot], jayroth2020 and 26 guests

Fri Apr 26, 2024 3:24 am [ UTC ]