Page 1 of 1

Random color no instances

Posted: Fri Apr 03, 2020 8:18 am
by roy_orengo
Hi all,

I would like to ask if someone could help me about randomize the colour of one single material applied to different copies of one objects (not blocks and instances).
In this image, all the objects have the same material (with random colour texture applied). The cubes are instances so they show correctly the different colours.
The planks are not blocks, only some copy of the same object, so they are different Polysurfaces in Rhino. There is some way to apply to that planks too one single material with variations as the instances doing? I mean, each single planks have their ID, why they don't show the random colours? There is some other trick to make this?

Roy

Re: Random color no instances

Posted: Fri Apr 03, 2020 8:37 am
by bepeg4d
Hi Roy,

sorry, I’m not a Rhino user, but you need to assign a different Instance ID, in the Object Layer settings, to every block, then you can use the Instance Range node, please have a look at this OSL projection script, there is a Standalone example:
viewtopic.php?f=73&t=69211&hilit=random+osl+projection

ciao Beppe

Re: Random color no instances

Posted: Fri Apr 03, 2020 9:26 am
by roy_orengo
Hi Beppe,

thank you very much for your message.
This is exactly what I need!
But I don't know how to assign different ID tags to the Rhino Objects inside Rhinoceros. I mean, each object as one ID like this one in Rhino: "ID: 5a61a9cf-5977-4601-aadf-8e806e410c5e (851)" but if I apply the OSL material to all the objects nothing happens. Someone could help me with this?
Thanks again,
Roy

Re: Random color no instances

Posted: Sat Apr 04, 2020 11:44 am
by roy_orengo
Hi, Beppe,
I've finally found where to set differents layer for objects in rhino. but I receive this error with the BGrandomUVtex.
Thanks again,
Roy

Re: Random color no instances

Posted: Mon Apr 06, 2020 9:27 am
by bepeg4d
Hi Roy,
it seems that the osl script has been loaded as an osl texture, not as an osl projection node :roll:
Did you load it in a Projection node in OSL projection mode?

Try to save the material in Standalone, then import back in Modo via LocalDB, does it work in this why?

ciao Beppe

Re: Random color no instances

Posted: Fri Apr 10, 2020 5:42 pm
by roy_orengo
This is what I See in Octane Render Plugin (No random)
This is what I See in Octane Render Plugin (No random)
I receive this error when I edit the material in Rhino
I receive this error when I edit the material in Rhino

Hi Beppe,

I think I did the mistake you told me.

Anyway, I've copied the material inside RHINOCEROS but I can't see the random projection. I think I have not given the right differents ID (I don't' know now if it is possible to do in Rhino). Do You have any suggestion? Your OSL is wonderful, I would like to use it in RHINOCEROS...
Thanks,
Roy

Re: Random color no instances

Posted: Mon Apr 13, 2020 8:02 am
by bepeg4d
Hi Roy,
sorry, not a Rhino user, but you should need to find a way to assign different Instance IDs to the single pieces, probably via Geometry tab.
ciao Beppe

Re: Random color no instances

Posted: Tue Apr 14, 2020 8:00 am
by roy_orengo
Ciao Beppe,

ok, i will try,

thanks,

Roy