[ODE] Any BloodRayne 2 developers listening?

Mark Randel mark.randel at gmail.com
Mon Nov 1 13:54:23 MST 2004


For character movement in BloodRayne 2, we used our own simple
simulation.  Rayne's collision was a capsule (or swept sphere) and had
a corresponding "geom" associated with her (but no body).  If she hit
anything that was simulated in a frame of movement, she would add a
force/moment to that object.   Then her geom's position was updated.

For a stack of boxes, well, this is a little more complicated.  Here
is what we did, and it was totally stable 100% of the time...

We wrote our own world collision routine for BR2.  We created our own
"sweep-and-prune" collision space using ODE extentions.  Then inside
of this routine, we would first collide each geom with a body with the
game world, then each other.  Each geom had a custom collision routine
with the world, and then collision points would get reduced.   We
mostly used ODE's geom to geom collision, but we reworked the
capsule-box some, and wrote our own cylinder collision.

We then wrote our own auto-disable that would disable an island of
bodies, rather than one individual body.  This is subtle, but the
effect was amazing.  Dead bodies, box stacks, etc. became totally
stable with this.  In one test level, I had 20 boxes stacked one on
top of another.  You could run into the stack, it would sway, then
stop.  If you hit it hard enough, then it would fall over.

ODE ran at a fixed frame rate of 30fps on PS2 and 60fps on Xbox.  This
can help collisions be more predictable and stable.  Remember F * t =
m * deltaV.  Understand how impluse works in ODE land.

Also, understand what CFM and ERP do for you.  Sometimes it is
appropriate to use a large ERP, and sometimes a small one.  Then tune
the CFM to get the desired spring effect.  If you run at multiple
frame rates,  you need multiple ERP/CFM pairs.

I suspect that you need to look carefully at the collision library you
are using and make sure it is returning values that make sense for
what you are colliding with.  I highly recommend writing your own geom
to world collision routine.

Mark Randel
Terminal Reality Inc.


More information about the ODE mailing list