Confused on Deferred shading, lightmaps and light types

Its probably a mental burnout but will try anyway :rolleyes:
I know the udn documentation and im pretty sure I know what I am doing, but I have doubts if my perception on Deferred shading, light maps and light types is correctly used.Will try to ask a few questions so if you like, just say yes or no when you have the time.

  1. Ok, udk has static and dynamic lights.Static create the baked lights and store them ?(obviously second uv channel for the model is needed)
  2. Dynamic lights don’t create light map shadows,only real time ones.Correct?
  3. If that is true, than that means that if a level is only lighted by dynamic lights, than in theory the static meshes don’t need second uvs for the light maps as the shadows are real time?
  4. Deferred shading only works(automatically ) in dx11 if we use only dynamic lights?
  5. Static spotlights are cheaper than static point lights?

Best for last .
6) Ive been navigating these dx11 levels

Most of you have probably seen them and have them on the pc somewhere.
Do you think there was any particular reason for their creators to use only dynamic lights(only spot lights movables) in the levels? I see there are real time dx11 reflections but they also work with cheaper static lights(if im not mistaking). Than what was the point of using only dynamic lights, to see the differed shading effect? (apart from bringing modern gpus to its knees)

On the other hand, I probably spoke bad as the deferred shading is probably the way dx11 handles dynamic lights efficiency and not something visual that can be spotted vs a static light scene?

I use full dynamic light in DX9 and the static meshes doesn’t need a second uv to store lightmaps. I use a second uv channel in some models to mix textures only.

But I haven’t experience in DX11 yet.

So how many dynamic light do you have in a scene?(types) Is it hard on the pc or do you hide them and the scenes in visibility volumes? They all cast dynamic shadows?
I was left with the impression that having only dynamic lights is taxing on the framerate.

I use point lights. They are very expensive, I have a house with 12 dynamic lights and barely goes over 30 fps. As the house has 3 floors, I was thinking of deactivating the shadows from one floor to another, reducing the radius of the light so as not to illuminate without shadows through the floors.

I think it’s more about how many actors are affected by the lights, rather than the number of lights themselves. In places without light, when you turn on the torch, the performance drops a lot because that ONE light is affecting a lot of objects.

I have an actor that uses a light component, and it degrades its properties by distance, reducing the shadow map, turning off the shadows and finally turning off the light. But still, if you have a lot of them together, it’s a problem.

In buildings like the tavern I have had to choose to turn off the shadows in some lights. Soft intensity to create ambient. It doesn’t look bad.

The map you show before (Arbor Vitae, very well done), is using lightmass and static lighting. I don’t understand why it uses dynamic lights.

I have incorporated it to my landscape, I have removed the lightmass, deactivated the precomputed shadows in all the staticmeshes, I have converted it to 100% dynamic. And the truth is that it looks pretty good, above 60 fps.

Surely the spotlights perform better than the pointlighs because they will affect less objects, but in my game as they are torches, I have to use the points.

Gracias :wink:

By the way, when you say that you use point lights and for your example you have 12 dynamic lights in a house, does that mean that those are movable or toggleable point lights(these are the dynamic ones according to udn)? As the normal point light is just static one( unless you probably activate the dynamic channel ?)

De nada :slight_smile:

I’m using an actor with a point light component. Originally it was to use in torches, but I use it for all, as the actor can degradate the shadow properties by distance.

This is that component:

class luznoche extends PointLightComponent;



// for now we are leaving this as people may be depending on it in script and we just
// set the specific default settings in each light as they are all pretty different

//All lights default to being able to be composited normally.



// Use cheap modulated shadowing by default

Now I see the code again, I think I can disable Castdynamicshadows by distance too, before disabling the shadows, to gain some fps.

I will give my 2 cents.

I love usiing lightmaps, as they give a beautifull visuals, while keeping a high performance. I simply don`t use dynamic lights.

I know skeletal meshes cast dynamic shadows arround the entire map, even if you don`t have any dynamic light.

I think Unreal Lightmass does a good job whenever baking lightmaps.

And it`s not that hard to create a 2nd UVW channel for lightmapping. I do this automatically, using a custom maxscript (in 3dsmax). So for my workflow is just a matter of clicking and I have my static meshes UDK-ready. I know they are not perfect, however, it is worth comparing the time I would spend if doing it manually for each static mesh,

Here in this screenshot the character is casting a dynamic shadow over the level geometry (in the case of this map it is a BSP brush). The level geometry is casting static shadows (lightmapping).