Sunsetting the Legacy Computational Solid Geometry (CSG) Engine

Hello Creators,

We are writing to inform you that due to a potential third party security vulnerability, the legacy Computational Solid Geometry (CSG) system will be sunset from Studio on September 18, 2023.

As of today, all creators have been upgraded to use the latest CSG engine. We have taken a number of steps to ensure a smooth transition to our latest CSG engine for as many workflows as possible. Where it has not been possible to support the exact legacy functionality, we have provided workarounds listed below.

A primary value of the Roblox platform is providing a stable set of functionality that our creator community can use and can depend on to build their experiences. We do not take sunsets like this lightly and it is always a last resort for the team. We are committed to address all community reported issues with solutions or workarounds and appreciate your patience during the transition.

With that, let us dive into the details:

To help disambiguate between CSG capabilities and changes over time, here is a quick summary of the three primary versions of the CSG system that have existed on Roblox:

CSGv1: Studio only modeling (To be sunset after grace period)

  • The v1 system was the original CSG system available on Roblox
  • Its main role was to provide creators the ability to model within Studio.
  • It was only available within Studio and not available for in-experience CSG APIs
  • It is now referred to as “Legacy CSG” within Studio

CSGv2: More accurate, Studio and in-experience (Superseded by v3 today)

  • v2 was introduced to support the new in-experience CSG Async APIs to enable CSG (Union, Subtract, Negate) within experiences
  • The entire CSG system was overhauled to be much more precise and robust when performing CSG calculations

CSGv3: More performance, same accuracy, Studio and in-experience (Current standard)

  • In mid 2021, the v3 CSG engine was introduced to the community as a beta.
  • It was architected to be much more performant (nearly 20x faster in some cases) and to fix a number of issues reported in previous versions
  • CSGv3 has also added a number of new features like the new intersect tool and IntersectAsync API

Transitioning to CSG v3

…from v2

  • Over the past few weeks, we have been transitioning parts of the creator community from v2 to v3
  • As of today, we are officially moving CSGv3 out of beta, and rolling it out to everyone using CSG within Studio, in-experience and our Studio Plugin community!
  • There were some small differences in behavior between v3 and v2 reported in the dev forum post that have all been addressed at this point. Please refer to the list below to achieve v2 behavior if your workflow requires it.
  • Plugins: If you maintain a Studio plugin that uses CSGv2, your plugin has also been upgraded to use the new CSGv3 code path and can use the same solutions / workarounds listed below if you need to achieve v2 behavior.
    *** If you notice any blocking behavior with this transition please leave a message below so we can address the issue.**
  • While we are addressing these issues, you can force all studio plugins to use the v2 CSG engine by going to Studio Settings > Physics > Enable legacy CSG for plugins.
  • Warning: This checkbox will be removed after a grace period of one month ending on September 18, 2023.
    Edit (18 Sept 2023): The grace period has now expired and this setting is no longer available. Please see update above

… from v1

  • If you are still using the v1 CSG system you will notice that you have been upgraded to CSGv3 today due to the potential security vulnerability
  • Based on our current telemetry, we are seeing a very small number of creators in the entire creator community who are still using the v1 CSG system (~60 creators)
  • We have also addressed all the primary concerns from CSGv1 users as reported in the dev forum post.
  • For those that still have workflows that are affected, please let us know by responding to this post below.
  • While we are addressing these issues, you can force Studio to use the legacy v1 CSG engine by going to Studio Settings > Physics > Enable Legacy CSG for Roblox Tools. Note: you will need to do this every time you restart Studio due to the potential security vulnerability
  • Warning: This checkbox will be removed after a grace period of one month ending on September 18, 2023.
    Edit (18 Sept 2023): The grace period has now expired and this setting is no longer available. Please see update above

Addressing Reported issues

The following is a list of reported issues from the previous dev forum thread and explanations for how we have addressed them or how you can get back to the previous behavior while utilizing the latest CSGv3 engine:

