Z as up vector

ahmedismaiel

18-02-2006 17:08:08

Hi,
how to export the model with y and z switched so z is up
there is a check in octopos exporter called filp y/z how to achive that using your exporter.
i want the coordinates of the game same as 3d max ,z is up.

praetor

18-02-2006 19:26:32

You could do it on load. In a callback from oFusion just flip all the appropriate vectors in the loaded object.

ahmedismaiel

18-02-2006 20:03:39

i dpn't think this is a good solution ,because this will definitely slow the process.also i think it's a pre-computed values so there is no need to process them every time i need them :!:

Lioric

19-02-2006 01:32:43

Use the pivot of the objects, go to "Hierarchy" tab panel, select "Affect Pivot Only" and rotate your object pivots so the up vector is where you need it to be, unselect "Affect Pivot Only" , and depending on your models, they might need a "Reset Positon" and "Reset Scale"

sanfir

13-03-2006 19:05:54

I guess rotating the axis is not the ultimate solution here, the problem is you can never get an axe to point to the opposite direction. So if you have Z pointing up and you want it to point downwards, without changing the X,Y directions, what would you do??

Lioric

14-03-2006 02:15:23

You can use the "Flip" axis options of the export dialog

scotch

14-03-2006 05:33:35

Would adding a "Swap Z and Y Axes" option to the exporter, (alongside the flip options there are currently) be difficult? It seems like that would be the best solution for people, I've certainly seen it in 3ds Max game exporters before, can't remember which though. Thanks for pointing out the rotating pivot solution before, I'll use that for now, it's rather laborious though. And thanks for oFusion, it's awesome!

sanfir

14-03-2006 13:23:14

Yeah, I totally forgot about flipping axis. It should work. However adding the flip YZ axis as in the octopus exporter would be a bless.

Thanks for everything

Lioric

14-03-2006 16:00:06

What is this flipping ZY axis needed for? can you present a case to evaluate its possible incorporation?

sanfir

15-03-2006 01:09:38

Our current use of having flipping the ZY axis is that we are using a physics engine, that exports itscollision meshes from max with the Z pointing up, while oFusion exports it with the Y pointing up. Thus the collision mesh does not conform to the scene exported.
I guess many similar examples would occur with such differences.

scotch

16-03-2006 11:59:42

Ok, thinking about it I guess those exporters I've used before were for left handed coordinate systems, or something, this all gives me a headache thinking about it. All I want is for models that I make in max, (with the front visible in the front view, and the left visible in the left view, etc) to be exported so they are the same in normal OGRE coordinates, so...



I guess I want a rotate everything 90 degrees around X option? Rotating the pivot does that as you pointed out, but if there was just an option in the exporter to translate Max's idea of up to OGRE's idea of up, things would be a lot nicer.

Everything I've exported in other exporters was exported the right way up, as far as I can remember.

Lioric

16-03-2006 16:31:02

This is handled internally, look in the viewport, the objects are positionated correctly and they coordinate axis are converted so if you move the object up in max, it moves up in ogre, if you move it ot the left in max, it moves to the left in ogre

Probably i dont see what you are trying to tell me, but all exported objects will appear in ogre applications, exactly as they appear in max

scotch

16-03-2006 17:35:31

Well... uh, I guess I made a mistake making my meshes or something, then. I'll try it again. Sorry if I'm just being stupid, that's not unusual.

Yes, it seems to be about the pivots, I'm drawing 2d collision meshes with splines, in the front view, and then converting to mesh for export. Well, they are created with their pivots rotated forward like that. I've just never had a similar issue before so I didn't think to look. Sorry to bother you ;)

ahmedismaiel

16-03-2006 17:48:48

i would like to commnet that not all other Libraries suppose that Y is up ,for example Physx or known as Novodex or even NXOgre wrapper have an exporter in max to export the collision meshes which export the values as they are in max without away to change them because they export some physics specific orientation matrices which cann't alter Z/Y in them.

i would be very happy if i see this feature in you plugin because i find it the easiest tool to use (after visual studio),
so i can enjoy the features of Physx over a great scene exported using you engine.and make my life easier and don't have to rotate and mirror every scene before exporting it.
i hope you find me convincing to tempt you to do it :)