Author Topic: Inverted Model!!!  (Read 945 times)

Offline Birdron

  • byte
  • *
  • Posts: 22
    • View Profile
Inverted Model!!!
« on: May 08, 2014, 12:25:09 am »
Hi,
I am having a very strange problem. I am using blender to create my level and exporting the model as obj, as I normaly do. When I load the model in jpct, it loads upside down. I am also loading a md2 model, which is also upside down. And most interesting thing is, the camera seems like totaly inverted. I am 100 percent sure my obj is correct, cos I tested it in irrlicht. So, what I am missing here?

Edit: do I hv to setup my scene inverted. I mean '+' will be '-'?

Thanks.
« Last Edit: May 08, 2014, 12:46:41 am by Birdron »

Offline AGP

  • quad
  • ******
  • Posts: 1516
    • View Profile
Re: Inverted Model!!!
« Reply #1 on: May 08, 2014, 11:00:33 am »
It's not a matter of being "correct." Each engine or 3d software has its own coordinate system. Jpct's system has NEGATIVE y going up and positive (I think) z going into the screen. What do you mean by "the camera seems inverted?" You can't import cameras from OBJ. By the way, if you're already using Blender, have you tried the Blender scene loader that's posted in the projects board? I'll bet that this solves your problem.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11746
    • View Profile
    • http://www.jpct.net
Re: Inverted Model!!!
« Reply #2 on: May 08, 2014, 12:16:03 pm »
Or, to "correct" the orientation do something like this right after loading the model:

Code: [Select]
obj.rotateX((float)Math.PI);
obj.rotateMesh();
obj.clearRotation();

Offline Birdron

  • byte
  • *
  • Posts: 22
    • View Profile
Re: Inverted Model!!!
« Reply #3 on: May 08, 2014, 01:36:03 pm »
I did not know about blender exporter, I most probably missed it. I will try that. I hv
 setup my scene on negative coordinate. I cant try the blender exporter now cos I dnt have net on my pc.

Inverted camera mean, if I place the on y axis(positive), it rotates the camera 180 on z axis.

ank you.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11746
    • View Profile
    • http://www.jpct.net
Re: Inverted Model!!!
« Reply #4 on: May 08, 2014, 04:24:55 pm »
Whatever you do, keep the coordinate system in mind: http://www.jpct.net/wiki/index.php/Coordinate_system

Offline Birdron

  • byte
  • *
  • Posts: 22
    • View Profile
Re: Inverted Model!!!
« Reply #5 on: May 08, 2014, 07:28:38 pm »
Yeah thanks, somehow I missed it.

Thank you