1. Color transfer of unioned parts (A ∪ B):

  • Current default behavior (v3): When performing a CSG Union on two parts, the resulting part maintains the colors of each original part
  • UsePartColor behavior: If you would like to use the second part’s color for the entire resulting part, check the UsePartColor property on the final UnionOperation part. This will also allow you to change the part color on the resulting part to whatever color you like

2. Color transfer of a negated part (A ∪ -B):

  • V2 behavior (previous): When unioning a part with a negated part of a different color, the resulting UnionOperation would use the remaining part’s color for the entire resulting part
  • V3 behavior (current): When unioning a part with a negated part of a different color, the resulting UnionOperation will fill the negated part’s color for the newly exposed surface
  • Workaround: If you would like to keep the previous behavior, select the UsePartColor property on the resulting UnionOperation instance.

(v2 behavior)
(v2 behavior)


(v3 behavior + workaround)

3. Color transfer of a negated part with an already Unioned part ((A ∪ B) ∪ -C)

  • v2 behavior (previous): In previous versions, when you first union two parts and then union the resulting UnionOperation with another negated part of a different color, the final union would use the remaining part’s color(s) for the newly exposed surface.

  • v3 Behavior (current): When you first union two parts and then union the resulting UnionOperation with another negated part of a different color, the final union will adopt the color of the negated part for the newly exposed surface.

  • Workaround: To achieve the previous result on v3, you can apply the distributive property to reorder the operations, specifically ((A ∪ B) ∪ -C) can be expressed as (((A U -C) ∪ (B ∪ -C)), and select the UsePartColor property on the intermediate union parts.

    This sequence of steps should help you achieve the intended outcome:

    1. Separate the already unioned part.
    2. Duplicate the negated part.
    3. Union each negated part with one of the two separated parts and select the UsePartColor property on the result union instance.
    4. Union the two resulting union instances.

(v2 behavior)

(v3 behavior)

(Workaround)

4. Alignment and symmetry of the Sphere primitive:

  • When CSGv3 was released we introduced a new sphere primitive (bucky ball) to improve performance. However, this resulted in slight geometry differences and alignment issues.
  • To address these issues, we’ve brought back the legacy sphere primitive (v1 ball) to Studio providing a consistent behavior to CSGv1.
  • The cylinder primitive has also been upgraded to ensure accurate alignment and to enable the creation of seamless domes in any direction.
  • Note: The new sphere primitive (bucky-ball) will continue to be used for in-experience operations to maintain the performance characteristics thousands of creators are already depending on while the v1 ball sphere primitive will be used within Studio.
  • CSGv1 Sphere Primitive:
    1. Studio: “v1 ball”
    2. In-experience: N/A
  • CSGv2 Sphere Primitive:
    1. Studio: “quad-ball” (not pictured below)
    2. In-experience: “bucky-ball”
  • CSGv3 Sphere Primitive (current behavior):
    1. Studio: “v1 ball”
    2. In-experience: “bucky-ball”

Figure 1 (Left): “v1 ball” sphere primitive (better alignment with cylinders, axis symmetry,
used in Studio).

Figure 2 (Right): “bucky-ball” sphere primitive (better performance, used for in-experience APIs).

5. Existing places with models created from older CSG versions:

  • The upgrade to using v3 will not make any modifications to any existing parts you have within experiences or Studio.
  • The primitive changes and color transfer adjustments outlined above will not affect your models until you explicitly edit an existing CSG part.
  • When editing existing CSG parts can be regenerated and existing artifacts are expected to disappear.
  • For models featuring multiple old CSG parts where sphere/cylinder alignment or color is maintained across them, try “editing” each part to trigger regeneration of that part with the latest fixes.
  • A simple, non-destructive, way to do this is to just select a part and Negate it twice

6. No Visible Primitive Shifting:

  • We have resolved the issue of visible primitive shifting when separating a CSG V1 unioned part in V3.

7. Smooth Edges:

  • A SmoothingAngle property was introduced for CSG parts to achieve rounded CSG results. Triangle vertex normals will be adjusted whenever you change the smooth angle value. Please refer to this post for more information.

  • We’re addressing side effects and potential shading issues arising from the introduction of this property.

Coming soon

We have a number of additions and performance improvements to the v3 CSG engine coming down the pipeline. We are very excited to share those announcements with the entire creator community over the next few months so stay tuned!

Thank you,
@meshadapt, @syntezoid and @FGmm_r2 (on behalf of the entire Roblox Geometry Team)

163 Likes

This topic was automatically opened after 10 minutes.

Thank you so much for adding this feature for Unions it’s gonna be extremely useful for builders. I always had the issue with not being able to change the color inside the union. Now it’s a easy solution instead of tedious part placement. :hidere:

29 Likes

thank god for that union update. that discoloured crap was very annoying

29 Likes

Always awesome to see better CSG capabilities!
Can’t wait to experiment with the new system.

26 Likes

The potential security vulnerability affects players or developers?


Also, there is this old Union that I created in 2020 and when many of these are displayed to low end devices, they crash.

When making a new Union similar to that one, the new one has more triangles (looking at the TriangleCount property). What could be causing this crash with the old Union despite having less triangle count?


Does changing that Union will ensure it will perform better for low end devices with this new CSG version?

28 Likes

I’m eager to see how the engine develops over the coming years.

I believe that Roblox won’t be the same in 2025 and will be something far greater than it is now as a result of these fantastic advancements.

I hope Roblox keeps going in this direction and doesn’t interrupt the current flow.

I appreciate Roblox. :heart: :+1:

25 Likes

Finally, making domes and complex shapes is easier than ever and these problems regarding unions are now fixed!

Great work, keep on publishing these greatly appreciated updates!

18 Likes

Great that Roblox are releasing these features, which would make modelling significantly easier!

16 Likes

Great work for now even are making for adding this new features for union update. I’m excited

12 Likes

I haven’t used V1 for years so this doesn’t affect me

I do request that in the future that the colour map of a CSG mesh can be changed without needing to seperate the union then joining it up again after changing the individual parts

13 Likes

We have a number of additions and performance improvements to the v3 CSG engine coming down the pipeline.

I’m still waiting for a fix regarding unnecessary triangles being generated…


It sure would be great if there was something that decimated triangles on flat surfaces, because good grief, 2k+ triangles just by unioning a sphere by itself is abhorrent.

21 Likes

gah i like the new crashes, also dont try asking what the vuln is, it’ll never be answered

13 Likes

the crashes are probably caused by using data from an old file. perhaps its only a transitional thing?

13 Likes

@focasds the 3rd party vulnerability won’t impact developers or players. Regarding the crash issues on low-end device crash, which are associated with old unions, it’s likely that this isn’t directly linked to triangle count. It is worth noting that the latest CSG version has substantial improvements in robustness, particularly when compared to CSG v1.

If you could share your old union model(s) (DM would be preferred), we will investigate further and provide you with a more definite response.

Additionally, we have observed that the new version can have more triangles. We are actively working on the optimization to eliminate unnecessary triangle generation.

14 Likes

@Golden Would it be possible for you to share the files that could assist us in reproducing the crashes?

11 Likes

Is it a plan to provide CSG in-exprience functions for clients? It`s lag and cost much if I wound like to do some CSG jobs in game for specific persons rapidly while requesting from server.

12 Likes

I’ve found a weird bug trying to intersect these two spheres:

It only happens in this specific positional setup, when I move them it works fine:

It consistently happens, if I put them back in that spot the error comes back.

CSG bug.rbxl (71.8 KB)
I haven’t tested on another computer, reproducing if this happens the same on all machines is just to try intersecting those two spheres, and also moving them somewhere else to see if it suddenly works for you.

8 Likes

Nice update.

I’ve always found that the nature of creating meshes as shapes and then, using those shapes to create more shapes to be extremely limiting. I would appreciate some sort of manual vertex control (similar to how blender works) where you can manipulate vertices, lines and faces with the normal studio tools. In addition, be able to import any outside mesh and being able to do that in “real time” would be a game changer.

I almost always get into a hole when doing the following: make mesh on blender, import mesh to Roblox, mesh doesn’t look right, go back to blender, repeat, etc.

7 Likes

will it ever be possible to union meshparts

3 Likes