Does Godot render stuff that's beyond the camera's FOV?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Macryc


Does it make sense to instance more complex scenes only when the character gets closer to them to help performance? Does Godot even bother about scenes which aren’t yet in the camera’s FOV? I have a large structure in my level with quite a few textures etc. This structure is far beyond the character’s (and camera’s) FOV for the first half of the level. I am wondering if I were to only instance this node once the character is about to see it show up on the horizon, would that impact performance in any way? Or does Godot ignore the materials/shaders/meshes which the camera doesn’t see?

:bust_in_silhouette: Reply From: Magso

Godot uses frustum culling so it will render anything within the perspective and clip planes. Occlusion culling is not yet featured in Godot, however it is possible to make your own culling system out of voxels or raycasts. I did the latter and it’s pretty heavy on the CPU.

Is occlusion culling being missing from Godot the reason why SSAO is pretty much unusable unless you have a tiny level scene?

Macryc | 2020-02-07 10:57

I know what you mean but I’m pretty sure the two aren’t connected. SSAO is fine showing in the unity and unreal editors when occlusion culling isn’t being used so I would say it’s down to whatever algorithm is used for SSAO on Godot. It is also advised to use AO in the material rather than the environment. Spatial Material — Godot Engine (3.2) documentation in English

Magso | 2020-02-07 11:56