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

Blogs

RandomChaos

Syndication

 

Yes, I have been playing with fire! I have had this flame shader by NVIDIA (from the SDK) for ages now. I tried to implement in my olf RC3D Engine but it was a poor attempt and was of no real use to anyone, but I think I may have the beginnings of a decent implementation now. I have mixed the NVIDIA shader based on Yury Uralsky's "Volumetric Fire" with my billboard shader and billboard particle system and it seems to be playing quite well.

Take a look at the clip and let me know what you think.

http://www.youtube.com/v/ywhEuMNF19c <p><a href="http://www.youtube.com/v/ywhEuMNF19c">http://www.youtube.com/v/ywhEuMNF19c</a></p>


Posted Wed, May 7 2008 12:10 AM by Nemo Krad
Filed under: , ,

Comments

Hergonan wrote re: Generic XNA - Fire
on Wed, May 7 2008 1:12 AM

Your videos are good, but PLEASE use a different song/background sound next time... I am getting tired of listening to the same thing =/

Nemo Krad wrote re: Generic XNA - Fire
on Wed, May 7 2008 9:37 AM

LOL! OK, but my mate wrote the tune and I kind of like it, but then I have a few more I can use I guess. Lazy movie making eh....

Glad you like the clips.

Kyle Hayward wrote re: Generic XNA - Fire
on Wed, May 7 2008 3:54 PM

Looks pretty good. Have you seen the spherical billboards sample in Shader X5? It's pretty cool too.

Nemo Krad wrote re: Generic XNA - Fire
on Wed, May 7 2008 4:36 PM

Nope, I have so much to read already :P

Will take a look though now you mention it :)

James B Nelson wrote re: Generic XNA - Fire
on Thu, May 8 2008 4:40 PM

Nice flame!  I've not investigated the nvidia shader yet but have worked the rendermonkey version into my game.  I'm guessin the nvida shader works similarly by varying where it looks into a 1d texture?

GameDevKicks.com wrote Generic XNA - Fire
on Thu, May 8 2008 6:49 PM

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

Nemo Krad wrote re: Generic XNA - Fire
on Thu, May 8 2008 7:30 PM

Hi James,

Well will try and explain it here, I pass a "flame" 2D texture which is used for the flame base color and also a 3D noise texture. There are two methods in the shader to generate the 3D noise, but I put it through FX Composer and saved the textures to file and use those. This noise texture is passed a set of coords that are generated from the billboards world position multiplied by a noise scale, frequency plus time multiplied by time scale and noise animation velocity. This coord is then put through a turbulence function to get the y UV of the 2D texture the result giving us the funky flame effect.

The shader is a fair bit different from the NVIDIA original as the original shader was for a static number of panels used to generate the volumetric flame effect. I guess this method takes some of the volume away, but this can e made up for with it being put into a particle context.

Guess you will see what I mean when I post it.

J. Byron Nelson wrote re: Generic XNA - Fire
on Fri, May 9 2008 6:44 PM

Nice explanation.  From what you describe it does essentially the same thing the Rendermonkey flame shader does, but your flame tips are coming out much better.  Good work, I'm glad someone is putting up good examples like this

SomeYoungGuy wrote re: Generic XNA - Fire
on Sat, May 10 2008 6:39 PM

I say leave the music as is if dude don't like it he can mute it. Oh and great vids!!

Chan wrote re: Generic XNA - Fire
on Tue, May 20 2008 11:07 PM

Cool man! but try to put more clear color fonts the next time, i wasn't able to read almost any comment

Nemo Krad wrote re: Generic XNA - Fire
on Wed, May 21 2008 9:26 AM

The clips and there text are fine until I put them on YouTube, they must do a bit more compression on them so sometimes kills the clarity.. Sorry..