|
|
I was a bit too quick with my answer; there's another flaw in your code, which
will result the t-shirt color to be random, but still the same for all people:
> //------------------------------------------
> #declare kolorek = str((Rand_Array_Item(lors,RS))
>
> #declare chopek = union{
> [...]
>
> #local Index1 = 1;
> #local Index3 = 0;
> #while(Index1 <= 20)
>
> #local Index2 = 0;
> #while(Index2 <= 280)
>
> object {chopek translate <Index3, Index1*0.5, Index2*0.5> pigment { color
> kolorek }
> [...]
You pick the "kolorek" value before the loop. However, I guess you want to pick
the value at random for each element in the loop; in order to do this, the
structure of your code should be:
#declare chopek = union {
...
#while (...)
#declare kolorek = Rand_Array_Item(lors,RS);
object { chopek ... pigment { color kolorek } }
...
#end
}
That is, you need to explicitly pick a new color for every iteration of the
loop.
Post a reply to this message
|
|