Generating collider shapes

Hi folks,

At the moment if you want to have a collider for your model, you can either generate a collider shape inside game studio, or use the primitive shapes. Whiles converting my unity game project to Xenko, I run in to things that could be improved. Especially when dealing with large amounts of assets.

  • Generating collider shapes manually from game studio takes a long time.
  • A lot of the models that I have, have a submesh simply labeled “PhysicsMesh” or “ConvexHull”. What I would like to propose here is that when importing this model, game studio detects the submesh’s name, and suggests if I want to import/generate the physics collider using that submesh.
    In my case where I have a nice building model( with some rooms, doors and windows). In a 3d modelling tool I can easily create the boxed out physics shape.
  • Another useful option would be to generate a convex hull decomposition: This generates a lowpoly hull for your model. This library does a fantastic job at that: https://github.com/kmammou/v-hacd

What do you think?

1 Like

v-hacd is already integrated into Xenko.

See https://github.com/xenko3d/xenko/tree/master/deps/VHACD and https://github.com/xenko3d/xenko/search?q=vhacd&unscoped_q=vhacd.

So I guess it is more of matter of using it for more cases and proof-check it against lots of cases.

1 Like

Oh I didn’t know that.
I have a minecart right now, for which I need the inside to be open. Right now I just made some boxes, but it is a real time consuming process if you need to do this for each model.
image

Yes, this a dilemma I have as well. The games I’ve made with Xenko so far have been fairly simple, in my next game I’m wanting to add terrain and more complex colliders but generating static colliders for with higher fidelity is above my skill set at the present and Xenko currently has no tools for this.

1 Like

Just FYI: I made a video on collider shapes that includes the answer to my original question.

1 Like