the best way to make good looking fire?
i''d like to know the best way to make some realistic 3d fire, similar to the torch flames you see in the hallway scene of glExcess. how is that done? is it just tons of tiny particles, or large detailed sprites that keep changing?
please explain how i can get this done...if it is really just particles, please tell me the "movement" math in order to move the particles in a manner that will simulate a torch flame...i understand particles well but im not good at math!
thanks for help
Hey there, I don''t really know this, but this is my best guess. I believe that for a good effect you might have crossing sprites or 2D double faces along with a nice particle effect to fill it all out. Perhaps you should e-mail the makers of glExess and ask... I think that would be best, because their meathod (whatever it is) seems to look good and be very efficient. That''s all I could say.
Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
Alex BroadwinA-Tronic Software & Design-----"if you fail in life, you were destined to fail. If you suceed in life, call me.""The answer is out there.""Please help, I'm using Windows!"
Hi,
I haven''t seen the demo you are talking about. But yes, a good way to implement fire is with particle.
As for the math, if you do not know what is a vector, I really suggest you to buy a good book. :-) It will explain the math better than any message posted on that board. You''ll get plenty of exercises in the book.
To keep it short, a particle as a longevity (how long does it live? 1 sec? 5 secs?). It has a direction (a vector(x, y, z)). This is about all you need for each particle.
Then you need an object that we could call a ParticlesGenerator that generates the particles in the system (initializes each particles). It creates the particle, assigne the color and the direction and so on.
This is not very complicated. But if you do not understand the maths, it can be a daunting task. :-)
Patrick Lafleur
System Engineer
Creation Objet Inc.
I haven''t seen the demo you are talking about. But yes, a good way to implement fire is with particle.
As for the math, if you do not know what is a vector, I really suggest you to buy a good book. :-) It will explain the math better than any message posted on that board. You''ll get plenty of exercises in the book.
To keep it short, a particle as a longevity (how long does it live? 1 sec? 5 secs?). It has a direction (a vector(x, y, z)). This is about all you need for each particle.
Then you need an object that we could call a ParticlesGenerator that generates the particles in the system (initializes each particles). It creates the particle, assigne the color and the direction and so on.
This is not very complicated. But if you do not understand the maths, it can be a daunting task. :-)
Patrick Lafleur
System Engineer
Creation Objet Inc.
-nosfy Lead programmerCreation Objet Inc.Zone Sudoku: une grille gratuite à chaque jour
The GLExcess fire was indeed done with particles. The following is how I would do a similar effect.
Each particle is a front-facing poly with a circular gradient on it (yellow in the middle through red and finally to deep red at the edges). These particles are rendered using additive blending (the flame gets brighter in regions where more particles overlap). The particles begin large and as they rise up (slowly accelerating upwards) they shrink (reducing scale). Each particle starts at approximately the same point (randomly offset a little bit) and given a random velocity along a random direction vector somewhere between 0 and 45 degrees from vertical. As the particle travels along this path it is drawn towards the centre of the flame making the particles path curve inwards. Remember that the particle is also shrinking during this time, so you end up with the pointed effect at the top of the flame.
Steve ''Sly'' Williams Code Monkey Krome Studios
Each particle is a front-facing poly with a circular gradient on it (yellow in the middle through red and finally to deep red at the edges). These particles are rendered using additive blending (the flame gets brighter in regions where more particles overlap). The particles begin large and as they rise up (slowly accelerating upwards) they shrink (reducing scale). Each particle starts at approximately the same point (randomly offset a little bit) and given a random velocity along a random direction vector somewhere between 0 and 45 degrees from vertical. As the particle travels along this path it is drawn towards the centre of the flame making the particles path curve inwards. Remember that the particle is also shrinking during this time, so you end up with the pointed effect at the top of the flame.
Steve ''Sly'' Williams Code Monkey Krome Studios
Lets all make this easier for softslice... Check out nehe''s particle tutorial at: http://nehe.gamedev.net/tutorials/lesson19.asp
All the info you could possibly need. Then, if you''re making games and like cool books, buy the book NeHe is talking about. It''s called "OpenGL Game Programming" and has extensive info on particle systems along with tons of other great stuff. Check out the table of contents from nehe''s link on his site.
Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
All the info you could possibly need. Then, if you''re making games and like cool books, buy the book NeHe is talking about. It''s called "OpenGL Game Programming" and has extensive info on particle systems along with tons of other great stuff. Check out the table of contents from nehe''s link on his site.
Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
Alex BroadwinA-Tronic Software & Design-----"if you fail in life, you were destined to fail. If you suceed in life, call me.""The answer is out there.""Please help, I'm using Windows!"
Particles are a *great* way to get good looking fire, but not only are there more ways to do it though, but Particles are fairly slow. But if you are just looking for something pretty, and speed isn''t a factor, use particles.
Another way to generate fire (that I *believe* Unreal uses) is using procedural textures. Which are like normal textures, except you use code to generate them. Just another option, I haven''t tested it out yet though, so I can''t tell you if I like it or not. It sounds like a great idea though.
------------------------------
Trent (ShiningKnight)
NovaStorm Games
Project: OpenGL baby. None of that new-fangled Die-rect Three Dee
Another way to generate fire (that I *believe* Unreal uses) is using procedural textures. Which are like normal textures, except you use code to generate them. Just another option, I haven''t tested it out yet though, so I can''t tell you if I like it or not. It sounds like a great idea though.
------------------------------
Trent (ShiningKnight)
NovaStorm Games
Project: OpenGL baby. None of that new-fangled Die-rect Three Dee
thanks guys, but i do know how to make particles and all that good stuff, i can make a particle engine from scratch if i had to, but i just need an algorithm or something that will make the particles rise up in that kind of arc. like on a flame, its fat on the bottom and small on the top but its not a cone, its got a round bottom that curves to a point on the top....so how would i make the particles fly in that kind of manner? if it involves sin/cosine or something, i''m lost, because i dont know how that type of math works.. so any help?

Easy enough. Create gravity control points. Put one at the top. Start all particles on a trajectory away from the flame''s cone. Then have each particle''s trajectory move slightly towards the gravity point at the tip of the flame each time it is moved (or on a timed basis). Then have the particle be destroyed once it reaches the control point. Tada, arched flame effect. You could also randomly move the grav. point for a flicker effect I suppose...
Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
Alex BroadwinA-Tronic Software & Design-----"if you fail in life, you were destined to fail. If you suceed in life, call me.""The answer is out there.""Please help, I'm using Windows!"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement