How do I create a fireball, please help

I just want to creat a fireball, but I don't know which way to go. I think I can draw a ball with some kind of glass material, and the place a red light source inside the ball. Is this correct Please point me a way to go. Thanks


Answer this question

How do I create a fireball, please help

  • kittani

    Thank you very much, it's really helpful!!
    I'll do some research on particle system, and hopefully write a DrawCoolFireball() soon :)

  • RMarceloJR

    To be physically accurate, you might think that a glass material and a red light would work... but in practice that won't really do anything much. Or, it would require a very complex rendering pipeline to get it working Smile

    A fireball will typically be a specialization of a "particle system" - the fireball itself can either be a single particle, or a "cloud" of particles (depending on quite what sort of effect you want to achieve). I'd suggest doing some research into particle systems. Direct3D features "Point Sprites" as a convenient method for creating these sorts of effects.

    Once you've got the actual geometry sorted out, you need to look into some texturing effects. This is where the real magic comes into play...

    Depending on how you do the first part, you'll want to have a texture of a generic "fireball" (I recommend making it a greyscale noise texture) that you can apply to the sprites. You can then specify the colour via the vertex properties (that way you can have it pulsate from red/orange/yellow etc..). You want to combine this with some sort of alpha mask and/or alpha channel so that it blends with the rest of the scene behind it (hint: always draw your fireball LAST on each frame!).

    As I've probably demonstated - it's a fairly broad topic; sadly there isn't a device->DrawCoolFireball() method (yet).

    hth
    Jack


  • How do I create a fireball, please help