[ODE] Newbie Questions & OpenGL

nathan@whatever.net nathan at whatever.net
Wed Jan 30 00:33:01 2002


On 29 Jan 2002, Gene Ruebsamen wrote:

> Reading through the FAQ and the ODE documentation, and looking at the
> test files that come with ODE, I know that ODE can be used with any
> graphics library.  What confuses me is that all the test applications
> use the drawstuff.h include file, which I suppose uses OpenGL?  Is this
> the preferred method of drawing primitives in ODE? 

I think it would be more accurate to say that OpenGL is Russ's preferred
method of drawing stuff.  For a person relatively new to 3D programming
(like me, for instance), the existence of his sample code was a big factor
in my choice of a 3D API - I went with OpenGL in part because the sample
apps gave me a bit of a head start.

That said, I'm pretty sure that you could re-implement drawstuff to use
another 3D API without too much trouble, assuming you were already
familiar with the API in question.  

> I would like the option of turning the display off, and performing the
> physics calculations w/o the graphics overhead, and then turning the
> graphics back on at some later time.

Not a problem.  I've done that in my app, by mistake. :-)  ODE doesn't
require anything of OpenGL, it just provides information that you can give
to OpenGL if you want to draw stuff.  If you don't draw anything, ODE
doesn't know or care.

> I am only at the beginning stages of the project right now, and am
> looking for some insight and/or guidance as to whether ODE is capable
> of what I just described (just the physics part, not the genetic
> algorithm).

I'm pretty sure you'll find ODE sufficient.  I'm working on a robot design
tool myself and it's working exactly as I had hoped.  I've got 3D critters
walking around!  And I got them going sooner than I had expected, so I'm
really happy with ODE.

> Being a newbie, and seeing how the documentation is not all there yet,
> can anyone point me to any type of tutorial or provide any suggestions
> for starting out with ODE?  

I started by tweaking the sample apps a little bit to see how things
worked, then created an MFC & MDI windows app from scratch, then started
creating, drawing, and editing boxes in OpenGL, then used ODE to make the
boxes bounce around.  The documentation for ODE may not be complete, but
it is sufficient.  Everything I needed to know about the API was in there,
with the possible exception of some information about using ERP and CFM to
help keep simulations stable.  Far as I can tell, ERP of 1.0 and CFM of
0.01 works well enough.

But if you do need stuff that's not in the documentation, there's the
mailing list...  I've found it helpful.  Russ is out of town right now
(for a couple weeks I think), but he's been responsive when people
have had questions or suggestions.

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com