Cannot pass through holes cut in parts using unions

ISSUE

Description

When creating the 3D environment for my game, I have ran across this particular issue a number of times. For whatever reason, holes that are cut into unions are not passable. Visually, the hole is there, but when someone tries to walk through, they stop like there is a physical barrier there but there isn’t. As shown in the screenshot below, when I look at my character in explorer and examine the humanoid, the Humanoid.FloorMaterial property shows as Metal which is what the material of the part is, even though I am standing on the opening. What I expect to happen is that I pass through the opening without being blocked.

Although I have tried all four settings for CollisionFidelity, it seems that PreciseConvexDecomposition is the one that minimizes the size of the blocked area. However, the issue is still there as part of the opening is still blocked.

It is interesting to note that this seems to occur randomly on unions that contain more than three parts. When it does happen, it happens all the time and I have to implement workarounds for the issue. Even separating the union and reforming it does not correct the issue.

Although I could be wrong, holes that are fully enclosed or mostly enclosed seem to suffer this issue. Outside areas for shaping the part such as cutting off an outside corner doesn’t seem to be affected. The attached file has openings and a corner cut to demonstrate this.

Note: I run with all plugins disabled.

Where

It happens in my game when I make union from parts where I need a non-standard shape. It also happens with the part in the attached place file. This happens in both Studio and on the live game server.

When

This has been happening since I started developing on the platform, just over a year ago. I don’t know when this started happening.

Visuals

Pictures that show me standing on the hole and not falling through.


Video documenting the issue.
robloxapp-20230411-0133272.wmv (6.3 MB)

This screenshot shows the floor material property while standing on the opening.

REPRODUCTION

Reproduction Steps

The steps to reproduce this issue in the included file is very simple.

  1. Load place file.
  2. Jump on the part.
  3. Walk on the holes.

I currently have the CollisionFidelity set for PreciseConvexDecomposition so the area of the block on the hole is small, but it is there as one can see in the attached visuals above.

Reproduction Files

Engine - Union Collision Bug.rbxl (43.8 KB)

ADDITIONAL INFORMAITON

None, other than I have ran into this quite a few times, and performing a forum search, other developers are also having the issue.

2 Likes

We’ve filed a ticket into our internal database for this issue, and we will update you when we have further information!

Thanks for flagging!

3 Likes

I made a script that helps visualize the collisions. Here are the results:


Yellow: Undesired collision or artifact
Green: Desired collision
Red: No collision

With the CSG 3 beta enabled, I re-unioned the part and the collisions changed to a more desirable result:


However, this creates artifacts on the part visually and it does not completely fix the collisions (you can see a yellow line there).

Here’s a repro file with the original union but with the visualizer script:
unionCollisionBug2.rbxl (45.3 KB)
Here’s a repro file with the re-unioned union and the visualizer script:
unionCollisionBug3.rbxl (57.2 KB)

I hope this helps the team progress further in fixing the bug, and I hope this reply provides useful information.

3 Likes

It’s almost as if there is a problem with the collision algorithm they are using or there is some kind of corruption. Instead of adding new features, they need to fix these bugs.

3 Likes

@Maelstorm_1973.
Unions produce their own physics collision information in a lossy way, this is normal behavior. This means collisions most often do not match the appearance of the mesh 1:1. If you need perfect collisions through a hole, you should not rely on Unions for that, or even meshparts (although your results may be better). You should use separate pieces for the three/four pieces of the opening.

Also there is a setting in Studio to toggle visualization of collisions. Here is a plugin that toggles it. Mesh Optimization Tools - Roblox

1 Like

There is actually an option named “Show Decomposition Geometry” in Studio Settings under Studio>Visualization that renders the collision meshes for everything in the world, including unions and meshparts.

2 Likes

I wasn’t aware of that setting. Thank you for telling me about it.

1 Like

Unfortunately this is a known issue, but realistically we probably won’t be able to fix this soon.

There is some ongoing work that may help improve the fidelity of convex decomposition geometry results for unions specifically. It’s still far from certain how well it will work, but there are some promising prototypes.

Good convex decomposition is a very complex problem. We’re constantly surveying the latest research in this area, and it’s far from being a solved problem. We really want this to be WYSIWYG fidelity, with collision detection so fast nobody deliberates downgrading to hull or box, but improving this will take some of our best Geometry engineers dedicating a lot of time to the problem.

2 Likes

That’s unfortunate. However, this sounds a lot like the obstacle avoidance problem from robotics which I have some experience with from my early days when I was building and programming robots. The mapping sensor would scan a laser in a room and a camera would pick up the dot. The location of the dot on the camera’s field of view would indicate the distance via triangulation. This worked because the distance between the laser and the camera was known, as was the angle of the camera in relation to the laser. So if the dot was at the center of the camera’s field of view, then the distance was known, so deviations from center were easily calculated.

The code that I used was reversed logic from what one would normally think. Instead of looking for obstacles, the code would look for the spaces between obstacles.

I have to wonder if machine learning would be able to help with this. Basically, use AI to make a 3D bitmap of the part. When the bits are 1, it’s solid. Where it’s 0, there’s a hole. Save the map with the union part so now there’s a lookup table. A resolution of one stud with interpolation for curves should be quick enough to evaluate.

1 Like