PDA

View Full Version : FXWars! Fireworks! : mbaas


mbaas
12-09-2007, 08:04 PM
Hi,

as this round allows a more technical approach, I'll give it a try as well. I'm planning on doing a simulation that is based on what happens in real fireworks. So after I was doing some reading in the internet about the topic I started writing a Python script and included the following things in the simulation:


Each shell contains a number of stars and a number of break charges.
The shell can have a lift charge that burns for a while and provides thrust or it can just be fired from ground without that it provides its own thrust during flight. As long as the shell has not detonated yet, it is simulated as a single rigid body, i.e. in addition to the position and velocity, it also has an orientation and angular velocity.
When the shell detonates, the stars are released. The stars are simulated as particles that only have a position (no orientation). The initial velocity of the particles is determined by the break charge. For each volume element within the break charge, a force is computed whose magnitude decays with the squared distance. So the nearer a star to the break charge the more thrust it gets. The final force acting on a star is the sum over all break charge volume elements. I don't know if this models reality to some degree at all or if it's complete nonsense, but at least it appears to be reasonable to me and it gives some control over the directions where the particles are shot.
Anything that flies through the air is subject to a wind field and air drag.


Here is a first test animation that shows my current state: fireworks_test1.mov (http://i31www.ira.uka.de/~baas/fireworks/fireworks_test1.mov)

I have also attached two images that show the layout of the shells used in the test animation. The small black spheres are the stars and the gray sphere is the break charge. The white lines show the directions and magnitudes of the initial velocities of the stars at the time of detonation. The hull of the shell is not shown (but this one has little effect on the simulation anyway).
The first image has the stars scattered onto a sphere and a central break charge that will shoot the stars radially in all directions. This is the large third explosion in the test animation (in the animation it has a lot more stars than what is shown in the screenshot).
The second image shows the layout of the first two shells from the animation. The stars are arranged as before, but the break charge is moved further down. This means all the stars will be shot upwards. The stars that have those long white lines are those that are partially or entirely submerged in the break charge, whereas the ones on top that are far away from the break charge only have a moderate force acting on them.

The stars are rendered as bilinear patches that always face the camera and that have a shader applied that makes them look like a small glowing sphere.

Tools used so far: Python, cgkit, Aqsis.

- Matthias -

RobertoOrtiz
01-08-2008, 12:52 PM
Hey just a heads up,
There are 5 DAYS until the FINAL Dateline (http://forums.cgsociety.org/showthread.php?f=139&t=581456).

The deadline is on Friday January 12th 12:00 PM.
There WILL NOT BE ANY EXTENSIONS
Later,
-R

CGTalk Moderation
01-08-2008, 12:52 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.