Could someone help me debug these rendering artifacts?

I am sure it’s something to do with my geometry or perhaps I’ve derped the lighting but I’m not sure what is causing it.
I have recorded a video that demonstrates the problem, only happens whilst moving.

Thank you

I can’t see any artifacts (except the h264 ones) in the video. What exactly is the problem?

He is talking about the white squares randomly appearing.

Yes, not really sure what to call them as I don’t know what’s causing it. Any ideas?

Looks like culled objects are taking a bit longer to appear as you move around. I have the same issue as well on heavy levels so optimization and/or hardware upgrade is all i can think of to fix it. You can also increase the bounds of the meshes i think but it will only make performance worse.

Jacky is correct, that is the engines occlusion culling working to help optimize performance.

There are a couple of ways to go about looking into this.

You can visually test your occlusion culling by using the console command r.VisualizeOccludedPrimities 1. This will only be visible in the editor and not while in PIE/Simulate. This will place a green bounding box around the meshes that are occluded. This bounds can be controlled by the Bounds Scale for each mesh in the Details panel when selected. This may not be the best way to fix this issue and I would recommend enabling HZBOcclusion. You can do this by using the console command r.HZBOcclusion 1.

HZB Occlusion will use an approximation for bounds depending on the size of the mesh rather than strictly using the bounds that are set. If you’re using the console command to visualize the occluded primitives you can see that the mesh will become unoccluded before being visible. There are still improvements to be made with this, which is why it is disabled by default right now, but it can help in situations like this without the need to increase the bounds scale on multiple meshes.

If you do go the bounds scale route only increase where needed and increment in the decimal range. The default is 1.0. So try 1.15 and see if that works. If not just increase by .05 or .1 until you get the result you need. If you need to see the bounds of each mesh you can enable this in the Show > Advanced > Bounds. Then when you select the mesh you will see a representation of the bounds that you adjust in the details panel.

I hope this helps.

Tim

There have been issues like this for a while caused by latent occlusion queries. Occlusion queries are done a frame behind for technical reasons.

Tim is right that increasing bound scale will fix it in some cases, but you will be chasing your tail and eventually have to increase too many things using that method which will cause overall performance too drop eventually. A better solution is to have a sealed background mesh that encapsulates the playable area for any areas that are made out of tiny meshes jammed together. Usually if you are building more custom level geometry using 3dsmax this issue will not present itself.

The background mesh can be a very crude lowpoly bsp-like mesh. If your level is mostly a cave, the mesh can be really simple. If your level is more elaborate like a series of caves with a bunch of outside exits you need to put a little more work into it. We commonly do stuff like this for our levels for reasons such as preventing light leaking as well. Fixing occlusion isn’t the only reason to do that. Give it a black, lit material so that it can cast shadows as well to help with light leaking. Then make sure to set the lightmap res very low (4 or so) to keep it from impacting build times.

Thank you all. I feel the best solution will be to design the level geometry in Blender and export it as a mesh.

Do you mean set the diffuse colour to black for the level geometry, why exactly?

no, for the box that surrounds your cave. its just there so you dont’ see the bright fog color. if your level has no bright day exterior you could just make the fog black or put a black material on the sky dome instead to fix the issue. You aren’t really fixing the issue, you are making it so it is almost unnoticeable.