Embers


Download embers.zip

This is a quick model I rustled up after admiring the floaty explosion particles in Team Fortress 2. I liked the idea of having something similar in classic quake, but I was mostly just after a project that would involve lots of practice with the gmax animation controls. One evening later, here’s the end result.

To try it out, extract the contents of the zip file into a folder called “embers” in your quake directory. Then run your engine of choice with -game embers and try firing the rocket launcher at things. The test code gets rid of the usual explosion particles to make the effect easy to see, but I don’t know if I’d leave them out in a proper mod.

The effect looks best in an engine which supports both fullbrights and interpolation. The model has been rendered at 20fps rather than the usual 10fps most quake models run at, in order to help preserve some fidelity in engines without interpolation. It really does work well in winquake. Engines without fullbrights tend to be worse off, as the particles don’t ‘pop’ without them and in stock glquake are often quite hard to see.

The source code included is fairly straightforward, look for the functions spawn_embers and ember_loop. It’s important to notice the 0.05 nextthink time used to get 20fps animation. The embers get given a small upwards velocity which keeps them moving every frame in engines without interpolation. It probably isn’t too important though, because it was broken for most of the testing and I didn’t even notice…

Finally, even though the last frame is entirely empty of polygons, don’t forget to render it! This makes sure that on engines which support interpolation the embers shrink to nothingness, and does no real harm on engines which don’t.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s