I'm using the 3dMax Exporter (max R6), and I did a model of dimensions (0.3m,0.6m,0.3m) (units in my Max are in meters) , with the pivot at the center of mass.
Ok, the physical object in the physic Engine Novodex has the same size 0.15,0.3,0.15) (you only precise half the size in Novodex engine)
I just draw the mesh at the center of mass of the physical object,so everything should be ok. I run the application, the mesh is exactly where it was supposed to be : standing on the ground.
But, when I start moving, movements are slow and small, has if the units weren't in meters....
I can see the same problem by changing the camera coordinates : I wanted to place it 2 meters up, so I just put it at (0,2,0), but as a result it was only at a few centimeters from the floor...
Why do the units in Ogre and the physic engine don't match?? I use meters in both representations, same dimensions, and the meshs are exported with Max working in meters...
I really don't get it!
Something strange with the ogre units
-
- Halfling
- Posts: 57
- Joined: Mon Apr 18, 2005 5:46 pm
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
Ogre itself doesn't do anything to the units. A unit is a unit and nothing else. Maybe the exporter has a scaling option or sclaes without asking? Look into the mesh.xml at the vertex positions. Do they match with what you expect? (being in between -1.0 and 1.0 instead of like between -100.0 and 100.0)
-
- Halfling
- Posts: 57
- Joined: Mon Apr 18, 2005 5:46 pm
Well, I just checked that and it seems exporter overides units settings
So I rescalled everything in 3dMax to have the right dimension in meters, and it now matches the xml file.
Ok, So in max I have the mesh standing on the groundplane.
In ogre, I import the mesh, and the mesh of the ground plane. And now it don't stand on the ground, it is in fact maybe 60cm over the ground...
I'm trying to find why
So I rescalled everything in 3dMax to have the right dimension in meters, and it now matches the xml file.
Ok, So in max I have the mesh standing on the groundplane.
In ogre, I import the mesh, and the mesh of the ground plane. And now it don't stand on the ground, it is in fact maybe 60cm over the ground...
I'm trying to find why
- Kojack
- OGRE Moderator
- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 534
-
- Halfling
- Posts: 57
- Joined: Mon Apr 18, 2005 5:46 pm
Ok I made some tests and found the problem : it is in fact the pivot point in the 3D mesh that don't match the center of mass of the physical object... Even if the coordinates of the mesh are ok, Ogre still put the pivot point on the bottom of the mesh instead of in the center...
I solve the matching problem by putting the center of mass of the object at his bottom, and now the mesh collide well with the ground, but of course the physical properties aren't good any more...
How to change the reference point in ogre, or how to make the exporter extracting the right pivot point set in 3D max ?
I solve the matching problem by putting the center of mass of the object at his bottom, and now the mesh collide well with the ground, but of course the physical properties aren't good any more...
How to change the reference point in ogre, or how to make the exporter extracting the right pivot point set in 3D max ?
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
* thinking that this would be a nice addition to the exporting from max section on the ogre wiki *
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.