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"

Flickering Distance Fields (and DF shadows)

I think this is the same bug like here: https://answers.unrealengine.com/questions/314077/flickering-distance-field-shadows-on-ati-video-car.html

I also see flickering distance fields. I use the AMD 15.11 driver, so the old bug should be fixed. This is what I see:

alt text

It only seems to happen on ISMCs though, and it gets worse the further the camera is away from the mesh. In that gif you see a bunch of stones, just one ISMC with a few hundreds instances. And since the distance field has extreme flickering, you can imagine how the shadows look like :)

Product Version: UE 4.10
Tags:
more ▼

asked Feb 16 '16 at 05:23 PM in Bug Reports

avatar image

John Alcatraz
1.3k 58 139 127

avatar image Lovecraft_K ♦♦ STAFF Feb 17 '16 at 05:34 PM

Hi John -

Can you take a look at this sample project below, I am seeing the flickering in my Mesh Distance Fields Visualization but that is expected representation of the culling happening, but I am not seeing any flickering in my shadow setup.

MeshVisualization

Shadows

Thank You

Eric Ketchum

avatar image Lovecraft_K ♦♦ STAFF Feb 17 '16 at 05:35 PM

And here is the Test Project:

Test Project 4.10.2

avatar image John Alcatraz Feb 17 '16 at 05:48 PM

Hi Eric, thanks for testing this! In your test project with your setup I don't see the flickering of shadows. But if I set the SpawnRadius to 500 and the amount of Instances to spawn to 5000, then I see the extreme flickering of the shadows. It only seems to happen if meshes that affect distance field overlap, so with your current setup the cubes just never overlap, so no shadow flickering.

avatar image John Alcatraz Feb 17 '16 at 05:55 PM

I have adjusted the spawner to also make the Z location random, and this is how it looks like here:

alt text

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

1 answer: sort voted first

Hi John, I'm helping Eric with this one.

There are limitations with Distance Fields features in a small area. This is culling that is done based on some hard-coded limitations, which is not a bug.

This hard-coded value is controlled by MAX_OBJECTS_PER_TILE and this max is necessary because of D3D11 limitations. It's culling per tile. You can work around this by disabling small meshes, like grass. This can quickly cause this issue to become apparent in your scene.

Some CVars to be aware of.

r.DFShadowScatterTileCulling: This is on by default, but will disable tile culling which can sometimes work to get rid of the shadows poping in and out however, this is still under the limitations set by D3D11.

r. DFShadowWorldTileSize: This is set to 200 by default, but increasing/decreasing the tile size can help in some situations, especially with some larger objects. Inputting large values will not likely help in this situation though, again, the number of objects per tile is still limited by D3D11.

Hopefully things can be improved in the future. Just to clarify as well this is not related to the AMD bug that was reported with Distance Fields not working. That has already been resolved with Catalyst 15.10 and the latest AMD driver is 15.7.

-Tim

more ▼

answered Feb 18 '16 at 01:19 PM

avatar image

Tim Hobson ♦♦ STAFF
48.8k 887 101 878

avatar image John Alcatraz Feb 18 '16 at 04:58 PM

Hi Tim, thanks very much for your answer.

So so with ISMCs each instance counts as an individual object?

If you say it's a limitation set by D3D11, does that mean this will be fixed once support for D3D12 and Vulkan is more mature in the engine?

r.DFShadowScatterTileCulling seems to be interesting, setting it to 0 makes the flickering a lot less extreme, but it's still there. What are the downsides of setting this cvar to 0 instead of the default 1? Less performance?

avatar image Tim Hobson ♦♦ STAFF Feb 18 '16 at 05:26 PM

Regardless of the mesh being instanced, the individual static mesh will still have it's own distance field volume texture. When this mesh is added to the scene the source data is used to populate the texture atlas. All the distance fields are duplicated into FDistanceFieldVolumeTextureAtlas. You can find how much memory is being used by the atlas by looking at your log for LogStaticMesh: Allocated Allocated [texture atlas size] distance field atlast = [value]Mb. This should give you a better idea of how much memory is being used by your DFs as well.

I can only say that it's "possible" that the limitations may be higher with D3D12, but to my knowledge, that's not been tested or worked on at this point.

By disabling r.DFShadowScatterTileCulling I would expect there to be added cost for not culling based on the set tile size.

(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