PDA

View Full Version : Coloring with part id?



StereoMike
06-12-2009, 09:00 AM
Is there a way to get down to the parts level with node surfacing? I thougt of getting the part id, making a random number between 0 and 1 out of it, and assign it a color via gradient (e.g. 4 blocks of colors on it), so I could have a single material for a dozen color variations.
My only problem is, that I can use dponts displacement nodes to move parts and polys, but I can't use them when surfacing.
Is there a way?

Thank you,
mike

dpont
06-12-2009, 10:17 AM
It has the disadvantage to take more memory,
if you already use it as displacement,
Part Info node works only if it is connected
to Part Move node,
so let say you have a spectral gradient from
0 to 1 and around 1000 parts in the mesh,
this node tree works,

74312

Denis.

DrStrik9
06-12-2009, 02:29 PM
I loaned my brain to someone and never got it back ... can I borrow yours? :-)

StereoMike
06-12-2009, 05:02 PM
Thank you Denis! Works great!
I just added a bit to make it work for any amount of parts by adding another gradient.
The first picture shows the initial node setup. Colors seems to cluster based on index number (occurs if you use automatic creation methods with consecutive indices).
Second image: I added a repeating gradient instead of a fixed multiplication and voila its totally random (hey I'm proud of having managed that myself :) ).
Third image: If you take the part move out of the setup, each side of the cubes gets a random color (don't know if it's based on orientation, part index or large hadron collider, just found it by accidence).
Thanks a lot Denis!
That way I can e.g. throw a hundred cloned pens through the air and each of them has one of 10 different colors on the tip /grip.

mike