PDA

View Full Version : Random Expression on a ramp


Pyrokinesis
07-22-2006, 03:59 PM
Hello,
I am creating fireworks, and trying to randomize the colors of the explotions using ramps, giving a more dynamic and interesting effect.
To be more clear I want to write random expression on both ends of a ramp.

"ramp3.colorEntryList[0].color"

is the expression target for one end of the ramp, cant seem to figure out how to apply the random function on it. Any help would be much appreciated =)

rokandic
07-22-2006, 04:53 PM
You could simply use setAttr like:
setAttr "ramp3.colorEntryList[0].color" -type double3 (rand(1)) (rand(1)) (rand(1));

to assign random color.

-rok

CGTalk Moderation
07-22-2006, 04:53 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.