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

Improve CSG Quality with elalish/manifold #9711

Open
fire opened this issue May 9, 2024 · 5 comments
Open

Improve CSG Quality with elalish/manifold #9711

fire opened this issue May 9, 2024 · 5 comments
Labels

Comments

@fire
Copy link
Member

fire commented May 9, 2024

Describe the project you are working on

I am in the process of developing a 3D VR social networking application using the Godot engine and also working on Godot Engine.

Describe the problem or limitation you are having in your project

The current limitation pertains to Godot's handling of trivial, large and intricate 3D models with CSG which adversely affects the user experience when doing 3d prototyping. CSGMesh corrupts trivially when operating on multiple complex assets.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I propose integrating the Manifold library into the Godot engine. This feature would enhance the quality and integrity of 3D models processed by the engine, thereby preventing mesh corruption even in large and complex models.

The promise that Manifold makes is as long as all the input meshes are manifold, they will stay manifold through the mesh Boolean operators.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

I propose augmenting the CSG module in the Godot Engine with the manifold Boolean operators instead of Godot Engine's own operators. This change would improve the handling of complex geometries and prevent mesh corruption.

Testing many old CSG bug reports to see if they're solvable.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Given the 20-30 issues on GitHub related to CSG quality, it is clear that there is a need to improve this aspect of the Godot Engine.

Is there a reason why this should be core and not an add-on in the asset library?

Before deciding whether this should be a core feature or an add-on, I would like to poll the community to gauge its importance. If it is deemed critical for improving the quality of 3D models, it should be integrated into the core. Otherwise, it could be developed as an add-on gdextension.

There is a cost to adding the manifold library to Godot Engine, so I want to ask.

We could remove CSG from core and point to this official as an extension too.

@fire fire changed the title Improve Godot Engin's CSG Quality with elalish/manifold Improve CSG Quality with elalish/manifold May 9, 2024
@Zireael07
Copy link

As a heavy user of CSG I am wholeheartedly in support

@fire
Copy link
Member Author

fire commented May 9, 2024

See also elalish/manifold#91

@marcgpuig
Copy link

Having this in core would be great not only for level prototyping, but also for reliability when using CSG in procedural generation.

@sievaxx
Copy link

sievaxx commented Jun 3, 2024

Another option for improving Godot's CSG could be to look into replicating the algorithm outlined in Chisel for Unity, which has it's MIT Licensed source available. Chisel's algorithm is specifically designed for video game applications. It appears to be less robust then manifold, but good enough for video game usage over the current core implementation. Although, as Chisel is not a library and is written in C#, it's algorithm would have to be reimplemented for godot, but that may be a better idea over adding a new library into core or deprecating/removing the current csg nodes and pointing to a plugin.

@fire
Copy link
Member Author

fire commented Jun 3, 2024

Once thrust and exceptions are removed from manifold it seems the same amount of work to use chisel.

There are reports that the chisel CSG algorithm is not as robust RadicalCSG/Chisel.Prototype#187

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

Successfully merging a pull request may close this issue.

5 participants