godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.05k stars 21.12k forks source link

3D occluders #9786

Closed Zylann closed 4 years ago

Zylann commented 7 years ago

I thought it would be interesting to have a way to cull 3D objects in addition to basic frustum culling. In busy scenes, it can happen that many things are in the frustum, slowing FPS down, but maybe only half can actually be seen, because they can be hidden by a wall, by a hill, litterally anything.

2.x had Rooms and Portals, but I feel like they are a bit too specific to interiors. If all you need is just a quad to occlude what's behind a wall or a hill, rooms aren't suited for that. Also rooms don't work in 3.0 (I tried to set an Area but it produced an error). I noted Unity also has this feature, which seems to do a great job, be it for interior or exterior scenes.

An alternative to manually place occluders in a scene is occlusion queries (which work for any kind of scene or procedural terrain), but I don't know if they are doable with the GLES3 renderer.

reduz commented 7 years ago

i have on my todo list a bunch of pretty cool culling techniques, but as always out of time for 3.0

On Sat, Jul 22, 2017 at 7:11 PM, Marc notifications@github.com wrote:

I thought it would be interesting to have a way to cull 3D objects in addition to basic frustrum culling. In busy scenes, it can happen that many things are in the frustrum, but maybe only half can actually be seen, because they can be hidden by a wall, by a hill, litterally anything. 2.x had Rooms and Portals, but I feel like they are a bit too specific to interiors. If all you need is just a quad to occlude what's behind a wall or a hill, rooms aren't suited for that. Also rooms don't work in 3.0. I noted Unity also has this feature, which seems to do a great job, be it for interior or exterior scenes.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/9786, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-Z2y2ctSjMPz9S28GPoBNZfF1oXkA2ks5sQnOOgaJpZM4OgS7v .

Zireael07 commented 6 years ago

Bump, any hope of getting occlusion culling in 3D?

Dudemanjude commented 6 years ago

@Zireael07 See here, it says it is expected for 3.2. https://www.patreon.com/posts/17595598

HeadClot commented 6 years ago

Thanks for the information @Dudemanjude :)

name-here commented 4 years ago

Is this still being worked on? It seems pretty important.

clayjohn commented 4 years ago

@name-here it's planned for 4.0

HeadClot commented 4 years ago

@clayjohn Who will be working on it for 4.0 or has that not been hammered out yet?

clayjohn commented 4 years ago

reduz I guess. Unless there is someone out there who knows how to do it really efficiently and really wants to do it.

Calinou commented 4 years ago

Closing in favor of #22048, which has more information on the subject. Occlusion culling is still being worked on for 4.0 :slightly_smiling_face: