Does creating unions slow down your game?

This statement is incorrect.

When you create a union, it goes through a constructive-solid geometry (CSG) algorithm. This is a binary tree which determines booleans (holes) and unions (stuff put together).

Unfortunately, this is prone to a few issues, such as:

  • Multiple vertices in a single vertex location (for example, I notice often 3-5 vertices per corner)
  • Unneeded triangles to construct a polygon (due to Roblox’s poor triangulation methods)
  • Collision issues

These issues contribute masses of lag.

That was a marginal difference. In the video, notice this:

The box has way too many triangles – in reality it should only have 12 (2 per side, 6 sides).

I have had maps produced for me that I have simply denied due to usage of unions. Unions are always laggy and I have recorded this in practice.

4 Likes

Yes creating Unions will slow down your game as the parts you used to make them are still saved. You should only create unions in moderation and if you’d like to somewhat improve the union just follow these steps.

1: Right click on the union on the explorer tab and select Export Selection
2: Add a MeshPart into the explorer
3: Click on the MeshId property and find the file you exported

This will convert the Union into a mesh and should halved the file size.
The performance goes as follows. BasePart > MeshPart > Unions

However if the Union you created is very complex which has a lot of triangles then you may need to export it to Blender to remove the unnecessary faces. The steps to do this is a lot trickier to explain so you may need to look it up.

This uses the same CSG system (I’d assume) and is just as bad as using unions.

I personally use unions scarcely and only when necessary, but unions on their own are not bad both (yours and dev) points are valid.

If you obsessively create hi-tri unions (especially using parts that have hi-tri counts, like spheres) then you’ve more or less started off on the wrong foot already.

You shouldn’t have hi-tri unions in general, unioning many parts together, regardless if you intend on re-using said unions, probably will not work out well.

Unioning and keeping a low-tri count and re-using said unions is ideal, especially in instances where you need to union, either because you don’t have blender or otherwise.

Roblox’s system to union stuff is still really poor that’s for certain but it’s not bad if you use it for specific circumstances.

The box is a good example where CSG fails currently, where there are either many parts and/or circles/spheres being unioned together. But that doesn’t apply to all instances of using unions.

this doesn’t change anything performance-wise.

1 Like

Yes, unions will actually slow down your game and even laggier than using parts!

Sorry I haven’t replied to anyone, my internet was out :sweat_smile:, thanks for all the responses guys!

Unions are not a great choice, since they create triangles/vertices where unneeded, and they actively calculate geometry.

1 Like