fire?

Blitz3D Forums/Blitz3D Beginners Area/fire?

Braden(Posted 2008) [#1]
how could I create a simple fire for a candle, torch, or lamp?


Nate the Great(Posted 2008) [#2]
You could

a. make your own particle system to handle sprites
b. use an animated texture
c. do something that has never been done before and amaze the world

I would go with c :)


GIB3D(Posted 2008) [#3]
c. fire that can be blown out, and moved around like real fire :D


Ross C(Posted 2008) [#4]
Candle/torch/lamp, your maybe best with a animated sprite or something.


Braden(Posted 2008) [#5]
ok, how could I animate a sprite or make my own partical sprites?


Zeotrope(Posted 2008) [#6]
Have a close look at the LoadAnimImage command.

In essesence, you create a sequence of images that represent your fire.

This is how I do it....

Lets say you have 10 images of fire and they are all 128 * 128 pixels.

Create a blank image 128 * 10 in length (1280) and 128 in height. This will let you line up all your images in sequence so that all 10 images fit inside one image. Save this image as firesequence_anim (or similar)

Now load it like this...

LoadAnimTexture (firesequence_anim,2,128,128,0,10)

Have a close look at how to apply this as a texture in the B3D help docs and how to apply a variable to run through the 'frames' of your animation.

For fire, make sure you place a light near (or in) the fire, make the quad or model (on which you project your animation) fullbright


There is a hell of a lot more you can do to simulate this stuff, but you need the basics down ....so LoadAnimTexture is a good place to start.


Braden(Posted 2008) [#7]
ok, thanks!