Why is my lighting and shadowing getting screwed up when I convert a Static Mesh to a Mover?
Exhibit A:
http://s20.postimage.org/vvcl7s0j1/comparison.jpg
The image on the top is of the Static Mesh. It's being illuminated by 3 dynamic (Movable) lights with shadow mapping enabled on all 3 of them. In addition to the lights, the material is being lit by a HDR texture. Everything looks great. The image based lighting works fine. The 3 dynamic lights look fine and each cast a shadow.
Now, the second image is with the head model converted to a Mover. All of a sudden only one shadow is being cast and the way that shadow interacts with the lighting has change (i.e. it looks like a pile of excrement.)
The last image is even worse yet. This is what happens when I remove all 3 lights from the scene. I have no idea why UDK is messing this up so badly.
Keep in mind this scene is being rendered with dynamic lighting + image based lighting alone. I have static light mapping disabled.
Replies
Editor Preview (Right Click > Play From Here)
What a horrible limitation. And it doesn't even make sense, after all, you can have multiple shadow casting lights and move a "Static Mesh" around in the editor without any issues. If they can get dynamic lights and shadow maps working in the editor, then why can't they do the same in game? Makes no sense.
Any way, even if that is the case, it does not explain the last image. There are no lights in that scene, so there should be no shadows.
It's not a deferred renderer, you can't have lots of dynamic lights shining on an object without crushingly expensive overdraw using multiple passes.
to get proper ambient lighting on objects using light environments you should adjust the settings on the lights hitting it and the ambient values in the world info.
The reason why the last one looks like that is because it has no lights hitting it. Down is the default shadow direction.
http://udn.epicgames.com/Three/LightEnvironments.html
http://udn.epicgames.com/Three/ContentBlogArchive.html#New Character indirect lighting settings
How can I prevent this?
Unless you are targeting 60fps on a 360, I see no reason for this type of ridiculous optimization. You don't need a deferred renderer just for 3 dynamic lights and 3 shadow maps.
Synthesize SHLight ... ON
this will attempt to recreate spherical harmonics ... generally makes the object look nicer / do some cool bounce light effects.
Use Boolean Environment Shadowing ... OFF
UDK uses two lighting models; one for objects in shadow and one for fully lit objects. This flag will use just the nice expensive model and generate better shadows.
Use Precomputed Shadows ... OFF
This should turn off by default as soon as the object becomes dynamic -- if this is checked on the object will bake light maps when you run lightmass.
and then the last one, which you found:
Is Character Light Environment ... your choice
This will use your lightmass importance volume data (a big 3d grid of lighting data) to light your object. This can be kind of glitchy and sometimes lights the object from below for no reason.
If you favorite these options (press the yellow star in the top right of the properties window to turn favorites on, then press the star next to each option to favorite) it is real easy to just check them on or off when you convert objects.
hope this helps!