PDA

View Full Version : Random particle colors


revert
10-30-2003, 06:03 AM
Can anyone advise on writing a creation expression to randomize particle colors within a specified range? I.E. dark green to light green?

Thanks.

Nicool
10-30-2003, 09:10 AM
If I remember right... Their is an expression given in the doc a an example to change the color of the particles function to the time (or their age)... Try putting this expression function to a random();

Bolga

mtheory
10-30-2003, 01:55 PM
select your particle go to Add Dynamic Attributes > click Color...if your choose Add Per Particle Attribute it will as a rgbPP attribute.

Right click that and add a random(0,255) expression..or whatever range you wantdicated by the number values you use. A creation expression should be fine.

pretty sure that'll do it

revert
10-31-2003, 12:37 AM
Thanks for the help guys.

j00ey
10-31-2003, 01:43 AM
something along the lines of

**value**=<<(rand(x,y)),(rand(x1, y1)),(rand(x2,y2))>>;

where **value** is node.rgbPP [or whatever the correct syntax is].

have your colour picker open, choose your dark green and copy the rgb values to x, x1, x2. then choose your light green and copy rgb's to y, y1 and y2.

hope that helps.

j00ey

revert
11-01-2003, 04:01 PM
Thanks for that j00ey.

CGTalk Moderation
01-16-2006, 12:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.