Hi. I work with physics.
There is arbitrary geometry, it needs to be broken down into parts. That is, what sticks out of the model.
The problem is that the physics engine cannot handle convex polygons. I work with oimoPhysics.js I did not find a solution in the docs and demos((
I see a solution. Take a polygon and knead it in the chat.
According to the picture, I need a solution, like sending geometry and some percentage of convexity, I get a series of geometries back. (Oh, how I make a GTI request, I’ll ask him again now))
Thank you!
ConvexGeometry
Testing
1 Like
There aren’t any out of the box solutions for this in threejs.
There is a library called HACD which performs this operation in an offline scenario. perhaps you can preprocess with that to come up with your convex chunks.
For a lot of scenarios though, you can just compute the convex hull of the whole mesh, and it is often accurate enough for realtime purposes.
Decomposing into multiple convex geometries will require more rigid bodies to simulate. Keep in mind the convexity limitation only applies to rigidbodies, and not to static collision geometries (which can be polygon soups)
1 Like
Oh thank you for the HACD link, maybe I’ll return to this solution (only today I saw it). Not ready to export with c++ at the moment ((
In general, both the demo with ammo and jitypes led me to ConvexGeometry, but I had to refine it))). In fact, we barely got the hotel. In a picture.
But the task is no longer relevant +/- and so it will go))
1 Like