Massimo Del Zotto
2012-06-11 07:54:32 UTC
Hello to all contributors.
I need some help in understanding how physics libraries are supposed to be
used. I am referring to Bullet in particular as it appears to have
everything I need with a liberal, cross-platform licensing.
So far I have been experimenting with physics for a few months with mixed
results at best. As I write this, I have just resolved an issue with
player-controlled objects which has been keeping me awake at night for
quite a while so I'm thinking at the next problem I see on the horizon.
Now, in Bullet there are three kinds of objects:
1. STAtic
2. DYNamic
3. KINematic
I think I have finally got a kinematic behaviour that works right for my
game.
The point of this email is the interaction of dynamic objects and a world
built from static objects.
I started modelling my world by procedurally generating a set of hulls, in
most cases, those were boxes. I don't remember the exact numbers but I'd
say my current data set for the world is about 96% boxes (mostly
axis-aligned) and 4% hulls.
The *main problem* I've observed is that *DYN objects won't interact
properly with static collision geometry at bounduaries*. I am not well
aware if this happens as I allow the static geometry to overlap or not.
That is, I don't know if adjusting the collision geometry by a margin would
fix that.
The current line of thinking in Bullet forums appears to be using generic
trimeshes and GIMPACT collision. Trimeshes allow to mark internal edges and
thus provide proper information to dynamic bodies to interact properly.
Now, let's leave out the fact that Bullet's demo about internal edges does
not seem to work as intended on my system.
Let's leave out the problem that I would need to write some code in the
filter to brute-force internal edge detection.
Let's start by considering that in general, I don't really feel ok with
feeding collision systems with graphics-oriented meshes. It *might* work
for now, but I'm afraid someone should be producing a reduced polycount
mesh.
But my main problem is that I feel like I'm seriously missing
something. For example, Bullet has a BSP demo from which they build
collision geometry. Now, BSPs are strictly related to convex hulls so it
appears to me that worlds are meant to be built as an assembly of multiple
rigid bodies rather than a single big trimesh. BSP demo *appears *to work
ok with dynamic rigid bodies to me.
So in short, *I am asking for a direction is choosing a world
representation for my collisions*. *Maybe collision shapes are only meant
to be used for dynamics, with trimeshes being the only way to represent a
world?*
I cannot quite see a big picture with those things, so I start thinking
perhaps I've misunderstood everything since day 0.
Elaborations are welcome.
Massimo
I need some help in understanding how physics libraries are supposed to be
used. I am referring to Bullet in particular as it appears to have
everything I need with a liberal, cross-platform licensing.
So far I have been experimenting with physics for a few months with mixed
results at best. As I write this, I have just resolved an issue with
player-controlled objects which has been keeping me awake at night for
quite a while so I'm thinking at the next problem I see on the horizon.
Now, in Bullet there are three kinds of objects:
1. STAtic
2. DYNamic
3. KINematic
I think I have finally got a kinematic behaviour that works right for my
game.
The point of this email is the interaction of dynamic objects and a world
built from static objects.
I started modelling my world by procedurally generating a set of hulls, in
most cases, those were boxes. I don't remember the exact numbers but I'd
say my current data set for the world is about 96% boxes (mostly
axis-aligned) and 4% hulls.
The *main problem* I've observed is that *DYN objects won't interact
properly with static collision geometry at bounduaries*. I am not well
aware if this happens as I allow the static geometry to overlap or not.
That is, I don't know if adjusting the collision geometry by a margin would
fix that.
The current line of thinking in Bullet forums appears to be using generic
trimeshes and GIMPACT collision. Trimeshes allow to mark internal edges and
thus provide proper information to dynamic bodies to interact properly.
Now, let's leave out the fact that Bullet's demo about internal edges does
not seem to work as intended on my system.
Let's leave out the problem that I would need to write some code in the
filter to brute-force internal edge detection.
Let's start by considering that in general, I don't really feel ok with
feeding collision systems with graphics-oriented meshes. It *might* work
for now, but I'm afraid someone should be producing a reduced polycount
mesh.
But my main problem is that I feel like I'm seriously missing
something. For example, Bullet has a BSP demo from which they build
collision geometry. Now, BSPs are strictly related to convex hulls so it
appears to me that worlds are meant to be built as an assembly of multiple
rigid bodies rather than a single big trimesh. BSP demo *appears *to work
ok with dynamic rigid bodies to me.
So in short, *I am asking for a direction is choosing a world
representation for my collisions*. *Maybe collision shapes are only meant
to be used for dynamics, with trimeshes being the only way to represent a
world?*
I cannot quite see a big picture with those things, so I start thinking
perhaps I've misunderstood everything since day 0.
Elaborations are welcome.
Massimo