[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 » Tue Sep 15, 2009 11:14 pm

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.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Units in OGRE vs 3D Studio MAX

Post by jacmoe » Tue Sep 15, 2009 11:27 pm

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.
0 x
/* 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 » Tue Sep 15, 2009 11:34 pm

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.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Units in OGRE vs 3D Studio MAX

Post by jacmoe » Tue Sep 15, 2009 11:48 pm

Hmm - I am really no MAX expert, but I faintly remember something about reset XForm. Try that. :)
0 x
/* 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 » Tue Sep 15, 2009 11:55 pm

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. ;)
0 x

deamoncleric
Gnoblar
Posts: 3
Joined: Sun Jul 01, 2012 2:29 pm

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

Post by deamoncleric » Sun Jul 01, 2012 2:43 pm

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.
0 x

LDAsh
Gnoblar
Posts: 18
Joined: Thu Aug 25, 2011 8:29 pm

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

Post by LDAsh » Mon Jul 02, 2012 1:20 pm

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.
0 x

Post Reply