Author Topic: z-difference in objects from Blender  (Read 2084 times)

Offline hedgehog

  • byte
  • *
  • Posts: 6
    • View Profile
z-difference in objects from Blender
« on: August 30, 2012, 02:57:37 pm »
In Blender I have created a landscape plane and a flat water-level plane, and intersected them so water shows in the low areas. I have then exported as OBJ format, then serialized them for use in my Android app, but when the app loads, the water plane is too low and has to be translated about 35 units in the z direction to get the same look as my Blender scene.

Do you perhaps know why this is happening?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: z-difference in objects from Blender
« Reply #1 on: August 30, 2012, 08:24:39 pm »
If you apply a rotation after loading, it might have to do with the rotation pivot. If you rotate, are you doing this before or after calling build()?

Offline hedgehog

  • byte
  • *
  • Posts: 6
    • View Profile
Re: z-difference in objects from Blender
« Reply #2 on: August 31, 2012, 02:53:38 pm »
Well I am not doing any rotation before serializing. There is rotation done when the serialized objects are loaded into the Android app.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: z-difference in objects from Blender
« Reply #3 on: August 31, 2012, 08:35:53 pm »
That's might be the reason because jPCT calculates the rotation pivor based on the object's geometry. Either try to do the rotation before building and serializing the mesh on the desktop or set the rotation pivot of one object to the other one after loading it and see if that helps.