Trying to get dynamic lighting to work for my game.
I'm trying to light my game world dynamically using a day-night cycle. I have interior and exterior spaces. My problems happen when trying to light interior spaces. Static lighting is DISABLED and I currently have a movable Directional Light as my sunlight and a skylight. Without the skylight the interior is too dark. With the skylight none of my meshes have shadows. In the picture attached, the light coming through the window is perfect but the shadows of the meshes just dont exist!
What can I do in this situation? Do I need to be using ambient occlusion? Or am I being an idiot?
Thanks for any help in advance.
asked Oct 05 '16 at 03:32 PM in Rendering
So this is actually a common workflow question that just requires a bit more knowledge on how your light types work with each other, and how to incorporate Dynamic lighting for an Interior and Exterior level.
The important thing to remember is that Stationary mobility light types can utilize baked static lighting and dynamic shadows through the use of cascaded shadow maps and ray traced distance field shadows.
Lightmass generates distance field shadow maps for stationary lights on static objects during the lighting rebuild. Distance field shadow maps provide very accurate shadow transitions even at low resolutions, and with very little runtime cost. Like lightmaps, distance field shadow maps require uniquely unwrapped UVs on all StaticMeshes using static lighting.
Your best bet would be to use a Movable skylight and a Stationary Directional Light. After building your lighting, you can control that ambient light values by changing the Skylights intensity and yes, using Distance Field Ambient Occlusion to get your shadowed areas (like your indoor scene) to appear more accurate. It is a balancing act when trying to get the lighting correct for and exterior/interior scene and using features like Auto-Exposure to control that transition will also help.
Check out the below documentation for more helpful tips and ways to improve your lighting to get accurate and believable results.
Let me know if you have further questions or need additional assistance.
answered Oct 05 '16 at 03:51 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here