[ODE] Question about variable step size and collision detection

Filip Joelsson filip at blueturtle.nu
Thu Dec 21 11:44:05 MST 2006


mån 2006-12-18 klockan 23:42 +0100 skrev Per Bull Holmen:
> --- Filip Joelsson <filip at blueturtle.nu> skrev:
> 
> > If you want pixel perfect collision detection, I'd
> > suggest that you
> > implement your own sprite class - instead of using
> > cylinders. For
> > collision detection with sprites, all you need is to
> > store beginning and
> > end for each row (which you'll do anyway if they are
> > run length encoded)
> > - and check for overlaps. ODE allows you to plug
> > your own CD in - so
> > this can be _very_ efficient.
> 
> Yeah, this is a good idea. But for my first attempt
> I'll try out Bullet instead. Bullet handles continuous
> collision detection even when the objects are
> rotating, out of the box. Modelling the geoms for cd
> should be a breeze - the balls will have varying
> sizes, so it's easier to render them realtime anyway.
> I see someone saying the dynamics of ODE is better,
> but for my game super-realistic dynamics is not of
> primary concern.

Ok, good luck. :)

> > I have seen that ODE is used in a couple of 2D
> > applications. Would there
> > be an interest in a sprite class for the main tree?
> 
> This could be a great idea for other users, especially
> if it can derive the outer shape of the objects by
> looking at the alpha layer of the bitmap, so that
> normal vectors are computed correctly for the
> collisions. I probably won't use that solution anyway.

Well, I won't get to work on it unless anyone wants to use it. (Or, more
probably, until I have a use for it.) As for the implementation, I would
rather take the input in the form of run-length data and draw
conclusions about the shape from that.

> A class like that should probably be designed in such
> a way that a separation between graphics rendering and
> physics modeling is still expressed.

Well, that'll be pretty thorny if you ask me. The point is to use the
built-in advantages of run length encoding for collision detection.
Sure, you can have two sets of sprites; one hi-rez for the screen, and a
low-rez for CD - but there is not going to be any big penalty for using
the hi-rez for CD.

Cheers!
/Filip

PS God Jul!



More information about the ODE mailing list