Mesh export - flip Y and Z axis ?

Varity

09-07-2006 02:48:20

Is there an easy way make ofusion export the unchanged coordinates from 3dsmax? For example I would like to see a vertex @ (3, 4, 5) being exported as (3, 4, 5) and NOT as (3, 5, -4).

I know that I can work around this by rotating the pivot point -90 deg. on the X-axis, but this is not very convenient.

I remember the old exporter having an option on the export dialog, but cannot find a way to do this with ofusion.

Am I missing something? If not, can you PLEASE add this in the next version?

Lioric

09-07-2006 03:02:55

Its been requested before, but i still dont see a good argument that justifies the amount of work needed to add this support, internally we should add this to several parts and debug them

If you have a valid reason , i would be good if you post it here

If you need this support now, in the pro version you can post-process (or completely override) the exporting scene and its media, i.e. if you need to construct collision detection data you can easily do that and add the results to the osm scene or to your own scene format/files

Varity

09-07-2006 22:33:54

I didn't expect this to require a big effort to implement, but I don't know the architecture of your software, of course.

Not everyone uses Ogre's example framework and the "strange" :wink: coordinate transform that goes along with it. I don't and so I was quite surprised to see this nonstandard behavior implemented in the exporter, even more that it isn't mentioned in the documentation (or did I just miss that?).

I suppose, once you know about it, its not a big deal as it is possible to work around, just inconvenient. I'll have to use the old exporter to reexport the meshes and can still use the rest of ofusion.

Unfortunatly, buying the pro version is out of the question as I'm doing this work as part of an university project. :cry:

jacmoe

10-07-2006 03:16:35

Not everyone uses Ogre's example framework and the "strange" :wink: coordinate transform that goes along with it. I don't and so I was quite surprised to see this nonstandard behavior implemented in the exporter, even more that it isn't mentioned in the documentation (or did I just miss that?).
Can you please explain to me what this strange transform is?
Other than the standard Ogre behavior?

The only place where something remotely strange is going on is in the BSP demo where the axes are switched around to match the coordinate system of Quake3.

Varity

10-07-2006 21:41:57


Can you please explain to me what this strange transform is?
Other than the standard Ogre behavior?

The only place where something remotely strange is going on is in the BSP demo where the axes are switched around to match the coordinate system of Quake3.



I think this transform is counterintuitive if you work with 3dsmax. If you just created your model using very specific coordinates for your vertices and they just don't come out the way that you input them, but somewhat twisted, you'd probably think it strange, too.

I am currently trying to debug my collision detector, a combination of ODE and Bullet (http://www.continuousphysics.com/Bullet/). To do that, I generate some meshes by code, collide them with stuff I load from .mesh files and create logfiles with the collision points. So I needed to have my mesh files in the "correct" coordinate system as rewriting all my code to match a changed coordinate system would have probably driven me insane... :wink:


Ofusion seems to be caught in the middle between two conflicting standards:

A. 3dsmax's use of a x-y groundplane with the z-axis pointing up
B. The practice used in the OgreExampleApp on how the objects and cameras are oriented in world space

I think it is unfortunate that ofusion chooses one of these over the other.


P.S.
If I wanted to be pedantic, I'd have to say that the core of the Ogre library (ogremain) makes no assumptions about how the objects should be oriented in world space; it is completely neutral in this regard (as it should be). OgreMain just defaults to the Camera looking down the -Z axis, if you don't set the orientation yourself. However, that doesn't mean that this needs to be a view towards the front of your objects, it could just as well be a top-down view.

Lioric

10-07-2006 22:01:56

This thread will explain you more details

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=860

Varity

10-07-2006 22:52:37

This thread will explain you more details

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=860



I already solved this yesterday, but thanks for the hint. :D