[SOLVED] Units in OGRE vs 3D Studio MAX

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
Stefan Lundmark
Halfling
Posts: 77
Joined: Fri Sep 11, 2009 7:42 pm

[SOLVED] Units in OGRE vs 3D Studio MAX

Post by Stefan Lundmark »

Hi,

I'm exporting a box in 3D Studio MAX that is 2 units wide/high/long. But it shows up in OGRE as 8 units instead.
I've done the following:

* I've made sure the box isn't scaled.
* System units are set to (Generic) in 3D Studio MAX.
* I've set 1,0 unit = 1 metres in 3D Studio MAX.

What am I missing? :(
Last edited by Stefan Lundmark on Wed Sep 16, 2009 12:24 am, edited 1 time in total.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Units in OGRE vs 3D Studio MAX

Post by jacmoe »

And what makes you think that it is 8 'units' in Ogre?
There's no such thing as a 'unit' in Ogre.
If everything is modelled using the same scale, it will work.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Stefan Lundmark
Halfling
Posts: 77
Joined: Fri Sep 11, 2009 7:42 pm

Re: Units in OGRE vs 3D Studio MAX

Post by Stefan Lundmark »

jacmoe wrote:And what makes you think that it is 8 'units' in Ogre?
There's no such thing as a 'unit' in Ogre.
If everything is modelled using the same scale, it will work.
Because if I have two of these boxes next to eachother, I have to place them with 8 units between or they'll overlap.
I understand what you're saying and that's why I thought there must be something going on in MAX.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Units in OGRE vs 3D Studio MAX

Post by jacmoe »

Hmm - I am really no MAX expert, but I faintly remember something about reset XForm. Try that. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Stefan Lundmark
Halfling
Posts: 77
Joined: Fri Sep 11, 2009 7:42 pm

Re: Units in OGRE vs 3D Studio MAX

Post by Stefan Lundmark »

Thanks a lot for trying, I appreciate it.

It didn't help, but I just saw something in the .scene file which is interesting but I have no idea how it got there:
<position x="-1.52588e-005" y="0.5" z="-2.18557e-008" />
<scale x="0.251256" y="0.251256" z="0.251256" />
Given that the object is placed at the origin (0, 0, 0) in MAX and has no scale, I guess this could be what's screwing it up?

Edit: I started off with a blank MAX file and merged with the old one, and now everything pieces up perfectly. This isn't as much a solution as I had hoped for, but it's definatly better than being stuck. ;)
deamoncleric
Gnoblar
Posts: 3
Joined: Sun Jul 01, 2012 2:29 pm

Re: [SOLVED] Units in OGRE vs 3D Studio MAX

Post by deamoncleric »

Since this thread is already solved, i just decided to explain where the weird values in the .scene file come from, just in case someone is interested.

If one sets a new unit after the creation of the model, then max automatically changes all existing values.
For example, if one creates a 1x1x1 cube using default units, and then changes to meters, the x,y and z scales values automatically changes to 0.251256. However, all new models created after that will have correct units.

To avoid any units problem, the first thing to do before any modelling is setting up the units in max.
LDAsh
Gnoblar
Posts: 20
Joined: Thu Aug 25, 2011 8:29 pm
x 3

Re: [SOLVED] Units in OGRE vs 3D Studio MAX

Post by LDAsh »

I had a strange issue like there where everything I'd done in idTech4 ended up massive compared to the scale it needed to be in NeoAxis (/Ogre), and the magic numbers I needed to scale down to is 0.1 then 0.15625 and this fits perfectly, even large modular sections of world environment at vast distances.
Post Reply