You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the following scene tree, only MeshInstance3D will have an occluder generated for it:
If you don't have any MeshInstances inside the OccluderInstance3D node but only CSG nodes, the generation will fail with a "No meshes to bake." message.
Screenshots
Normal view
Occlusion culling buffer debug view
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Take CSG nodes into account for occluder generation in the editor plugin that handles this.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The CSG nodes could be converted to meshes for the purpose of occluder generation, but this should be done non-destructively so that you can keep editing your CSG nodes later on.
We may want to see whether we should extend this to other kinds of meshes such as MultiMeshInstances. While MultiMeshInstancees can only be culled as a group, we could allow generating occluders from their geometry.
If this enhancement will not be used often, can it be worked around with a few lines of script?
This may be doable with a script, but it makes sense to have this as a built-in feature given CSG is all about quick iteration times. While rendering performance is not critical when prototyping, many people use CSG in production, especially in simple games that have a low-poly aesthetic.
Is there a reason why this should be core and not an add-on in the asset library?
See above.
The text was updated successfully, but these errors were encountered:
The reason CSGs aren't supported is because their mesh has no index array. Even if you convert a CSG to a MeshInstance3D by setting the MeshInstance3D's mesh to the CSG's mesh, occluders still won't be baked. It is possible to generate an index array by using SurfaceTool.index() though.
Describe the project you are working on
The Godot editor 🙂
Describe the problem or limitation you are having in your project
The new occlusion culling feature in
master
has an occluder generation feature, but it doesn't take CSG nodes into account.cc @JFonS
With the following scene tree, only MeshInstance3D will have an occluder generated for it:
If you don't have any MeshInstances inside the OccluderInstance3D node but only CSG nodes, the generation will fail with a "No meshes to bake." message.
Screenshots
Normal view
Occlusion culling buffer debug view
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Take CSG nodes into account for occluder generation in the editor plugin that handles this.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The CSG nodes could be converted to meshes for the purpose of occluder generation, but this should be done non-destructively so that you can keep editing your CSG nodes later on.
We may want to see whether we should extend this to other kinds of meshes such as MultiMeshInstances. While MultiMeshInstancees can only be culled as a group, we could allow generating occluders from their geometry.
If this enhancement will not be used often, can it be worked around with a few lines of script?
This may be doable with a script, but it makes sense to have this as a built-in feature given CSG is all about quick iteration times. While rendering performance is not critical when prototyping, many people use CSG in production, especially in simple games that have a low-poly aesthetic.
Is there a reason why this should be core and not an add-on in the asset library?
See above.
The text was updated successfully, but these errors were encountered: