Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Tilesystem

  1. #11

    Default

    Nice App Redrobes! The terrain stuff is amazing! I will have to try out the demo when I get home.

    Torstan, yes I have seen that program before. Is is very cool. It might have been part of my inspiration at the time. I use something I call "shadow casting" in a similar effect. I forgot to mention the shadow aspect of lighting. It can be tough to do efficiently when there are a dozen light sources active in a scene.

  2. #12
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,245
    Blog Entries
    8

    Post

    Quote Originally Posted by CRasterImage View Post
    Nice App Redrobes! The terrain stuff is amazing! I will have to try out the demo when I get home.
    Thanks, try the demo and the free utils too - DragonFlight is OpenGL too.

    Quote Originally Posted by CRasterImage View Post
    Torstan, yes I have seen that program before. Is is very cool. It might have been part of my inspiration at the time. I use something I call "shadow casting" in a similar effect. I forgot to mention the shadow aspect of lighting. It can be tough to do efficiently when there are a dozen light sources active in a scene.
    If the light sources dont move - i.e. not torches being held by characters - then you can do it pretty efficiently by storing the shadow maps on offscreen buffers. If your using the nVidia shadow extension then you would need to do this in any case. If you can work out which ones are moving then you only need to recalc those each time.

  3. #13

    Post

    I have tried several experiments and entertained several ideas. One that is similar to what you are describing is: Generate a map-wide image that contains the occluded light results for all static (non-moving) lights. However, the image becomes invalid when a moving object (a figure) enters the area. Or when a nearby door opens. That object, or door, ends up changing the occlusions in the scene. Making the saved image invalid.

    One work-around is: treat moving occlusions differently than static occlusions and handle them in a different pass. However, introducing shadows later, doesn't always generate the correct effect. Since a shadow is particular to a light source. By that point, all the lights have added their contributions to the environment. Adding any shadows at that point wouldn't be able to undo contributions of a particular light source.

    Currently, I am doing something similar to what you are describing. All static lights are in two entire-map-sized saved images and handled in a single pass. One image contains the amount of light at that pixel. While the other stores the angle of the light at that pixel. Kind of like an inverted normal map. This world-lighting pass is done without any shadows... While moving lights, like the spotlight on the Terminator's shoulder, are handled in individual passes, with occluding shadow-casters factored in. One pass per light. They have to be handled separately since an occlusion map has to be generated for each light, on every rendering. Making parallelization difficult to pull off.

    Lighting can be quite the pain in the butt. The flawless method of doing each light in a separate pass adds rendering speed problems, while attempts to combine the lights sacrifices correct behavior. Gah!

  4. #14

    Post

    Quote Originally Posted by CRasterImage View Post
    I have tried several experiments and entertained several ideas. One that is similar to what you are describing is: Generate a map-wide image that contains the occluded light results for all static (non-moving) lights. However, the image becomes invalid when a moving object (a figure) enters the area. Or when a nearby door opens. That object, or door, ends up changing the occlusions in the scene. Making the saved image invalid.
    I have a question that I'm not sure how to ask. What "language" or "application" are you using to do this in?

  5. #15

    Post

    Quote Originally Posted by helium3 View Post
    I have a question that I'm not sure how to ask. What "language" or "application" are you using to do this in?
    Sorry, I didn't mean to run off on a geeky tangent.

    To answer your question: The Tilesystem program is written in C/C++ and uses the OpenGL library. (and only runs in Windows. Apologies to those who use Mac or Linux. )

    The subject of the post was how to write code that can render shadows efficiently (quickly) in situations with multiple light sources.

Page 2 of 2 FirstFirst 12

Posting Permissions

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