On 28/02/2014 at 14:45, xxxxxxxx wrote:
I want to assign every object a unique Color in the editor, the script works so far, but I am having trouble spacing and feeding the color vector with adequate numbers to have enough differentiation and not to exceed the 3 integers.
lets say I have 254*254*254 = 16387064 Colors at my disposal and I have 2Mio Objects. How do i feed the vector with a spacing (color differentiation) while having 3 parameters.
The cherry on top would be to exclude black, and white.
counter = 2000000 # e.g. Number of Objects step = (1/float(counter)) # somehow gives me a step but not robust def getcolor (step, counter, secondcounter) : colorvec = (step * secondcounter) color = c4d.Vector(colorvec , colorvec , colorvec) # of course this alters all three vectors which limits me in color spacing .... return color
thanks for your help in advance.