XNA UK User Group
A helping hand for bedroom coders throughout the land.
Generic XNA - 3D Fire Sample

Blogs

RandomChaos

Syndication

Hope the music is acceptable this time...

http://www.youtube.com/v/y-txtVQ7rUU <p><a href="http://www.youtube.com/v/y-txtVQ7rUU">http://www.youtube.com/v/y-txtVQ7rUU</a></p>

Sorry about the quality of the clip, it was a 20MB clip, but I think youtube has crunched it up adn so it has lost some quality....

OK, here is the code sample for the flame shader I have adapted from NVIDIA's Volumetric Flame shader. The emitter class is pretty much the same as the billboard particle samples in my earlier posts, the real work is in the shader. I took the original NVIDIA flame shader and merged it with my billboard shader resulting in the sample you see here.

Now the emitter given in this sample is very basic, but I am sure you will be able either derive from it or use it as a template for your own flame emitter.

I have had a few requests regarding a 2D version of the shader so I am going to look at applying it to a 2D context.

Solution can be located here.


Posted Fri, May 9 2008 8:42 PM by Nemo Krad

Comments

Hergonan wrote re: Generic XNA - 3D Fire Sample
on Fri, May 9 2008 9:47 PM

Nice work!

And I like the music as well ;P

Nemo Krad wrote re: Generic XNA - 3D Fire Sample
on Mon, May 12 2008 11:26 AM

Good :)

Will have to dig out another unused tune for the next one....

GameDevKicks.com wrote Generic XNA - 3D Fire
on Mon, May 12 2008 1:04 PM

You've been kicked (a good thing) - Trackback from GameDevKicks.com