Announcement

Collapse
No announcement yet.

Realistic Lighting.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Realistic Lighting.

    I'm new to Unreal's lighting philosophy. It seems very complex compared to other systems.

    I want to get a minimalistic "realistic" lighting setup going. That means I want lights that cast shadows from static and dynamic objects, cast those shadows onto static and dynamic objects. I don't want any kind of "cheating" where multiple lights get combined into one, or any of that convoluted stuff.

    The documentation on lighting is confusing. There's lots of it, but it's all over the place and it's hard to work it out. There seem an excessive number of options. I've done a few tests but the results are strange, often only one light will cast shadows, shadows will go through walls, or multiple shadow volumes will create errors, rendering incorrectly.

    So how do I create lights that cast both static and dynamic shadows and don't do some trickery that merges them or such?

    Edit: Going through http://udn.epicgames.com/Three/LightingReference.html step by step I think I have to

    1. Set "Cast Composite Shadows" to false so that multiple lights don't get combined.
    2. Set "Cast Dynamic Shadows", "Cast Shadows" and "Cast Static Shadows" to true.
    3. Set "Light Shadow Mode" to "LightShadow_Normal"

    I'll see how this goes.

    #2
    The problem with 'realistic' lighting is that if every light was casting dynamically, the frame-rate would drop significantly. The UDK system works so that only one "dominant" light casts dynamic shadows while a bunch of other lights cast static shadows. The results look fantastic, but setting it up is a pain.

    Comment


      #3
      Oh, I didn't know the dominant light casts dynamic shadows. Is that on by default?

      Comment


        #4
        I still can't get it to work.

        I have a large plane, two point lights and a cube to cast shadows. I don't want lightmaps, I want realtime shadow maps cast from each individual light. I don't care about rendering speed because I'm just trying to get this issue conceptually.

        To check I'm not getting a lightmap I've set the resolution on the plane to 256 so that it's obvious when lightmaps are being used, they cause a very blurry, very low resolution shadow.

        I cannot get the lights casting shadow maps. The page I linked to above mentions shadow maps versus light maps, so it's obviously possible to have shadow maps running.

        Each light has the same settings,



        I do a full rebuild but I can tell it is using lightmaps instead, since there's just the very blurry shadow on the plane from the cube.

        Can anyone tell me how to make just a normal, shadow mapping light?

        Edit: There seems to be a lack of documentation about this "DominantLight" thing too. The links to in in the UDN documentation are all red, blank links.

        Comment


          #5
          At "Lighting Channels" you have to deactivate Static and activate Dynamic

          Comment


            #6
            Thanks FrozenDozer, but that didn't work either. Added to what I already posted above, I tried a number of different channel settings. I enabled Dynamic and disabled Static, and then I tried variations with and without BSP and CompositeDynamic.

            But every time I rebuild All, the scene is just the blurry lightmap.

            Comment


              #7
              http://www.xup.in/dl,50272755/lighting.zip/

              This should help

              Comment


                #8
                Ah, those spotlights work great. I exported one and then added it to my flat plane + cube map and it behaved fine. Maybe the problem was I was using point lights, perhaps point lights don't do shadow mapping (since they generally need six passes per light).

                Thanks FrozenDozer.

                Comment


                  #9
                  The only thing that didn't work for me on the first try was creating a spotlight which casts dynamic soft shadows with BSP, SM's worked fine. But I think thats a problem of the settings, not the light itself.

                  Comment


                    #10
                    One thing with the spotlights, I noticed you've got a lightfunction on them. If people are using them in map geometry they'll generally want to remove that, or you won't properly be able to control the cone size.

                    Comment

                    Working...
                    X