View Full Version : random colored lights with TP
interactiveBoy 01-08-2007, 06:12 PM Without bogging down into details of this project, I'll just say that I'm trying to use Thinking Particles to create random colored lights. I'm only using the flares from the lights (no illumination at all). I've tried making an expression that chooses three random real numbers and feeding that into a Reals2Vector then feeds that into my light that is used as my particle. The color changing works, but it changes ALL of my particles simultaneously.
How can I have a single light source used as a particle and get a whole bunch of randomly colored lights from it? Also I should mention that each light will shift it's color randomly over time. The particles only last for 2 to 3 frames, so the end result is a whole lot of randomly colored lens flares. Or I should say, that is the goal.
Thanks for any insights.
Gary
|
|
Per-Anders
01-08-2007, 07:02 PM
With TP you have to animate the light first, so you animate it in a bunch of colors, then you simply use the random value ot offset the age value of each particle.
Really for something like this mograph is so very very much easier (just create the cloner, apply a random effector to it and set it to affect the color).
interactiveBoy
01-08-2007, 07:03 PM
Thanks that's what I was missing is the age value. I'll give that a try.
interactiveBoy
01-08-2007, 07:07 PM
sorry - I've looked in both PStorm and PBorn and don't see an age parameter. Perhaps it is 'animation time'?
I'll mess with that and see what I come up with.
Thanks
interactiveBoy
01-08-2007, 07:14 PM
ok found it in the psetdata.
interactiveBoy
01-08-2007, 09:15 PM
ugh. I admit I have not done much with TP yet, and I don't have Mograph. I just can't seem to get this to work. The particle life time is about 3 frames. (think of a whole bunch of flashing lights, like from the crowd of a football game taking pictures - only the flashes all need to be random colors.
When I try to send a number to the age parameter in the psetdata node, my particles don't show at all. I can't seem to find a real to time converter either, so just for testing, I used a constant node. This makes the particles show again, but has the adverse affect of making all the particles use the same color from the animated light. Also, since I only want to show my particles each for around 3 frames, setting the constant higher than 3 (even though there are about 30 frames of animated colors in my light) makes the particles not show at all.
I'll keep hacking - but I must be missing something very easy here.
Per-Anders
01-08-2007, 09:19 PM
I believe the value goes from 0% to 100% i.e. 0.0 to 1.0 for age, 1.0 being where the particle dies, any higher or lower than that and the particles will be dead.
interactiveBoy
01-08-2007, 09:29 PM
Thanks per, and that absolutely makes sense, but anyvalue over 0 (between 0 and 1) and my particles are not generated. If I set a constant node to 0 and feed it in to the age param, the particles appear. Man I feel dense. I just know I'm missing something obvious.
Check this http://www.3dattack.net/forum/showthread.php?t=4731&highlight=redshift
For that challenge i created a setup that manipulates the age of particles to change their color.
Cheers
Björn
interactiveBoy
01-09-2007, 11:19 PM
Thanks srek! I will look into the file you provided in that thread.
Best,
G
CGTalk Moderation
01-09-2007, 11:19 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.