Results 1 to 6 of 6

Thread: Crazy Design Question: Should Fireballs have shadows?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Yeah that makes sense. Now if it were a 2D game? I'm thinking of having a texture that has a white glow texture that I can subtly ADD to the tiles and objects underneath, but a bit larger of an area than just the fire ball's shape so that in "Night Mode" (drawn to a bias of RGB 0.25, 0.25, 0.5) it'll stand out even more.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #2
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    Quote Originally Posted by WILL View Post
    Yeah that makes sense. Now if it were a 2D game? I'm thinking of having a texture that has a white glow texture that I can subtly ADD to the tiles and objects underneath, but a bit larger of an area than just the fire ball's shape so that in "Night Mode" (drawn to a bias of RGB 0.25, 0.25, 0.5) it'll stand out even more.
    This would analogous to old software methods of adding light into existing Lightmap + texture combos, back then you'd work out which faces recieved the dynamic light and then for each face, project the light into the texture matrix for the face giving you the spatial data on what parts of the lightmap textures you need to update.

    However in a more or less 2D projection with OpenGL, just a blended quad with your glow could be rendered on top of your tiles, then render the fireball on top of that.

    Alternatively you could use a light source with a high quadratic attenuation (it'd have to be per-pixel in a shader to look it's best) that modulates the fragments as you render each frame. Standard lighting equation, gives an effect like the glow from rockets in GL Quake.

    You could also add glow as a post process (if you've got a deferred pipeline setup), this is cool because when a fireball is visible, you can easily lower the lighting slightly for everything else and then raise it for the fireball. This is what actually happens with your eyes in reality when your iris contracts as a result of bright light, surroundings not illuminated by that light would appear darker. Same thing for mechanical eyes, think of those programs where you've got an anonymous person spilling beans on some scandle, sitting in on a chair with a bright light behind them, obscuring their faces not in shadow, but with the relative contrast.
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •