Game Engine Fire

could anyone point me to a good tutorial on creating game engine fire. I’m talking about the kind in a fireplace not meteoroid or jet fire. I tried adding particles(textured plains) randomly from an empty but couldn’t figure out how to animate color. the tutorial uses the 2.4 IPO and I’m using 2.6. Anyone…?

There’s a thread literally 4 rows down about animating object color.

or you can try my easyEmit Script. This makes it alot easier to generate a particle system! Fire is no problem at all. It has a fully integrated UI. Just look under the Particle Properties.
Try out this file!

EasyEmit.blend (210 KB)

I whipped up a quick’n’dirty one too, actually the first thing I did in BGE :smiley:
Like Magnum said it’s in my thread a bit down too:

Compared to ndee’s post mine sucks though but it might be easier to understand.

Layer 2 holds a “particle” (plane with texture) that is animated in scale and material color.
The “particle” material is set to act like a particle in the material tab.
It get’s a logic to always move upwards.

Layer 1 holds the emitter, which simply pulses add object and adds one of the particle objects at a time.
Additionally I used a random modifier on the XYZ location of the emitter object.

I think thats the worst but most easy way to do a fire if you want to stay away from python :wink:

looks quite good. Maybe adjusting the colors a bit.

@ndee your easyEmit script is wonderful yet a little too supreme for my current blending level.I dont really understand the mechanism yet, I might use it in my game if you wouldnt mind.
@arexma, u’re right your does suck, but it’s exactly what I was looking for. You have explained the color animation I was finding too difficult to comprehend.

Thanks guys, this forum is the best for sure.

Is it possible to make an animated textured smoke that runs each frames on individual particle? - starting at frame 1 during birth.

Similar to the flames you can emit transparent faces with animated sizes.

You an even let the flames emit the smoke particles before they end.

there is no color animation in glsl mode

Just a Note: I recently played Assassin’s Creed 2 again and looked at the Fire there, and it actually looked »crispy«, which I found much more fire-like than many other Fire Particles that I have seen in most Games. I thought about using a Method like my Dissolve Material to make something similar, but, untested, I think it could be enough if a System like easyEmit is used and the Alpha transparency is set to Clip Alpha. It might be worth a Try.

My .blend disproofs your assumption.

dats what I thought too fr3shdumbl3dore. From arexma’s .blend, you must set the texture blend mode to multiply else you wont see the color animate. Hope I helped…

Not what I can tell from testing the .blend – the other Blend Modes work too. However, the Material remains invisible if the Alpha Blend Mode of the Material is set to anything else than Add. (Maybe that’s what you meant?)
@ arexma: A good .blend, by the Way. It doesn’t suck – no easyEmit, but neither would I call it sucking, as it only presents the basic Setup. Ô, and I like your English.

of course it doesn’t suck…

I’m not sure why, but the one I made does not appear in the Camera View when set to perspective. Could anyone explain why…

If you are using a Halo Material, watch out the Plane is directed towards the X-Axis. (It ~could~ be the Problem.)

I hope its okay if i share this here…

Fire need smokes too…

Heres the blend mySmokeTexture[BA].blend (74.2 KB)

and the texture…

The problem: the texture won’t start at frame 1 immedietly after birth.

Yeh, if you set it to anything else than “add” it doesn’t work anymore for obvious reasons:

add: Render face transparent and add color of object.

I tried it with other methods, the closes I got was to use a alphatexture for the face and then use another texture above it to control the color, but it usually didn’t work properly (mixing colors was just too much of a game of chance) and the alpha was not very good looking. So I guess the solution I came up with is the only one to properly color a fake particle like this.

Also the animation of the coloring doesn’t work properly.
If you key the first color and then the second color and add the action to a logic brick, the particle stays the second color until you go back to frame 1 of your action and click the color selector once. After that the action works properly in the GE. Don’t know what’s the issue there.

And lastly my .blend is shabby from an artistic point of view, that’s what I meant, but my focus was just to to take 3 garbage to manufacture one junk :wink:
It was more of a technical proof of concept with a used giftwrapping than a serious artistic attempt.
It wouldn’t suck if it was 2000 and you’d expect such a fire in a highend engine like IDTech2 becaues that’s pretty much the look.
And it would even be better if blenders pointlight sources would support buffer shadows, or the GE would support stencil shadows OOTB. The way I set this scene up the shadowcaster looks nice, but it’ll not work for anything higher than Suzie :slight_smile:

So yeh. It sucks, it might look neat but it only explains and is no pearl of CG.

Now I feel bad… I asked for help and got exactly what I was looking for. arexma I have been trying to do what you did for nearly 2 days now. I didn’t mean no disrespect, weirdly though, it was just being nice (doesn’t make much sense does it). You’ve taught me a great deal too…

C.A. dat explains why it appears in orthographic mode, but surely there must be a way I can use it in a game with a perspective camera… Or how do most blender games handle fire??

I just used normal face orientation, doesnt look that bad. I’m still looking to learn more


Don’t sweat it, no offense taken really. I guessed it was that sort of teasing sarcasm common between friends, it’s usually so to say “lost in translation” in an emotionless forum though.
And really, even if you’d have meant it offensive, I would not have cared. No offense either, but to me you’re a nickname with an avatar image, no one I care about, if you catch my drift :slight_smile:
After years in internet forums my skin is thick :wink:

Anyways, took me around 3 hours to whip this stuff up, 2 hours to come to a dead end witht he material color animation and to ask in the subforum here a few threads below and another hour to fix it and make the fireplace and the floor :wink:
So it isn’t really anything I could hurt over, it’s just a doodle. I thought after over 5 years in Blender I could take a look at the game engine too, although I prefere external FOSS graphics engines like Ogre3d, Irrlicht3d or CrystalSpace3d

As for your problem I think C.A is right. If you have the faces local z-axis aligned witht he global z-axis for some reason the face isn’t turned properly towards the camera in particle mode.

My face is looking with it’s local positive Z-axis towards the global positive X-axis.
Additionally just to be sure, I disabled backface culling in material settings>game settings. Pointless, as in particle mode it’ll always face the camera, but this way you don’t have to worry which one is the positive axis :slight_smile: