XNA UK User Group

A helping hand for bedroom coders throughout the land.
in

RandomChaos

Generic XNA - Fire

 

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>

Comments

 

Hergonan said:

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

May 7, 2008 1:12 AM
 

Nemo Krad said:

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.

May 7, 2008 9:37 AM
 

Kyle Hayward said:

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

May 7, 2008 3:54 PM
 

Nemo Krad said:

Nope, I have so much to read already :P

Will take a look though now you mention it :)

May 7, 2008 4:36 PM
 

James B Nelson said:

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?

May 8, 2008 4:40 PM
 

GameDevKicks.com said:

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

May 8, 2008 6:49 PM
 

Nemo Krad said:

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.

May 8, 2008 7:30 PM
 

J. Byron Nelson said:

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

May 9, 2008 6:44 PM
 

SomeYoungGuy said:

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

May 10, 2008 6:39 PM
 

Chan said:

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

May 20, 2008 11:07 PM
 

Nemo Krad said:

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..

May 21, 2008 9:26 AM

Leave a Comment

(required)  
(optional)
(required)  
Add

About Nemo Krad

Have been a professional developer since 1995. My skill set ranges from C/C++, VB6,MSSQL, Java Script, VB Script, HTML/ASP, Java, C#, ASP.NET as well as others. I started 3D and games development when the first release of XNA came out in December 2006 and have become addicted to it.