In-experience Constructive Solid Geometry (CSG) APIs now available in published experiences [Beta]

Not yet. There are a lot of issues to work through to add mesh support. I promise it’s being worked on

3 Likes

This update has come in clutch for future projects I’m planning. Great job, Roblox.

1 Like

It’s about draw calls, no amount of weld constraints and anchoring is going to fix that, that will only fix physics-related performance issues.

Draw calls are an low-level engine issue.
Having lots of unique models and unions in a game is going to bottleneck the CPU regardless of if parts are anchored or not.

At some point the CPU can’t send draw calls to the GPU fast enough and starts dropping frames.

1 Like

why don’t you simply apply the result to the original? this is called double subtraction btw, or intersection

1 Like

I ended up using the intersect function to do it, it would just be nice to do it without a second calculation.

On another note, the entire CSG system seems multiple times slower in game compared to studio. I don’t see anywhere to enable a beta property so I’m not sure if I can’t find the enable button or if its just worse in game. If anyone can tell me if I’m missing something that would be great.

Are you using the new GeometryService APIs? If you think it’s a issue with Roblox you should file a bug report.

Yes, everything is using GeometryService. I’ll wait until a bit more confirmation that it’s a bug before reporting it, but there is a very noticable difference in calculation time between studio and in game.

In game

In studio

1 Like

It could be because the CSG operations have to replicate from the server to the client; which can be expensive depending on the complexity of the model. If you use CSG on the client though does the calculation time difference still occur?

I’m doing it on the server, but I moved the same code to the client and the result is the same. Still has a much higher calculation time than it does in studio.

1 Like

Interesting. Have you tried timing the computation itself? I’m genuinely interested to see if this is a bug but having seen anything like that myself. At a glance it looks a) super cool but also b) like there is some replication delay.

If you want me to take a look at it, feel free to shoot me a PM (either joining a group or an rbxl file to test)

Are you using collisions on intersected parts?

Hey creators,

Thanks so much for the active feedback and we hope you have been enjoying playing with these new APIs

We are tracking a few recent issues that came up that might affect you:

  1. Due to this recently reported rendering issue, we had to turn off some fixes for flickering when using CSG operations. The team is actively working on resolving this issue and we will report back when it has been fixed.
  2. In some cases, you might face issues with box collisions due to parts having an off-center origin. This issue has already been fixed and should be rolling out in an upcoming release
  3. In some edge cases, you might hit an infinite load issue due to coplanar phase removal when performing CSG operations. Thanks to the dev that reported this via DM to us. This issue has also been fixed and should be rolling out in an upcoming release.

All of these issues were identified thanks to your active feedback. Please keep them coming!

5 Likes

Hey! The new system is great except for one issue regarding GeometryService:SubtractAsync().

If you resize a PartOperation and subtract it from another part, the PartOperation’s Size and PartColor are reverted. This is not the case for unions, which has its Size and PartColor applied in the subtraction function for Part:SubtractAsync(). Is this intended or would it be fixed in the future?

Attached is an image and place which explains this better. Thanks :+1:

place.rbxl (56.4 KB)

2 Likes

Hi @HungryMangoes. Thanks for the bug report looking at it right now. This is very much a bug.

I have to say, I LOVE the repro file :slight_smile:

Thanks
~BelgianBikeGuy

2 Likes

Pretty Cool!

Finally a update to better physics in a roblox game!

Things that can be improved:

Would like to see a Substitute function for mesh parts.
Would love to see the documentation being easier.
Keeping a basepart as the main part when subtracting.

Bugs:

On creation of new part after subtraction the new part does not keep color on removed bits

GeometryService

2 Likes

Hi @Loiciboy123

Two bugs were found with scaling and color and are being worked on. In particular with the usePartColor property on PartOperation. You seem to have a slightly different error happening? I’m having some issues seeing the issue from the Gif, If you have an example repro place (or want me to join a group to show me something, feel free to shoot me a DM)

  1. Substitute on MeshParts: it’s definitely something we’re looking at (along with CSG on mesh and so forth). No set ETA but active development
  2. Documentation: If you could explain what your issue is/ was, we could try to make it better for future developers :).
  3. BaseParts unfortunately cannot support Meshes or PartOperation data. I’m not saying this will never be possible but this is a bit more of a fundamental problems. BaseParts are extremely optimized and light but it comes at a cost of a lack of flexibility

Hey @HungryMangoes ,

A quick follow up on your bug report:

  1. Color issue is a trivial fix and we should have that in extremely fast (look for release of bug fix sometime next week)
  2. the issue with scaling is a little more complex but should have a fix the week after that (hopefully in two weeks)
3 Likes

Oh alright sounds good. Thanks again! :smiley:

i commented out the code because it didn’t feel natural inside the game but if you want you can test some stuff inside the game, ill revert the code if youd like!

It would be appreciated to try to identify the problem. (and hopefully discovered I’ve fixed it with code change from yesterday :slight_smile: )