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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Update Global Distance Field Volume taking longer than usual

Hi everyone,

I'm currently part of a team making an open world game and parts of our world have time sinks in the GPU causing the overall framerate to go up.

The biggest culprit in these areas (or so it seems) is "UpdateGlobalDistanceFieldVolume". It is spending about 20ms in here which is an incredibly long time.

Can anyone explain to me why our frame time is spending so long in here, and why we have so many clip maps. As I understand it, only newly visible areas or those affected by a scene modification need to be updated.

For a bit of context we have foliage, landscape, and a rain particle emitter (focused on the player).

Thanks in advance!

EDIT: After some further investigation, I have found that a non-shadow casting Skylight was causing this issue. However, it is my understanding that the distance field stuff is not used when cast shadows is turned off.

alt text

Product Version: UE 4.11
Tags:
clipmap.png (34.9 kB)
more ▼

asked Aug 09 '16 at 04:32 PM in Rendering

avatar image

AgentMilkshake1
285 13 18 34

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

1 answer: sort voted first

The global distance field is updated if any of the features using it are enabled:

  • Distance field particle collision

  • DistanceToNearestSurface material node

  • Shadow casting movable skylight

It also updates if Ray Traced Distance field shadows are enabled, but that's a bug. You can workaround it by forcing global distance fields off with 'r.AOGlobalDistanceField 0'.

I'll assume you are actually using a feature that requires it. The global distance field is a cache around the camera that has to update if the camera moves a lot, or if you have a moving static mesh which has bAffectDistanceFieldLighting enabled. The bigger the static mesh, the more expensive the update will be. Use 'r.AOGlobalDistanceFieldLogModifiedPrimitives 1' to track down which objects it is and disable bAffectDistanceFieldLighting on them.

more ▼

answered Aug 10 '16 at 10:10 PM

avatar image

DanielW STAFF
1.9k 31 11 72

avatar image AgentMilkshake1 Aug 11 '16 at 10:50 AM

We have a rain particle effect that uses Distance Field collision (we need to use this as screen space is not suitable for spaces under 'cover'). We had a a non-shadow casting skylight in the level, and upon removing it, it got rid of this performance issue, with the rain particle effect still in the world.

Is this a potential bug, because it is not shadow casting. I'm going to investigate the world using the LogModifiedPrimitives command you have given me. Thanks for the reply :)

avatar image AgentMilkshake1 Aug 11 '16 at 11:03 AM

So I put a skylight back in, set it from moveable to stationary and it has solved the performance issue. Could this potentially be a but as you told me Shadow Casting Moving Skylights cause it to be updated, however it appears that any moving skylight causes the update to the global distance field. Thanks for the hint that lead to the answer :)

avatar image WixZ Jun 27 '17 at 03:42 AM

Hey DanielW, I have a similar issue in my project. However setting "affect distance field" under lighting in the mesh isn't helping. Performance doesn't change at all. Even though the distance fields are no longer visible when I go into visualize>mesh distance fields. Why is this?

(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