-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Allow to use CSG without nodes #46258
Conversation
afc52be
to
6353c47
Compare
If I understand correctly, I've been working on implementing an equivalent feature in 2D in goostengine/goost#39. I've basically added Since all boolean operations on 2D shapes are done via polygons, it doesn't make much sense to create additional resources for those, because it's just easier to expose polygon generation methods for this (like So, I think it makes sense to expose CSG operations this way (or another), even though I haven't used CSG features in Godot (yet got greatly inspired by the existing node approach). |
Currently, the PR doesn't break compat (except for enums, but I'll fix it). I thought about restructuring CSG, too. But I prefer to keep CSG resources to be consistent with Mesh.
Sure, I can get rid of those resources and use meshes directly. The issues with this approach are:
I'll write a proposal where I'll explain better how I'd change CSG to make it friendlier with the current mesh-based procedural geometry. |
6353c47
to
048166e
Compare
I approve the idea of using CSG without nodes, haven't looked into the details of the pr yet, but wanted to say that. |
Cool! I have to find some time to do a proper code review but I agree with the principle idea. |
@trollodel The CI checks are failing because the documentation needs to be updated. |
8f3aab9
to
59cc8ff
Compare
a342d9d
to
c29d8bb
Compare
Add CSG shape resources. Add CSGTool for CSG operations. Make CSG nodes using CSG resources and CSGTool.
c29d8bb
to
c792597
Compare
I don't need this PR anymore as I switched to another approach for procedural content. So, I don't work on this anymore. |
Helps godotengine/godot-proposals#182, godotengine/godot-proposals#1920, #39706
This PR exposes to scripting a SurfaceTool like workflow for CSG, and migrate CSG nodes to use that workflow.
In particular, this PR exposes a bunch of CSG shapes (resources) similar to PrimitiveMesh, where each type holds a specific shape (Box, Cylinder, Sphere, ...); and a dedicated class for doing CSG operations called CSGTool.
Here is a GDScript example of CSGTool:
And the result:
Changes in the code side:
TODO: