I am having trouble with DFAO in a particular scene. It was worked fine on other test scenes but for some reason this one is giving me trouble and I am curious if I have a project parameter or scene setup issue. Notice in the attachment that on the ceiling there is a horizontal line that runs across. This disappears if I turn DFAO off and it also shows up in the DFAO visualizer. It does not seem to have any effect if I adjust the DFAO distance parameters in the skylight either FWIW.
I am also having problems with DFAO – it looks like the slider bars are not doing anything, and the the effect only shows up when the DFAO color is > 0. As the DFAO color approaches 0 the effect disappears completely (clicking casts shadows on and off on the area light makes no visual impact). Here’s a link to the thread:
Sorry for the shameless cross post – I’ll keep an eye on this thread to see if anyone can solve either of our problems.
It looks like DFAO is actually working when you look at the edges of those white meshes to the ceiling, but the meshes’ distance field resolutions may not be enough. Check out Mesh DistanceFields under Show > Visualize and post another screenshot like that if you can. Or just open up those meshes and increase Distance Field Resolution Scale(under LOD0) and see if it has any effect.
I agree with Jacky that a screen shot of the Show > Visualize > Mesh Distance Fields and Show > Visualize > Distance Field Ambient Occlusion would be most helpful.
The resolution may need to be adjusted. Using the visualize methods are the best method for troubleshooting some of the issues that may be going on with the meshes in question.
Also, the distance field resolution is set to 1 by default. I would only adjust incrementally by single digits (ie. 1, 2, 3) to see if this correct the problem. Large values are not the best solution when trying to initially see what’s going on.
Yes the DFAO effect is definitely working fine except for at the edges of some sort of fixed distance from the camera view where the DFAO stops. I did use the visualizer before posting although I’ll be honest I’m not exactly sure what to look for on the Mesh Distance Fields. I didn’t see anything that stood out in that area. You can see the same “seam” on the visual Distance Field Ambient Occlusion. If it helps that seam/line is always at the fixed distance from the camera and will rotate as the camera rotates. It’s almost like it is at the edge of some sort of clipping/viewing frustum. I also had increased the resolution already albeit I went straight to something high (50) but with Tim’s suggestion I started going in increments and can’t see a change. Here are the attached Visualizers:
Resolution looks fine. I didnt notice that your main problem was that horizontal artifact. I have seen that just recently in one of my projects and i think it is either the result of using very large meshes(interior of a hangar where the side walls and the roof are 3 separate but huge meshes) or the distance, but i’m not sure which one is causing the problem yet.
Funny enough this is beginnings of the interior of a hangar as well that we are doing for an Arch Viz project. I think you are right but I’m trying to figure out the best way to solve it. What I have now is shown at a real world scale. I guess one option would be to scale all the meshes down. Or would just splitting this into several sub-meshes help this problem? I’m not sure this is the problem since the seem is always at the same place from the camera no matter what. So I still think the artifact would be there…
Yes that reveals what it is. DFAO is only computed up to a certain distance, and in 4.7 and before there was an artifact in fading out the AO at the max distance. Should be better in 4.8. There’s a cvar that controls distance from the viewer that DFAO is computed at, ‘r.aomaxviewdistance’. The default is 20000 IIRC which is 200 meters. This will probably be exposed through a property in the UI in the future.
It looks like your room is quite a bit too large for real world scale. This can be seen by the DFAO in the corners too, the default max occlusion distance is 600 units, or 6 meters which should allow the floor to darken the ceiling, but instead you only get AO in the corners with your scale, just like SSAO. DFAO is only medium scale occlusion, not large-scale.
Brilliant! Thanks Daniel, the r.aomaxviewdistance solves the problem.
Thanks! This fixed me up as well. I was aware and can live with the overall distance limitations of DFAO. Once I have materials on it is generally is not too noticeable. I think being able to fade it out when it cuts out will be really nice for sure. I will try to play with the variable you have mentioned here as I am using DFAO in matinee made movie sequences so I am not too terribly worried about frame rate. Thanks again for your reply.