Dynamic extended mesh objects

Dynamic extended mesh objects

In my game i want to edit the vertices of both the graphical representation of a model and the vertices used by havoc.

First hings first: when my extended meshes colide at high speed, they often penetrate and gets stuck in each other. So i thought that making them as a group of convexes wielded together would work quite well with my demand of being able to deform the meshes at runtime.

If i for example where to push oneof the convex models verticesintothe convex thus making it concave, i could simply split the convex to two new convexes at the direction i push the vertex in.
Would this be effective or just dumb?

Alternativly i guess the use of a convex hull around my extendend meshes would solve the penetrating problem?
I could also use a "mopptree?" doing something similar to the first solution, however , building mopps at runtime takes time, i want to be able to do this fast and often.

Lastly and also a bit crazy, i could try representing the model with voxels transformed as the body. Alternativly a voxel tree of convexes. I dont really know if this would improve neither rendering nor physics tought.

Im also interested in making this online eventually,wich hasstarted to feel more impossible day by day.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


It seems like there are a couple of issues here.
First this:
> when my extended meshes colide at high speed, they often penetrate and gets stuck in each other

1) extended mesh shapes aren't really designed for dynamic objects. it's better to use a collection of convex shapes (say, a list shape)

2) are you using continuous collision detection?

Next on to the modifying shapes issue.

You should use hkpRigidBody::setShape() to change the shape, since this will update cached info and let the physics world know what you have done.
Give it your new (modified) shape as input.

Modifying the shape is a hard problem.
You say you might want to make a convex shape concave, and then you'd have to split it into convex pieces.
This is called convex decomposition and it's both tricky and computationally expensive.
Havok has a tool for doing this offline but it ships with the commercially-licensed product and not with PcXs (the free edition).

I'm not sure I'd go with MOPPs or voxels either - a MOPP is an acceleration structure for collision detection but it's expensive to build; and voxels don't really suit dynamic objects either.

Maybe you could describe your use case.
Are you trying to make deformable bodies?
Breakable bodies?
A damage model for vehicles?

There may be other ways to tackle the problem depending on what you're going for.


Leave a Comment

Please sign in to add a comment. Not a member? Join today