OgreOde tutorials
-
- Gnoblar
- Posts: 17
- Joined: Sat May 07, 2005 9:50 am
- Location: Denmark
OgreOde tutorials
Hi!
Are there any OgreOde tutorials available? I managed to compile and make it actually work on Linux, but I don't really know where to go from here.
From the samples (which I can't get to run, but I can look at the code) I constructed a terrain geometry with a ninja (from the Ogre basic sample resources) falling down on it.
1) I set gravity to (0, -9.82, 0). 9.82 is the gravity acceleration around here, but nothing seems to actually accelerate. The movement seems linear.
2) For the ninja, I use BoxGeometry. This is very sub-optimal, is there a way to make OgreOde use the geometry of the mesh?
3) What units does OgreOde use for mass, force and volume? Kg, N and m^3? How much is 1 m i OgreOde in Ogre spatial units?
I'm REALLY missing an API reference here!!! Thanks for the help...
- Simon
Are there any OgreOde tutorials available? I managed to compile and make it actually work on Linux, but I don't really know where to go from here.
From the samples (which I can't get to run, but I can look at the code) I constructed a terrain geometry with a ninja (from the Ogre basic sample resources) falling down on it.
1) I set gravity to (0, -9.82, 0). 9.82 is the gravity acceleration around here, but nothing seems to actually accelerate. The movement seems linear.
2) For the ninja, I use BoxGeometry. This is very sub-optimal, is there a way to make OgreOde use the geometry of the mesh?
3) What units does OgreOde use for mass, force and volume? Kg, N and m^3? How much is 1 m i OgreOde in Ogre spatial units?
I'm REALLY missing an API reference here!!! Thanks for the help...
- Simon
-
- Greenskin
- Posts: 145
- Joined: Wed Apr 28, 2004 12:10 pm
- Location: Hungary
Re: OgreOde tutorials
Do the samples work, or things keep falling through there too? It may be a problem with your ODE, did you patch it alright?Cossins wrote:Hi!
Are there any OgreOde tutorials available? I managed to compile and make it actually work on Linux, but I don't really know where to go from here.
From the samples (which I can't get to run, but I can look at the code) I constructed a terrain geometry with a ninja (from the Ogre basic sample resources) falling down on it.
Probably the mass or the scale of the simulation tricks your eyes.Cossins wrote:1) I set gravity to (0, -9.82, 0). 9.82 is the gravity acceleration around here, but nothing seems to actually accelerate. The movement seems linear.

You can make transformgeometries that will keep better to your ninja, or use ragdolls. Both are shown in the samples...Cossins wrote:2) For the ninja, I use BoxGeometry. This is very sub-optimal, is there a way to make OgreOde use the geometry of the mesh?
Please check ODE. It states they don't use any actual measure units - everything in ODE just works as a scale with which the physics engine can compare your objects. Say, this is 2x as heavy as the other. They don't work as actual units. You have make a standard scale and compare everything to that.Cossins wrote:3) What units does OgreOde use for mass, force and volume? Kg, N and m^3? How much is 1 m i OgreOde in Ogre spatial units?
Hope is the first step on the road to disappointment.
-
- Gnoblar
- Posts: 17
- Joined: Sat May 07, 2005 9:50 am
- Location: Denmark
Re: OgreOde tutorials
Thank you for replying!
- Simon
Yeah, it patched alright - the problem with the OgreOde samples is that they can't seem to get their resources right. I don't think it's a serious problem...AssiDragon wrote:Do the samples work, or things keep falling through there too? It may be a problem with your ODE, did you patch it alright?Cossins wrote:Hi!
Are there any OgreOde tutorials available? I managed to compile and make it actually work on Linux, but I don't really know where to go from here.
From the samples (which I can't get to run, but I can look at the code) I constructed a terrain geometry with a ninja (from the Ogre basic sample resources) falling down on it.
Maybe.AssiDragon wrote:Probably the mass or the scale of the simulation tricks your eyes.Cossins wrote:1) I set gravity to (0, -9.82, 0). 9.82 is the gravity acceleration around here, but nothing seems to actually accelerate. The movement seems linear.
I don't see any ragdoll samples in OgreOde/demos? Am I missing something here?AssiDragon wrote:You can make transformgeometries that will keep better to your ninja, or use ragdolls. Both are shown in the samples...Cossins wrote:2) For the ninja, I use BoxGeometry. This is very sub-optimal, is there a way to make OgreOde use the geometry of the mesh?
Hm. But what about things like density, gravity and acceleration? What does m/s^2 mean in Ogre units?AssiDragon wrote:Please check ODE. It states they don't use any actual measure units - everything in ODE just works as a scale with which the physics engine can compare your objects. Say, this is 2x as heavy as the other. They don't work as actual units. You have make a standard scale and compare everything to that.Cossins wrote:3) What units does OgreOde use for mass, force and volume? Kg, N and m^3? How much is 1 m i OgreOde in Ogre spatial units?
- Simon
-
- Greenskin
- Posts: 145
- Joined: Wed Apr 28, 2004 12:10 pm
- Location: Hungary
Re: OgreOde tutorials
Well, it would be great if you could get it working - it would show if the problem is in your app's code or not.Cossins wrote:Yeah, it patched alright - the problem with the OgreOde samples is that they can't seem to get their resources right. I don't think it's a serious problem...

Gravity is handled by ODE, and I can assure you it works finely here.Cossins wrote:Maybe.

