Bring real world creation to your experience with Constructive Solid Geometry (CSG) improvements [Beta]

With the new API you can call from local scripts

2 Likes

Hey @KUW_Alt1. As @BubasGaming mentioned, it should be reenabled soon.

There were some issues do to interactions between projects and we had to disable the beta to get some clearer signals on what the issue actually was.

2 Likes

I love you sir, this update is THE best :pray:

Hey there,

Iā€™m wondering when the beta will be re-enabled today? Iā€™m currently running performance tests on various hardware to determine what needs to be refactored or optimized. Our in-house destruction engine is one of the major components, and we would love to see what still needs to be changed. However, we are currently blocked by the beta.

Hello Creators,

The beta should now be available to everyone again. Thank you for your patience. Remember to restart studio and re-enable the beta feature.

Note: The intermittent crash issues should now be resolved but you might notice some flicker for fast CSG operations. We are working on fixing that

4 Likes

Loving this update a lot! Just needs a few performance updates. One problem iā€™m running into is SplitApart acting weird during :SubtractAsync(). Video explains the problem pretty well. I was wondering if there is a fix, or is this just a weird interaction?

1 Like

Maybe you are parenting only one results of Subtract Operation. You should parent them all using a loop.

1 Like

@killnminecraft At a glance it looks like @BubasGaming is correct. The second example (SimpleTools.rbxl) has a couple of modules you should be able to just dump into your places and use that handle a lot of the constraint handling multiple parts and stuff like that

1 Like

Iā€™m trying the SimpleTools, and I keep getting that Internal Dev only error. Also, which scripts would be a benefit? My current way of using CSG would need some modifying and Iā€™m not sure where to start.

1 Like

Internal dev error means that the instance of studio doesnā€™t have the beta feature enabled.

Go check under beta features if itā€™s enabled (I assume it is if youā€™re able to show the little demo from earlier). Try disabling it, rebooting studio and re-enabling it?

As to which modules might be worth looking at, Iā€™d recommend ā€œCSGModuleā€ and ā€œConstraintsā€ that are in ReplicatedStorage. ā€œConstraintsā€ is a dependency of ā€œCSGModuleā€

1 Like

This is a fantastic update! Itā€™s great to see that Roblox is actively listening to their community.

Do you think this will ever come true? Also is there a reason itā€™s server-only?

1 Like

For some reason I canā€™t get it to work, am I doing something wrong?
``lua
local Connection
Connection = RunService.Heartbeat:Connect(function()
local opts = {
SplitApart = true;
CollisionFidelity = Enum.CollisionFidelity.Default;
}

	local success, returns = pcall(GeometryService.SubtractAsync, GeometryService, Purple, workspace:GetPartBoundsInBox(Purple.CFrame,Purple.Size,Params), opts)

	if not success then
		print("Got an error in CSG: "..tostring(returns))
		return
	end
end)
1 Like

With the new beta you can call it on client side scripts already. It just doesnā€™t replicate to the server for safety reasons. We are trying to develop something to allow more freedom while still satisfying all safety concerns

2 Likes

What error are you getting, What parts are you getting for
workspace:GetPartBoundsInBox(Purple.CFrame,Purple.Size,Params)
This looks like it would return Purple also which would be an issue as youā€™d be subtracting Purple from Purple and so ending up with nothing

2 Likes

Why canā€™t i subtract ā€œalready-unioned partsā€ on client? is there some kind of bugs ?

3 Likes

Nope, the parameters of the spatial query api exclude the purple part from it.

1 Like

I literally just now ran into this problem.

3 Likes

Hey do you know anything about this issue?

The game is fine when I subtract in-game generated unions, but when I even just click the union button, I get this error.
CSG3 Error with code: -6

2 Likes

If you could give an example, Iā€™ll take a look at it. Honestly, Iā€™m not the most familiar with the spacial queries. What error is CSG giving you?

2 Likes