Announcement

Collapse
No announcement yet.

Fully Dynamic lighting

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

    Fully Dynamic lighting

    Hi all,

    I would like to know both from a performance and quality perspective, what would happen if I completely skip lightmass and make a game with fully dynamic lighting? did anyone try this? and what was the results?

    How would I best do i in technical terms to make sure that even static meshes get good dynamic lighting?

    or should I just drop the idea altogheter?

    BR,
    Tactica

    #2
    If you do that you have to keep the amount of dynamic lights to a minimum, otherwise you get major performance issues. For example in Bad Company 2 DICE only had few dynamic lights, the sun and gun muzzle flashes.

    Comment


      #3
      Shouldn't the new deferred shading feature help in improving performance even if I used more lights?

      Comment


        #4
        Deferred lighting is DX11 only. If that's acceptable requirement then yes it will help. Otherwise, I've found that the most expensive about dynamic light is dynamic shadowing. If you keep dynamic shadows to a minimum it is usually very good performance.

        Comment


          #5
          How would I keep dynamic shadowing to a minimum ? just woundering.

          Comment


            #6
            One thing Ive always been interested in for optimizing dynamic shadows is they only get applied to dynamic objects regardless if the light itself is dynamic or not. If you have a static shadow from a static object (not yet initialized dynamic) cast by a static light there should really be a precache and a redraw rather than a full recalculation of the shadow volume.

            Dynamic lights however, with dynamic shadowing will always cast dynamic shadows regardless if an object is static or not.

            Within these two examples we still have dynamic shadowing but in one case we can optimize for static light position. If a light contains a function, where it may fade that also affects the dynamic ability of the light becoming partially dynamic but not wholey as the brightness and other attributes of a static (dynamic shadowing) light will not affect the entire volume only things like a fov (is the best way to describe it which is shear operation) and colour.

            I guess what Im describing is like a dominant directional in some aspects, that one light controls numerous dynamic shadows so they are all transformed using the same set of deformations. This must save on the cost of processing when you have afew larger dynamic shadow casters over alot of little small ones. Ofcoarse smaller lights in confined spaces will certainly not cast as large shadow volumes so they must be less intensive.

            There is also the option of casting dynamic shadows from an object onto itself, not all objects will require this and it depends on the light position for the best effect. One thing I have noticed is that dynamic shadows will overlap so you could end up with some artifacts if you are using alot of dynamic shadows all over the place and is the best reason to use static light mapping because it blends these together in a much nicer fashion

            Comment


              #7
              It's pretty simple to go test, go throw in a moveable dom directional light then under View -> World Properties -> Lightmass, check Force No Precomputed Lighting. Check your fps. Now convert it to a regular dom directional, uncheck Force No Precomputed Lighting, rebuild. Check your fps.

              It will allow you to see both the visual difference and the relative fps hit, at least on your own machine. Obviously, dynamic lighting is simply much more expensive, especially as you add more (1 moveable dom isn't too bad) and like Snake says, the biggest hit seems to come from casting lots of dynamic shadows.

              Comment

              Working...
              X