Random color node - how to limit

Forums: Random color node - how to limit
Generic forum to discuss Octane Render, post ideas and suggest improvements.
Forum rules
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB

Random color node - how to limit

Postby portnicki » Mon Aug 04, 2014 8:49 am

portnicki Mon Aug 04, 2014 8:49 am
Hey all,

this is probably smth real easy but I'm stuck at it.

I have 50 instances of an object (working in modo). I want to randomly color them all either pink or green.
I do not want any other colors that are in between. I want Octane to choose a solid color from a two-item group (pink and green) and put it on an instance.

We all know what random color node does. I guess hooking up a some kind of node to the "Amount" pin in the Octane mix texture would help me ... but which one sould it be?
It should choose 0 or 1 value fromy my set of colors, not all the values in between.

Thanks!
i7 2600k + nVidia TITAN black
https://www.behance.net/Auror
User avatar
portnicki
Licensed Customer
Licensed Customer
 
Posts: 124
Joined: Mon Mar 10, 2014 9:28 am
Location: Warsaw

Re: Random color node - how to limit

Postby rappet » Mon Aug 04, 2014 10:08 am

rappet Mon Aug 04, 2014 10:08 am
Good quest. I like to know how to do that too.

But if you are in a hurry and working with csv file,
In the meanwhile you could split the csv in two csv files
(you can do that with excel and randomize the order before splitting).

Greetz,
User avatar
rappet
Licensed Customer
Licensed Customer
 
Posts: 1962
Joined: Fri Apr 06, 2012 3:57 pm
Location: The Netherlands

Re: Random color node - how to limit

Postby portnicki » Mon Aug 04, 2014 10:16 am

portnicki Mon Aug 04, 2014 10:16 am
yep,
for the time being I've just rendered two passes - with green and pink instances, and simply masked some of them off in Photoshop.

Image

But if this were strands of grass or smth like that (I mean a lot of instances, very close to each other and mixing in strong DOF areas) this work-around wouldn't work :(
i7 2600k + nVidia TITAN black
https://www.behance.net/Auror
User avatar
portnicki
Licensed Customer
Licensed Customer
 
Posts: 124
Joined: Mon Mar 10, 2014 9:28 am
Location: Warsaw

Re: Random color node - how to limit

Postby riggles » Mon Aug 04, 2014 4:10 pm

riggles Mon Aug 04, 2014 4:10 pm
Yeah, I was wondering how to go about doing this, too, except in the MODO plugin. Seems Octane will only blend between two color values, not select one of the other. It's a bummer because then using texture maps with the random color node would work properly, too.
riggles
Licensed Customer
Licensed Customer
 
Posts: 493
Joined: Mon Feb 17, 2014 3:34 pm
Location: CT, USA

Re: Random color node - how to limit

Postby Phantom107 » Mon Aug 04, 2014 4:34 pm

Phantom107 Mon Aug 04, 2014 4:34 pm
Would be awesome if I could tie a color to each seperate instance somehow in the CSV files...
User avatar
Phantom107
Licensed Customer
Licensed Customer
 
Posts: 686
Joined: Tue Jul 24, 2012 11:31 am
Location: The Netherlands

Re: Random color node - how to limit

Postby glimpse » Mon Aug 04, 2014 5:39 pm

glimpse Mon Aug 04, 2014 5:39 pm
Phantom107 wrote:Would be awesome if I could tie a color to each seperate instance somehow in the CSV files...


why not to have 3,4,5..etc.. set of instances (with slightly different colors)? just an idea..
User avatar
glimpse
Licensed Customer
Licensed Customer
 
Posts: 3715
Joined: Wed Jan 26, 2011 2:17 pm

Re: Random color node - how to limit

Postby Phantom107 » Mon Aug 04, 2014 5:50 pm

Phantom107 Mon Aug 04, 2014 5:50 pm
glimpse wrote:
Phantom107 wrote:Would be awesome if I could tie a color to each seperate instance somehow in the CSV files...


why not to have 3,4,5..etc.. set of instances (with slightly different colors)? just an idea..


That's possible in 1.5. :) (I don't mean to hijack the topic)

I think Octane could improve a lot with more texture generators overall. (Based on randomness, distance from the camera, etc)
User avatar
Phantom107
Licensed Customer
Licensed Customer
 
Posts: 686
Joined: Tue Jul 24, 2012 11:31 am
Location: The Netherlands

Re: Random color node - how to limit

Postby portnicki » Mon Aug 04, 2014 8:55 pm

portnicki Mon Aug 04, 2014 8:55 pm
glimpse wrote:
Phantom107 wrote:Would be awesome if I could tie a color to each seperate instance somehow in the CSV files...


why not to have 3,4,5..etc.. set of instances (with slightly different colors)? just an idea..



yes, I thought of that after I rendered the passes. If I had a more complicated scene I think that would be a best workaround.

cheers
i7 2600k + nVidia TITAN black
https://www.behance.net/Auror
User avatar
portnicki
Licensed Customer
Licensed Customer
 
Posts: 124
Joined: Mon Mar 10, 2014 9:28 am
Location: Warsaw

Re: Random color node - how to limit

Postby smicha » Mon Aug 04, 2014 9:56 pm

smicha Mon Aug 04, 2014 9:56 pm
portnicki wrote:Hey all,

this is probably smth real easy but I'm stuck at it.

I have 50 instances of an object (working in modo). I want to randomly color them all either pink or green.
I do not want any other colors that are in between. I want Octane to choose a solid color from a two-item group (pink and green) and put it on an instance.

We all know what random color node does. I guess hooking up a some kind of node to the "Amount" pin in the Octane mix texture would help me ... but which one sould it be?
It should choose 0 or 1 value fromy my set of colors, not all the values in between.

Thanks!



YOUR PROBLEM IS SOLVED!
Look here
viewtopic.php?f=73&t=41388
I just come out with an idea and Marcus coded it. Just use colored texture instead of color.

PS. Jak coś to pisz :) Pozdro z wawy.
3090, Titan, Quadro, Xeon Scalable Supermicro, 768GB RAM; Sketchup Pro, Classical Architecture.
Custom alloy powder coated laser cut cases, Autodesk metal-sheet 3D modelling.
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
User avatar
smicha
Licensed Customer
Licensed Customer
 
Posts: 3151
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

Re: Random color node - how to limit

Postby abstrax » Tue Aug 05, 2014 2:10 am

abstrax Tue Aug 05, 2014 2:10 am
That would be the way I would do it:
2_color_scatter.orbx
(18.75 KiB) Downloaded 352 times

Until we have the ability to switch off interpolation in the gradient texture you can achieve a similar result by adding two gradient control points with the same position:
2_texture_scatter_graph.png

This is how the gradient node looks like:
2_texture_scatter_gradient.png

Packed everything together into a node graph you get a nice and easy to use interface:
2_texture_scatter.png

I hope that helps.

Marcus
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
User avatar
abstrax
OctaneRender Team
OctaneRender Team
 
Posts: 5484
Joined: Tue May 18, 2010 11:01 am
Location: Auckland, New Zealand
Next

Return to General Discussion


Who is online

Users browsing this forum: No registered users and 12 guests

Thu Apr 18, 2024 2:37 am [ UTC ]