Hey guys,
I am fighting with a new problem .
I have this large scene , that I build using static lighting . I have alot of trees and grass in my level, but it was made a few patches ago. I tried the new tools in 4.8 and I was amazed. Now I whant to try and update the project using the tools, and fully dinamic lighting.
i set up Ray traced distance field shadows, and made all the other adjustments from the documentation .
Everything seems to work fine, but in an area of the maps shadows flicker . The area is a big mesh - an island , and a few building on it. The building are full of meshes too . I have a small video to show the issue .
I tried changing everything , removing the meshes below the building, moving the building. Deleting parts , deleting indoor small lights . Deleting the sky light doesnt change it either. Options of the main light don’t help .
I even tought it might be drivers, something like that has happened before with reflection captures and a buggy nvidia driver, but now i tested 3 versions of it and it isnt that.
What I have observed is - if I move these flickering meshes elsewhere on the map - there is not flicker. I tried moving the whole thing , but it didnt help then. Also there is no other place on the map that this happens.
I really don’t know what this could be.
Hi Samuil,
Can you post a screen shot with your Distance Field Mesh view (Viewport > Show > Visualize > Mesh Distance Fields)?
Depending on how you’ve setup your larger meshes and if they are broken up into smaller chunks that are assembled this can likely be an issue as well. Distance fields do not scale well for larger meshes. It’s better to break the mesh into smaller modular chunks.
In the Static Mesh editor have you adjusted the distance field resolution in the build settings for this mesh as well? I’d imagine, from looking at the mesh it’s flickering between partly see-through and solid shadow. More than likely you’ll be able to see through the distance field when in that view (similar to what is show with low resolution in the Distance Field AO documentation).
Also, to make things easier to see with the distance fields, can you select your light source and set the Cascaded Shadow Map Dynamic distance to 0. This will take this part out of the equation and we can look solely at the distance field shadows being generated. Please post a screen shot of this as well.
Let me know.
Tim
This is absolutely it! When in distance field view , the mesh has see-through wall s.
I increased the resolution to 2 and now looks alot better , but it still flickers , I’m trying 3 times increase in resolution right now.
Also before I saw your response , I was changing some options , and lowering the DF shadows distance in the source light was making the problem slowly go away, until at a certain distance it was no longer there. I probably when too far with the distance , but is there some limitation to how much distance DF shadows can have ?
I’ll be testing the increased resolution, and if it doesnt work then I’ll just lower the distance until it is fixed.
Thanks for your fast and comprehensive answer !
Well unfortunetly the flickering continues no matter the resolution of distance fields.
I increased it to 3 and then 4 times , and in the vizualizer it looked axactly like the mesh, very good and solid. problem is it still flickers with distance set too high.
I found that some other objects in that same area also flicker in the vizualizer, they are just covered by other shadows and I didn’t notice them. Like some very small meshes - small pillars . In the video below you could see that.
I also tried using a replacement mesh for the distance fileds of the tower, with their exact size but just solid primitives . Their DF looks as expected , but shadows still flicker.
More info on the tower that might be relevant - its made out of 3 big pieces , there are big windows on each floor . The windows are part of the mesh and are made out of two elements - outside element with Masked material set to it, and inside element with transparent material . I did that because of an issue with fully transparent windows, rendering one over the other when looking from outside. I don’t know if that might be an issue.
Also the small object you can see flickering in the video are simple meshes and have pretty good looking DF .
video with DF viz