x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

alt text

Thanks for any help in advance.

Product Version: UE 4.13
Tags:
screenshot_1.jpg (80.5 kB)
more ▼

asked Oct 05 '16 at 03:32 PM in Rendering

avatar image

jakenicolaides
34 3 4 10

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hey jakenicolaides,

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.

Stationary Lights

Skylights

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.

Lighting Quick Start Guide

Lighting Troubleshooting Guide

Let me know if you have further questions or need additional assistance.

Regards,

Andrew Hurley

more ▼

answered Oct 05 '16 at 03:51 PM

avatar image jakenicolaides Oct 05 '16 at 04:07 PM

Thank you so much for the quick, thorough response.

If the directional light is stationary, I wont be able to rotate the sun and therefore create day cycle effect though no?

avatar image AndrewHurley Oct 05 '16 at 04:39 PM

You are correct, apologies for overlooking that detail in your original post. Since you are animating a day/night cycle using a Movable directional light, all of your objects will be casting a dynamic shadow. Be careful as that can become quickly performance heavy the more shadow casting you have in the scene.

Also, you can still use the Cascaded Shadow Maps and Ray Traced Distance Field Soft shadows, for your Movable Directional Light. You will want to tweak the settings on a per project basis based on your needs.

For the Skylight, I would also take a look at the tutorial written by one of our tech artists and engineers.

Blending Between Multiple Skylight Cubemaps in Blueprints

The great thing about the skylight cubemap is you can change its intensity at runtime to tweak moving from indoor to outdoor and visa versa. It will give you greater control over your scenes lighting.

Cheers,

Andrew Hurley

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question