You certainly are. Didn't check simplescenes did you?Cossins wrote:I don't see any ragdoll samples in OgreOde/demos? Am I missing something here?
There is no such thing as Ogre units, as you can scale anything as you like - Ogre doesn't really care about the scales...Cossins wrote:Hm. But what about things like density, gravity and acceleration? What does m/s^2 mean in Ogre units?
EDIT: About density, you can define the coulomb friction of collisions per collision... at least I did it that way. And I don't think you can do it otherwise as ODE has no material system I know of... someone correct me if I'm wrong perhaps?
Hope is the first step on the road to disappointment.
-
- Gnoblar
- Posts: 17
- Joined: Sat May 07, 2005 9:50 am
- Location: Denmark
Re: OgreOde tutorials
Huh? That doesn't make sense. When you position an object on (0, 100, 300), how long would it take for an object with a certain mass at (0, 400, 300) to reach it with normal gravity acceleration? There must be some kind of unit system, or else physics as a whole doesn't make sense in Ogre space.AssiDragon wrote:There is no such thing as Ogre units, as you can scale anything as you like - Ogre doesn't really care about the scales...
If I'm completely wrong, I would really like to know how OgreOde goes about being completely relative in all calculations regarding gravity and density/mass.
- Simon
-
- Gnoblar
- Posts: 13
- Joined: Sat May 07, 2005 10:54 pm
- Location: Eugene, Or
It all depends on what YOU define the units to mean. What does (0,400,300) mean to you? 400 meters above the y-axis and 300 meters positive the z-axis? If so the your scale is 1 unit = 1 meter. And if you are using SI system then you better keep your units the same (eg. meters, liters, kilograms, newtons, etc). I have not yet used Ode/OgreOde but if I had to guess I would say there is a way to set the acceleration due to gravity somehow.
Kory Spansel
Kory Spansel
-
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
Eventhough not explicitly stated, you can just consider everything in SI units in ODE. 1 means 1 Meter for length 1 Kilogram for masses and 1 Newton for forces and 1 second for time. When you use these units it all works as expected. But you can scale it as you like, but you need to scale everything accordingly (namely the time steps). Also note, that ODE works best with values somewhere between 0.1 and 1.0, this is the nature of floating point numbers.
-
- Gnoblar
- Posts: 17
- Joined: Sat May 07, 2005 9:50 am
- Location: Denmark
Thank you! That was what I needed to hear!tanis wrote:Eventhough not explicitly stated, you can just consider everything in SI units in ODE. 1 means 1 Meter for length 1 Kilogram for masses and 1 Newton for forces and 1 second for time. When you use these units it all works as expected. But you can scale it as you like, but you need to scale everything accordingly (namely the time steps). Also note, that ODE works best with values somewhere between 0.1 and 1.0, this is the nature of floating point numbers.

- Simon
-
- OGRE Community Helper
- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
I hate to be pedantic, but there are two statements here that contradict each other here;tanis wrote:Eventhough not explicitly stated, you can just consider everything in SI units in ODE. 1 means 1 Meter for length 1 Kilogram for masses and 1 Newton for forces and 1 second for time. When you use these units it all works as expected. But you can scale it as you like, but you need to scale everything accordingly (namely the time steps). Also note, that ODE works best with values somewhere between 0.1 and 1.0, this is the nature of floating point numbers.
"you can just consider everything in SI units in ODE"
and
"Also note, that ODE works best with values somewhere between 0.1 and 1.0,"
And whilst they're both true, the second one's more true. So whilst you can just use SI units in ODE, that won't work if you've got very big objects in your scene, or very heavy objects. I think;
Seconds always make sense for the units of time.
If you've got a "normal" scene, people walking about the place, cars driving around, then meters make sense for the length unit. If your scene is very big (battleships or star-destroyers moving around) then you might want to make 1 ODE length unit = 100 meters, for example.
Scale your masses so that the biggest ratio between the heaviest and the ligtest is no more than 200 or so, less if possible. And those masses are in the 0.1 to 10 range. If you have very heavy things and very light things then make the very heavy things static.
Hope that makes sense.
-
- Gnoblar
- Posts: 17
- Joined: Sat May 07, 2005 9:50 am
- Location: Denmark
-
- Bugbear
- Posts: 863
- Joined: Tue Apr 19, 2005 6:10 am
- Location: Melbourne, Aus
-
- OGRE Community Helper
- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
Exactly. Static as in; doesn't have a rigid body associated with it, so ODE doesn't move it around. For example, If you've got a basketball bouncing off a battleship then the battleship would just be static "world" geometry. Only the ball would have a physical body, so the battleship would still be collided with, it just wouldn't move.I think he means immovable. This way if their respective weights are very far appart, the light one will have an infintesimally small effect on the heavy one, so it's easier to not worry about it.
-
- Lich
- Posts: 1742
- Joined: Tue Apr 05, 2005 1:11 pm
- Location: Gosport, South England
- x 1
-
- Gnoblar
- Posts: 17
- Joined: Sat May 07, 2005 9:50 am
- Location: Denmark
-
- Minaton
- Posts: 980
- Joined: Sat Aug 07, 2004 12:08 am
- Location: Dallas, TX
-
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
Altitude doesn't matter too much, as long as you don't move away too far from earth. Standing on Mount Everest only takes away ca. 0.008 m/s² Whereas the difference between equator (around 9.78 m/s²) and north pole is much greater (around 9.83m/s²). This is because Earth is far away from being a sphere, it is more elliptic in its shape. So it is a question on where you got more earth directly under you. And Mount Everest with 8000 some meters is not much more than a small pimple on earth' face compared to its radius.
-
- Gnoblar
- Posts: 17
- Joined: Sat May 07, 2005 9:50 am
- Location: Denmark
Well, it says 9.82 m/s^2 in our physics text books (that's what we've been using for the last three years). The numbers might be from North Sweden, but I doubt it makes much difference.tanis wrote:In Berlin it is about 9.807. Is it this different in Denmark?
And shouldn't it be depending more on the latitude instead of the longitude?
(and yes, we do know how to properly round numbers around here...

- Simon