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"

dynamic shadows faster then stationary shadows?

I am working on optimizing a VR project.

The scene I am working with is containing a large city with a lot of buildings that are static, a few dynamic objects and there are 2 directional lights.

Because I only animate the light color and intensity, I made the 2 directional lights stationary and baked the whole lighting.

The stationary light will only cast dynamic shadows on a few dynamic objects and the rest (about 90% of scene) will use the baked shadows.

With this setup I couldn't get 90 frames per second and I noticed when I switched both lights to dynamic I did get 90 fps.

So in this case it seems that it is faster to calculate the shadow for the whole scene dynamically then using stationary lights. I noticed in the GPU visualizer that when using dynamic lights, that mainly the shadowdepths renders faster then when using stationary lights.

When I open the shadowdepths I see that when using dynamic lights It will have a few large shadow maps for a few "WholeScene split" items.

When using stationary lights the shadowdepths renders slower and it will contain a bunch of smaller shadow maps for each dynamic item in view.

It seems that splitting the whole scene up in a few shadow maps is faster then using more but smaller shadow maps.

When using stationary lights I set the "dynamic shadow distance stationary lights" to zero. This is the only way I found to let the engine use baked shadows for all objects except the dynamic objects. Could there be a way to get the dynamic shadows from stationary lights render faster or should I just use dynamic lights for everything although it seems so inefficient?

Below a screenshot to illustrate the differences in the GPU visualizer

alt text

Product Version: UE 4.13
Tags:
more ▼

asked Sep 16 '16 at 08:33 AM in Rendering

avatar image

arjanM
16 3 6 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

@geverk answer is not correct. That happens when you have Stationary Light that is affecting a large number of Movable objects. The easiest way of getting into this trouble is using Movable foliage with Stationary light. Just uncheck "Inset Shadows for Movable Objects" in your Directional and you will be ok

more ▼

answered Aug 28 '18 at 01:25 PM

avatar image

mazatracker
16 1 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

yes, that can happens when you have to much light maps, cooked shadows no need to be calculated but need to be loaded, if you have many light maps with high resolution it may become a problem. You can try to solve that with more memory in your system, or limiting the maximum memory usage on your game so (but that may cause problems loading the textures)

more ▼

answered Dec 04 '17 at 05:30 AM

avatar image

geverk
36 1 10 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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