Axes in JPCT and 3DS Max

Started by stownshend, August 25, 2011, 12:14:23 PM

Previous topic - Next topic

stownshend

Hi all,

Apologies if I'm asking a question already covered in previous posts. I've looked around but not found the discussion I'm after.

I have a friend developing models in 3DS Max and I am importing them and using them in JPCT. Naturally the co-ordinate system is quite different:



What's the best way of handling the difference in axes? When he sends me a model which is facing "forward" it is facing "down" to me and I see its feet (as per the difference in axes).

Is there a way to change the axes in JPCT? Or is it better practice to rotate each Object3D in my scene to fit the existing JPCT system?

Ideally I'd like to import models and have them show up as my colleague sees if this is possible.

EgonOlsen

I usually do a


obj.rotateX((float)-Math.PI/2f);


on 3ds files. You can also make this permanent by doing


obj.rotateX((float)-Math.PI/2f);
obj.rotateMesh();
obj.clearRotation();


While this doesn't transform the max coordinate system that you've posted to the one of jPCT, it used to work fine for me. Maybe the loader already does some conversions...i can't remember that ATM. Just give it a try.

Thomas.

for me would be better rotate axis in 3ds max, but it is probably impossible...

stownshend

Thanks Egon - that's what I was doing (minus the rotateMesh()) and its working. I was just thinking if there were an easier way to do it, as I'm going to be adding 50+ 3DS models to my scene and thought there might be an easier way to handle this without rotating each object (some kind of global world rotate).

Thomas - I will talk to my friend and do some research around changing the co-ordinate system in 3DS Max. In the end, it might be easier for me to deal with the difference using rotations because he's used max for years and habitually considers the positive z axis as "up".

Cheers for your input, it confirms my approach is at least valid.