We’re excited to share an important update to the GeometryService Constructive Solid Geometry (CSG) APIs that unify all Solid Modeling workflows - whether you’re scripting runtime geometry, building Studio tools, or creating custom solid modeling plugins.
In the previous release, GeometryService was made available in published experiences — enabling CSG operations such as UnionAsync, IntersectAsync, and SubtractAsync to run during the gameplay.
With this final release, we are also excited to announce that:
GeometryServicenow works in Plugins.
You can use the full range of GeometryService APIs directly in plugin scripts.
This means you can specify options such as SplitApart = true and immediately get split resulting parts.
There is now full compatibility between the GeometryService APIs, the BasePart CSG APIs, and the Studio Solid Modeling tools.
You can seamlessly move between runtime code, plugin scripts and Studio Modeling operations, each time benefiting from the mode that’s most convenient for you. Parts that are created from any method are fully compatible across methods as well.
While there is now improved compatibility, if you maintain a Studio plugin that is still using the old BasePart CSG APIs, we strongly recommend transitioning to the new GeometryService APIs since all new features, fixes and performance improvements will be focused on the new GeometryService APIs from now on.
What’s next
While this release marks an important milestone in the development of the revamped Solid Modeling APIs, the team is continuing to work towards the following improvements in the near future:
Improvements to bandwidth and replication speed of solid modeling operations
Improvements to the Solid Modeling user experience and workflow within Studio
Adding support for Solid Modeling APIs like Union, Intersect and Subtract on MeshParts
If you are interested in testing out some of these upcoming improvements / features, you can sign up for the ongoing Solid Modeling Early Access program by filling out this survey. (Visit this post to learn more about the Early Access Program)
Please feel free to drop in any comments, feedback or report any bugs you might notice by responding to the post below.
Will there be a way to undo CSG? If so, would it be possible to undo it out-of-order and have it recalculate the CSG? A direct example of this would be snowprint deformation, where older snowprints would get removed after a certain amount of time?
(I know there are other solutions for this, such as just replacing the original snow objects after a period of time, but I would like a direct solution if possible.)
For a different question, are there any updates regarding mixing CSG with meshes (if not all meshes, at least MeshParts)?
I tried using IntersectAsync for creating player hitboxes, ended up using pre-made hitboxes because they take like 8 seconds to load using IntersectAsync.
Will this full release make the process of using these methods like IntersectAsync faster or something?
Can the CSG API please have a client side option with no replication. If I wanted to make a game where say bullets can make holes in a wooden wall, replication speed would ruin that experience. Having an option to make it client side and then manually replicate it to other players with a remote event would be much smoother for gameplay.
I’d be interested if there was a way to either convert a PartOperation into a MeshPart (maintaining all the properties of it) or strip the non-mesh details from a PartOperation so we don’t replicate non-mesh details to the client. We’ve a lot of CSG generated models in our game, and a large proportion of the replication time seems to be taken up by them so anything that can reduce their size would be good.
I appreciate we could manually export as OBJ and then upload, but we lose certain properties (colors I believe) and this is quite time consuming and fiddly to get right. It feels fairly easy for this to be automated.
Hey! We are actually working right now on leveraging our cloud infrastructure so that in-experience only a render optimized mesh is served, so there should not be any additional cost you pay for using PartOperations.
If you still want to convert PartOps to MeshParts, our upcoming Csg on Mesh release will allow you to do this
I just looked at the code and it uses UnionAsync and not IntersectAsync, sorry. Also I was using PreciseConvexDecomposition for the bean player hitbox which I don’t think I need for combinding basic shapes. I will try switching to CollisionFidelity.Default.
Makes me wonder if PreciseConvexDecomposition is gonna get faster though because it is very slow, even when doing it in studio.
If you don’t need the precision of PreciseConvexDecomposition I would recommend using Default. It is significantly faster than Precise and when using it in-experience with the Csg Api, it will use a special algorithm to create exact collision geometry in most cases.
Will CSG ever be accessed client side? At the moment, I have the client just clone the hitbox made by the server but it would be nice if the client could make it from scratch.