Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OccluderInstance3D baking #14

Open
Calinou opened this issue May 2, 2023 · 1 comment
Open

Add OccluderInstance3D baking #14

Calinou opened this issue May 2, 2023 · 1 comment

Comments

@Calinou
Copy link
Contributor

Calinou commented May 2, 2023

Godot's own OccluderInstance3D baker is not able to bake Cyclops nodes into an occluder, since it only accepts MeshInstance3D nodes. This means you can't use Godot's occlusion culling unless you manually place occluders, which is time-consuming.

It should be possible to manually create an ArrayOccluder resource to give to an OccluderInstance3D node. This bypasses Godot's own occluder baker entirely. This can be one occluder per shape, or one for the entire collection of blocks (which may be faster to render).

Additionally, the baked occluders could be shrunk along the normals to avoid overocclusion (similar to gongpha/gdQmapbsp@9d031ad).

@blackears
Copy link
Owner

I've added code to generate occluders. I'm not sure if it works though - I've not used occluders before and don't know how to test it.

I was also not able to add the ability to shrink the occluder size. This is going to have to wait on blocks being free to be anywhere in the scene tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants