Author Topic: Axes in JPCT and 3DS Max  (Read 2808 times)

Offline stownshend

  • byte
  • *
  • Posts: 25
    • View Profile
Axes in JPCT and 3DS Max
« on: August 25, 2011, 12:14:23 pm »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Axes in JPCT and 3DS Max
« Reply #1 on: August 25, 2011, 08:49:14 pm »
I usually do a

Code: [Select]
obj.rotateX((float)-Math.PI/2f);

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

Code: [Select]
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.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Axes in JPCT and 3DS Max
« Reply #2 on: August 25, 2011, 09:06:00 pm »
for me would be better rotate axis in 3ds max, but it is probably impossible...

Offline stownshend

  • byte
  • *
  • Posts: 25
    • View Profile
Re: Axes in JPCT and 3DS Max
« Reply #3 on: August 25, 2011, 10:05:45 pm »
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.