[ODE] Materials

Matthew Harmon matt at ev-interactive.com
Tue Jul 19 09:47:00 MST 2005


Hi John:

I asked this question a month or so ago.  After getting some responses and
scanning the mailing list, it seems there is no strong consensus on the
"best" way.

I've implemented a hybrid of the two methods you propose.  I have a material
vs. material table that is referenced first.  If no entry is found, I
fallback on a set of equations that combines properties to produce some sort
of reasonable results.  This dynamic combination is not physically accurate
by any means, but just something to produce interesting behaviors.

The table-based system forces you to collect all your materials in one
place.  This isn't as convenient as allowing each game entity to define its
own materials independently, but I think it is needed to produce good
results.  As we all know, the fine tweaking of contact parameters can make
or break a good simulation.

As you said, the table method is more cumbersome, but I think it is
worthwhile.  I lean towards avoiding dynamic memory allocation, so the table
is pre-allocated by the application to a maximum size, and then all the
predefined contact structures are read in from a file all at once.  "Holes"
in the table can be filled in on-the-fly by the app if necessary, but in
practice, this is rarely done.  One nice byproduct of the table is that I
expose it to a run-time editing facility so you can dynamically tweak the
contact params while the game is running.

If I get it cleaned up, I'd be happy to post the code for this system for
people to look at.  It might make a nice contribution to ODE as this is a
common problem that people must tackle once they get past doing simple demos
and actually want to use ODE in a game.

Matt

-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org] On Behalf Of John
Donovan
Sent: Tuesday, July 19, 2005 9:06 AM
To: ode-list
Subject: [ODE] Materials

How do people (that means you! :) handle collisions when two objects of
different materials collide? E.g. a rubber ball colliding with a wall,
or a rubber ball colliding with a bean-bag? Do you somehow combine the
material parameters to create the contact joint parameters, or is a
material vs. material table the way to go?
The latter seems more likely to me, but it could be a bit cumbersome to
add new materials. Also, how do you get the objects to respond
differently to the same collision?

-J

The content of this message and any attached file are confidential and/or
privileged and are for the intended recipient only. If you are not the
intended recipient, any unauthorised use, disclosure, copying, distribution
or other dissemination is strictly prohibited. If you receive this message
in error please notify the sender immediately by email, telephone or fax and
then delete this email. Any attachment with this message should be checked
for viruses before it is opened. Magenta Software Limited cannot be held
responsible for any failure by the recipient to check for viruses before
opening any attachment. Copyright in this email and attachments created by
us belongs to Magenta Software Limited. Should you communicate with anyone
at Magenta Software Limited by email you consent to us monitoring and
reading any such correspondence. 

	


_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode






More information about the ODE mailing list