Colliders for curved/cylindrical shape

Hello all… I’m wondering what the best (ie. most processing-efficient) method is for estimating collision with a the interior (concave) side of a curved surface – think the inside of a pipe, or a waterslide, or bobsled track. Think of a car or ball/marble that would need to slide down this surface…

Since there are (unfortunately) no cylinder primitives in Unity, I was wondering which of the following would be ideal:

  • Create the pipe/track and use mesh colliders (I am going to automatically assume this is the worst option)
  • Use the mesh for visual, but estimate the curves using a series of angled box colliders (say, 6 to represent a semi-circular curve, or 12 for all the way around the cylinder… I imagine this is efficient, but where it gets difficult is when there are bends/curves in the pipe/track)
  • Use the regular mesh for visual, but a simplified cylinder mesh for collider…
  • A combination of the above? (box colliders for straightaways, low-poly meshes for bends/curves; this may be what I have to do…)

PS. On a related note, which of these would likely be more resource-intensive: a series of meshes (like modular segments) combined into one whole mesh (of, say, a winding pipe or track) and using a single mesh collider for this complex mesh, or using each segment as an individual mesh with individual mesh colliders? (in which case you would have a lot of objects, but each one would be a lot easier to calculate – I imagine this still might be faster, but I don’t know if one complex mesh or multiple simple meshes is better… I assume multiple simple meshes)

P.P.S. It would be really nice if there were a modular cylinders/pipes asset in the asset store to be used for this purpose (tracks/tunnels), but I don’t see one. If I can get these assets made, maybe I will put them up for sale, because I know other people have wanted the same thing… [if anybody knows of one, please inform me, I’d rather not take the time creating it, even though it’s relatively simple…]

I’m guessing because this is a shape that can be made out of the more primitive shapes is the reason why this doesn’t exist as a default 3D object; also the shape of it can vary depending on what you want to create.

Personally, I would create the mesh/geometry in something like Blender, triangulate the faces and import it to Unity and generate the mesh colliders. Think of it like you’re making a room with a wall missing on one side and a wall missing on the opposite side; or a tunnel! I guess a ‘pipe’ just isn’t a very specific shape and is generally made the way that I just mentioned. Not sure about which of those options would be the least resource-intensive, I wouldn’t have considered options 2 or 3.

To start with, I am going to use two different scenarios, using ultra-low-poly meshes for most of the “pipe segments”, but using a series of box colliders for the straightaways (for example, in 3DS Max, I created a straight tube using 12 sides/segments for the circle, so I could created 12 thin box colliders in place of the actual mesh, and this would provide the exact same interior rigidbody effect as using the mesh would, but would likely be significantly more efficient for computations)