Previous Blog Next Blog
Prev/Next Blog
by date

Another shot at ODE

Another shot at ODE
Name:Jameson Bennett
Date Posted:Jun 22, 2006
Rating:4.0 out of 5
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Jameson Bennett

Blog post
So, I've been playing with ODE lately.



After tinkering with ODEItem and working professionally with an integration based on the resource I decided to try a completely new approach to the problem. The integrations I have worked with, although networked and relatively stable, were poorly designed and cumbersome to extend and use. A complete design, rewrite and integration later, I think I may have a good solution for a fully networked ODE integration.

Currently all ODE 0.5 features are supported (nothing in 0.6 affects the integration), but my initial use is very limited focused on the networking problem. It runs very well both single and multiplayer, and I have had up to 5 players at one time, all parties reporting very smooth action on even on older machines. Stacks of object are stable, but I have reached limitations with TGE's collision, one of the major issues that has come up on GG forums many times over the years. This is the only major flaw in the current solution (what ever happened to the component system Fagot had designed to address some of these issues?).

There are other features to add and tweaks to make, but it is looking very promising. Check out these movies to see it in action:

Single player:
.wmv
.mov

Multi player:
.wmv
.mov

Recent Blog Posts
List:06/22/06 - Another shot at ODE
04/11/05 - Plan for Jameson Bennett

Submit ResourceSubmit your own resources!

Rubes   (Jun 22, 2006 at 18:23 GMT)
That is sweet! Very nice work. I sure would like to see that available....

Tom Spilman   (Jun 22, 2006 at 18:33 GMT)
Looks really good... i'm keeping my eye on this! ;)

Stephen Zepp   (Jun 22, 2006 at 18:35 GMT)
Great to see someone working on this in a multi-player scenario!

I'm curious about your comment on the GG collision system--wouldn't you be passing all important collision calculations to the ODE layer, or are you simply passing forces/impulses to control those objects based on Torque generated collision events?

I also noticed that your sample size of ODE objects was relatively small (<30 objects roughly)--your biggest challenge is when you, or someone else, attempts to go whole-hog and have hundreds of ODE objects in a scene--that's when things will break down extremely on the networking side.

Chris Calef   (Jun 22, 2006 at 18:55 GMT)
Nice work, Jameson! One thing I was wondering though, do you have gravity set a little low? Things seem to be falling slower than realtime, but I don't know if it's maxing out the simulation with that many boxes or if you're just running it at low gravity.

Re: the networking, are you running the simulation on the server only and ghosting everything every frame, or running on all clients and only synching up when there's a difference?

Looks great, man!!

Jonathon Stevens   (Jun 22, 2006 at 19:03 GMT)
ODE?

Jesse (Midhir) Liles   (Jun 22, 2006 at 19:35 GMT)
Looks awesome, do you plan on releasing this as a resource, or even selling it? I'd pay.

