Archive: Variable Velocity


2nd April 2003 07:34 UTC

Variable Velocity
Today is Gudi Padwa, the Hindu New Year and to celeberate it yesterday near the Thane City Lake there were organizers who bursted lots and lots and lots of firecrackers, and the sight was simply great. So, I decided to make a preset similar to those firecrackers.

I can use FireWurX, but I wanted different types of crackers, those going silently up in the air and exploding, making sparkles, etc,etc.

So, what I want is to make a particle scope which explodes on beat and all the particles have different velocities, something like in UnconeD's Groovy Saturn.
The particles also should have a different fade velocity, so that each particle will fade at a different time.
Is there anyway I can do this. I made something like that in C, but that uses arrays and typedef and structures.
All that isnt possible in AVS, and I cant use lots of variables, so I would like to know more about the fake particle engines and ransom :) (random ( that was a typo but I left it as it is ) ) generators.

Can someone please help me?


2nd April 2003 08:14 UTC

hmm you'll need to do a 3D scope that is a bit like the dot fountain renderer, so you can use it in diffrent angles an positions. Also you'll have to make sure that the next "explosion" can only start if the last has finished. Therefore you could use a var that fades the colors to black. if its black, te thing can be reinitialized.


2nd April 2003 10:48 UTC

What you said is the easy part, I can do that, but can anybody help me with the variable velocity of the particles thing?


2nd April 2003 11:03 UTC

Set certain seperate counters for the color values of a specific Area of the scope ond fade them. how you use depends on the amount of work you're willing to do. I would advise you to use max 20 of them. you shoud assign the spectrum/osc values to vars in the beginning.

RedColorArea1=RedColorArea1-RedColorCounter1

and this 60 times with a large if - chain


2nd April 2003 12:08 UTC

It could be done using a pseudo random number generator, where you just set the velocity eacy pixel to a pseudo random number, which will be the same each frame.


3rd April 2003 05:41 UTC

but how do you do that?


3rd April 2003 12:20 UTC

Look at some of UnConeD's particle presets. That weird code with the large numbers is the pseudo random number generator. I'll let you figure it out, or it will be really hard for you to adapt it to your uses.


3rd April 2003 21:06 UTC

something like a=bigprimenumber*a+smallprimenumber per pixel where a=0 per frame will mean that a is a different constant for each pixel drawn. the reason for the use of prime numbers is to make sure that a pattern doesn't form quickly.


7th April 2003 07:35 UTC

You missed " % number of distinct values you want " at the end of you equation Jheriko.

There are a few presets floating around the use them.


7th April 2003 07:56 UTC

Thanks for that. :p Thats gone unnoticed for 4 days.