In-experience CSG Performance and Robustness Improvements

Has anything been improved Collision wise?

2 Likes

Is this accounting for microscopic part overlaps that add like ~10 extra triangles per joint (sometimes)?

No matter what I do, theres always some tiny floating point error that causes parts to slightly overlap, and adds a lot of triangles to the overall object. This impacts performance, cleanliness, and smoothing no longer works on the object.

Im hoping in the future there is a solution that sort of blends extremely tight edges and faces into a single face? Say within 0.001 studs it’ll just blend

A “Merge Distance” property for the CSG operation methods could actually be pretty game changing! I always find it annoying that i am forced to jump into third party 3D modeling software just to fix broken geometry on super simple unions.

2 Likes

Hard to say if they had done anything collisions wise. From my testing collisions still seem to be pretty broken and buggy overall for anything that isn’t super simple CSG operations.

Small gaps and overlaps at a microscopic level make it impossible to create competitively optimized models, compared to blender. Blender can do so much… right now the only real benefit is the convenience of using integrated tools and modeling to make quick edits and modifications. But CSG does need work on things like this… there is no way developers can combat this at such a small scale.

Normal rendering, showing a microscopic overlap:


wireframe rendering, shows several unnecessary triangles on this single joint:

zoomed out view to get a sense of scale:

@BelgianBikeGuy

2 Likes

This is an excellent update, especially on lightning

Hi @DanBuildsTrains,

I imagine this is in studio modeling. The current improvements are for the GeometryService Async API. That being said, we are planning on rolling out the improvements everywhere. If you want to send that case (or even just the small part that causes the issues in this example), we can take a look at it.

~BelgianBikeGuy

2 Likes

any sights set for mesh csg implementation? I love these improvements

I’d like to report an error regarding this.
I have an ingame saving system that allows me to save unions. If i copy this same union a couple of times, save them all using my saving system, then load it all in, it randomly errors and returns error code -11.
broken union.rbxm (3.2 KB)

Here is a video of it in action
https://streamable.com/ksyo5f

and an image of a printed pcall error
https://gyazo.com/be861aa0b062129bf437e6c6804cbcb9

Whats going on?

1 Like

Hey! Thanks for reporting this issue. Are you using a local script to load the saved unions?

No, im aware of the fact that CSG api does not work on the client. But i still have no idea whats causing this. I get the same error if i try to make an extremely large union, but also if i try to make a lot of unions quickly one after another

Theres a pattern to this somehow since if i load in two of the same save using my save system, its the same exact bricks that refuse to union. Could this be caused by WeldConstraints inside of the unions themselves? Because those are the only instances parented to the unions components.

Sounds like you are using the old API then (the new API does work on the client). If you switch to the new API in GeometryService, the -11 errors should be fixed.

And how do i do that? Switch to the new API i mean

Generally, switching should be fairly straightforward. Instead of mainPart:SubtractAsync(otherParts) you have to call

local GeometryService = game:GetService("GeometryService")
GeometryService:SubtractAsync(mainPart, otherParts)

The new API has a bunch of cool features that the old API does not have (like the ability to be called in local scripts). Please take a look at the documentation here for more information.

Also, back when we introduced the new API, we provided some example place files. These files are also a great starting point for exploring some of the more advanced features the new API has.

I think someone is going to get a nice raise lol, awesome work guys. This update is probably one of the best updates Roblox CSG has ever received.

There’s an issue I’m getting with the PartOperation:SubstituteGeometry API. It seems the center of mass isn’t updating with the geometry and as a result the part is ‘standing up’ when it settles on the ground. All the operations are subtractions.


EDIT: RBXM of a glitched part:
BrokenPart.rbxm (44.3 KB)

Hi @Wallath_00 ,
The issue has been identified and a fix was merged in. Thanks for bringing this up!
~BelgianBikeGuy

1 Like