Treb Connell (formerlyMasterTreb   (Jun 22, 2006 at 19:46 GMT)
@Jonathon

Open Dynamics Engine a search well explain a lot.

Stefan Lundmark   (Jun 22, 2006 at 20:07 GMT)
Like Midhir, I would sure pay for such a resource too.

Michael Cozzolino   (Jun 22, 2006 at 20:28 GMT)
I have a game that I have been working off and on that could really use something like this. I would need less than 10 objects that would need networked ode physics at one time. It is a very doable game in my opinion. Heck I have a lot of the core stuff working since i'm using the rigidshape resource to prototype with.

I will keep an eye out on your progress. Keep up the great work.

Treb Connell (formerlyMasterTreb   (Jun 22, 2006 at 20:31 GMT)
oh and how does it react with players, I saw some of the blocks bouncing off you but not much more than that.

Chris Labombard   (Jun 22, 2006 at 20:54 GMT)
I could really use this too. Looks like it performs well when you have lots of objects and they're colliding.

Ricky Taylor   (Jun 22, 2006 at 22:31 GMT)
Heheh... I just burned ODEItem... with the recycle-bin, hope this holds to my standards... =)

Some nice work btw. =P

--Ricky

Unsung Zero   (Jun 23, 2006 at 03:13 GMT)
This looks promising, good work.

Will Pall   (Jun 23, 2006 at 03:56 GMT)
I added ODEItem to my project a long time ago, but the networking was always a problem. This looks really promising. You are going to release this, right? As a resource or pack? I'd pay for it.

Jameson Bennett   (Jun 23, 2006 at 04:25 GMT)
Thanks all, its been rewarding just seeing this come together. ODEItem was a great inspiration and I think Pascal Retting and Dylan Sale did an amazing job coming together to build the resource. That's the power of this community.

@Stephen
The collision is passed to ODE as a collision joint data structure, ODE uses these as hard constraint and runs the physics calc on them each timestep. I stripped out the collision classes from ODE and have TGE handle that.
There are lot of problems with certain collision shapes falling through and sticking to interiors, even though they are simple convex shapes. Many times the same collision shapes give me problems using the RigidShape resource.
The level I show in the movies has roughly 200 dynamic objects, most are not moving and are completely removed from the physics calc and no network traffic is sent. There are noticable artifacts in the game when there are a large number of objects flying around within view(>30) and also when the level first loads in. I am sure with more testing more problems will crop up, mostly related to scoping such as ghost object popping into another position when you enter a room. There is work to do but I am sure there are solutions.
During several tests I have placed at many hundered dynamic objects, scattered about and piled up, testing the limits of the engine. It ran fine except with large piles of objects, ODE starts chugging (but is still able to pull out of it when the disabling kicks in). The networking and simulation seems to handle it pretty well.
I am sure there is a lot of work to do, but I feel it is a solid start.
What issues specifically do you expect to encounter with large numbers of objects? I would really appreciate your input on this.

@Chris
The gravity is set -9.8ms, I believe the issue is an illusion, the boxes appear much smaller than they are and there is nothing in the scene for size reference.
The client runs a simulation and syncs with the server simulation using the standard scoping and packUpdate. Works much better than I expected it to.
Edited on Jun 23, 2006 04:25 GMT

Jameson Bennett   (Jun 23, 2006 at 04:32 GMT)
@Master Treb
Right now, thats all there is, bouncing off players. Adding impulses to move objects on player collision would be trivial, but I've kept the code as simple as possible to concentrate on the networking issue.

Ben Garney   (Jun 23, 2006 at 09:02 GMT)
If you can possibly narrow down collision issues to specific repro cases, I'd love to work with you to track them down. It might be just an issue with how you're calculating collisions, or it could be a very intermittent interior collision issue we've been tracking since around Tribes 2 development timeframe...

Luke *V8motorhead* Jones   (Jul 05, 2006 at 22:39 GMT)
Hmmm, hows it going so far?

Albert Steckenborn   (Jul 19, 2006 at 09:02 GMT)
still alive ?

Jameson Bennett   (Jul 22, 2006 at 16:32 GMT)
Yes, still alive although only a month has passed. Things like this take time.

Collision issues are still haunting me, although I've found several models I was using to have odd collision meshes. Ben may be on to something with my calculation and passing the collision info for this issue.

Results are good, although with several more load test I can show odd quirky behavior with large numbers of objects as pointed out by Stephen; athough this really is a game design issue, expecting to have thousands or even hundreds of networked objects flying around is simply not a reasonable expectation for any physics/network engine. This can be compensated for by a well designed scheme, simulating most non-gameplay affecting dynamic objects on the client. I am currently designing this approach.

I will post another plan when decent progress is made. Thanks for your interest.

Albert Steckenborn   (Jul 23, 2006 at 13:13 GMT)
cool. thx for status update !

Stefan Lundmark   (Jul 26, 2006 at 12:08 GMT)
Interesting, keep us posted Jameson! :)

Gary "ChunkyKs" Briggs   (Aug 06, 2006 at 08:37 GMT)
I still feel daft asking this, but....

Could you show me your function that updates a torque shape to reflect the position and rotation of the dBody?

No matter what I do, I can't seem to take the quaternion from dBodyGetRotation and convert it into a rotation that I can use for Torque shapes. I know it's 101 math, but... could you help me out a little?

Gary (-;

Albert Steckenborn   (Aug 14, 2006 at 09:05 GMT)
Hi Gary, hi Jameson,

it seems to me that you both guys have a good view into ODE and Torque :-D
May be you are willing to merge the projects together ?

Greetings

Jameson Bennett   (Aug 15, 2006 at 02:17 GMT)
Sorry on the late reply Gary! I fired an email off to you. Thank you very much for your contributions to the community with your hard work!

Albert: I have some restrictions on my codebase at the moment that prevent that but am working on pulling the pieces out to make that(or similar) happen. I am opening an art gallery in Cincinnati at the end of this month and that has been consuming my time so it may be a bit before I can tackle this.

Ron Nelson   (Jan 09, 2007 at 11:49 GMT)
Hi Jameson,

It has been quite some time since anyone asked, so I thought I would. How is this coming along, and is there in chance of a resource coming out of it soon?

You must be a member and be logged in to either append comments or rate this resource.