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"

Stationary Light Perfomance Issue with Grass

UE4.13.1 from the GitHub Release Branch,

Windows 10, GTX 670, i5-3570, 16gb RAM

Scene With Grass(Not a Foliage) and Baked Stationary Light has perfomance issues.

I'm have 3 scenes.

Scene with Dynamic Lights (Working Fine)

Scene with Stationary Not Baked (Working Fine) alt text Scene with Stationary Baked (Have Issues) alt text Scene with Stationary Baked with huge perfomace drop, and without shadows on grass.

Example project, Test scenes in Root Content folder.


Product Version: UE 4.13
more ▼

asked Oct 14 '16 at 09:43 AM in Using UE4

avatar image

132 13 19 22

avatar image BorodMorod Oct 20 '16 at 07:52 AM

Any Ideas?

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

1 answer: sort voted first

Hey BorodMorod,

So I took a quick look at your project and your performance issues are coming from the number of Stationary Point Lights casting shadows. How I came about this conclusion was using the, 'profileGPU' command and observe the GPU Visualizer.

Profile GPU

alt text

Each one of your Stationary Point Lights are casting a shadow. Only 4 or fewer overlapping stationary lights can have static shadowing, because the lights must be assigned to different channels of a shadowmap texture. This is a graph coloring problem, so there are often fewer than 4 overlapping allowed due to topology. Shadowing cannot affect the overlap test, so the sunlight typically requires a channel from the entire level it is in, even the underground areas.

Once the channel limit is reached, additional stationary lights will use whole scene dynamic shadows at a severe performance cost. The StationaryLightOverlap view mode can be used to visualize the overlap, which is updated dynamically as you modify the lights. Light icons are changed to a red X when they are not able to allocate a channel.

Stationary Lights

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


Andrew Hurley

profilegpu.png (1.4 MB)
more ▼

answered Oct 20 '16 at 02:09 PM

avatar image BorodMorod Oct 20 '16 at 03:11 PM

ok, i'm made same scene, withou any Stationary Lights Overlap. Can you explain why i'm have huge perfomace drop? Now this scene with Folliage(Dynamic Without Lightmap)

No Overlaps alt text

Perfomace Drop With Baked Stationary Lights alt text

Has x2 better perfomance with Dynamic Lights alt text

avatar image AndrewHurley Oct 20 '16 at 03:27 PM

Dynamic objects (like StaticMeshComponents and SkeletalMeshComponents with Mobility set to Movable) must integrate into the static shadowing of the world from distance field shadowmaps. This is accomplished with Per Object shadows.

Each movable object creates two dynamic shadows from a stationary light: a shadow to handle the static world casting onto the object, and a shadow to handle the object casting onto the world. With this setup, the only shadowing cost for stationary lights comes from dynamic objects that it affects. This means the cost can vary from very little to a large amount, depending on how many dynamic objects there are. With enough dynamic objects, it is more efficient to use a Movable light instead.

Directional Stationary Lights are special because they support whole scene shadows through Cascaded Shadow Maps at the same time as static shadowing. This is very useful in levels with a lot of animating foliage; you want to have moving shadows around the player but do not want to pay the cost of having many cascades to cover a large view range. The dynamic shadows are faded into static shadows over distance, such that the transition is often indistinguishable. To set this up, just change the Dynamic Shadow Distance StationaryLight of a DirectionalLightStationary to be the range at which you want the fade to happen.

Movable components will still create PerObject shadows even when using Cascaded Shadow Maps on a directional light. This behavior is useful with small Dynamic Shadow Distances, but incurs unnecessary cost with larger distances. To disable PerObject shadows and save performance, disable Use Inset Shadows For Movable Objects on the light

(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