Oren Game Engine Programming

Would you like to react to this message? Create an account in a few clicks or log in to continue.

Detailed information about my game engine programming


2 posters

    Shadows and PVS

    avatar
    Demiurge


    Posts : 5
    Join date : 2009-02-05

    Shadows and PVS Empty Shadows and PVS

    Post by Demiurge Fri Feb 06, 2009 12:45 pm

    Hi Oren,
    here I am to ask something more specific about your light/shadow algorithm.
    I've read you use variance shadow mapping, and also that you decided to use a shadow map per light for STATIC objects, and than a common shadow map for all lights. How do you handle the common one? I mean...there are plenty of lights around that projects their static shadow map, but which one is responsible to create the dynamic one? I've thought that you choose it to be a simple directional light...is it true?

    Changing subject, I've read about your area pvs, and bitset use...I found them very useful, but where do you store those infos?
    And why are you talking about 'lightning pass' ? It's just a matter of light culling or it is a complete light rendering, like a deferred engine?

    Thank you very much Oren! Very Happy
    avatar
    orenk2k
    Admin


    Posts : 11
    Join date : 2009-02-01
    Location : Isreal

    Shadows and PVS Empty Re: Shadows and PVS

    Post by orenk2k Sat Feb 07, 2009 12:52 pm

    Demiurge wrote:
    I've read you use variance shadow mapping, and also that you decided to use a shadow map per light for STATIC objects, and than a common shadow map for all lights. How do you handle the common one? I mean...there are plenty of lights around that projects their static shadow map, but which one is responsible to create the dynamic one? I've thought that you choose it to be a simple directional light...is it true?
    every light have it own static shadow map, when a doing lighting pass i check if a light (could be dir,proj,point) needs to update dynamic shadow map, if so, i render all dynamic shadows casters (that is objects that the light effects, or they unvisible but their shadows is) into dynamic shadow map and in the ps i combine those static & dynamic values to produce one shadow value to work with.

    Demiurge wrote:Hi Oren,
    Changing subject, I've read about your area pvs, and bitset use...I found them very useful, but where do you store those infos?
    And why are you talking about 'lightning pass' ? It's just a matter of light culling or it is a complete light rendering, like a deferred engine?
    where do i store it? you need to decide whats works for you best.
    for area pvs i'm using bitset, on bit means visible area
    for internal area pvs i'm another bitset's (depends what elements you want to add into culling method).
    the lighting pass mentioned to say that whan you do good culling the lighting pass will also be faster because the light only effects what you can see! so if you can't see it you dont need to lit it! so every batch/object you cull before lighting pass, will make your scene rendered faster!
    note: whats good for lighting pass doesn't mean that its good for shadowing pass, because shadows could cast from unvisible shadow casters! but this is another issue Wink
    avatar
    Demiurge


    Posts : 5
    Join date : 2009-02-05

    Shadows and PVS Empty Re: Shadows and PVS

    Post by Demiurge Sun Feb 08, 2009 1:07 pm

    I don't think I've understand well...I don't really know which light render to the common shadow map. But if you make it render this way, and there are two lights near an object, it will cast only the shadow from one of the two?

    On the bitset, you mean that every object has 3 bitset: light, shadow and area pvs?
    avatar
    orenk2k
    Admin


    Posts : 11
    Join date : 2009-02-01
    Location : Isreal

    Shadows and PVS Empty Re: Shadows and PVS

    Post by orenk2k Sun Feb 08, 2009 1:40 pm

    Demiurge wrote:I don't think I've understand well...I don't really know which light render to the common shadow map. But if you make it render this way, and there are two lights near an object, it will cast only the shadow from one of the two?
    no, each light in turn will have the chance to update the dynamic shadow map, so for example:
    we have room with 2 lights, and one animated object in the center, now we want to do the lighting pass so:
    first light:
    1. it have dynamic objects in its area so it needs to update the dynamic shadows map.
    2. updating dynamic shadow map (no need to update static shadow map) and binding those shadow maps (static and dynamic)
    3. render batch list with shadows
    second light does the same!
    so each light in turn update the dynamic shadow map and get the right result.
    Demiurge wrote:On the bitset, you mean that every object has 3 bitset: light, shadow and area pvs?
    no, you dont need to (it a waist of memeory), first the scene is splitted into areas so you need only one bitset to know which area is visible or not.
    if you want per area pvs - what i called inter area pvs (meaning you want to know which entities are visible in each area) you need bitset for each area.
    each light have its own bitset thats says which areas it is effecting, also internal area pvs could be added for lights.
    hope this helps

    Sponsored content


    Shadows and PVS Empty Re: Shadows and PVS

    Post by Sponsored content

      Similar topics

      -

      Current date/time is Sun May 19, 2024 12:31 pm