Another shot at ODE
by Jameson Bennett · 06/22/2006 (11:18 am) · 26 comments
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

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
About the author
jam3son.com
#2
06/22/2006 (11:33 am)
Looks really good... i'm keeping my eye on this! ;)
#3
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.
06/22/2006 (11:35 am)
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.
#4
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!!
06/22/2006 (11:55 am)
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!!
#5
06/22/2006 (12:03 pm)
ODE?
#6
06/22/2006 (12:35 pm)
Looks awesome, do you plan on releasing this as a resource, or even selling it? I'd pay.
#8
06/22/2006 (1:07 pm)
Like Midhir, I would sure pay for such a resource too.
#9
I will keep an eye out on your progress. Keep up the great work.
06/22/2006 (1:28 pm)
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.
#10
06/22/2006 (1:31 pm)
oh and how does it react with players, I saw some of the blocks bouncing off you but not much more than that.
#11
06/22/2006 (1:54 pm)
I could really use this too. Looks like it performs well when you have lots of objects and they're colliding.
#12
Some nice work btw. =P
--Ricky
06/22/2006 (3:31 pm)
Heheh... I just burned ODEItem... with the recycle-bin, hope this holds to my standards... =)Some nice work btw. =P
--Ricky
#13
06/22/2006 (8:13 pm)
This looks promising, good work.
#14
06/22/2006 (8:56 pm)
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.
#15
@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.
06/22/2006 (9:25 pm)
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.
#16
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.
06/22/2006 (9:32 pm)
@Master TrebRight 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.
#17
06/23/2006 (2:02 am)
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...
#18
07/05/2006 (3:39 pm)
Hmmm, hows it going so far?
#19
07/19/2006 (2:02 am)
still alive ?
#20
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.
07/22/2006 (9:32 am)
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.
Torque 3D Owner Rubes