www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: Wolf17 on November 18, 2013, 10:32:02 am

Title: About wrong position of objects in my custom blender scene exporter for jpct-ae.
Post by: Wolf17 on November 18, 2013, 10:32:02 am
  I am making a blender script which exports a text file which is readable in jbrush ,which I can load in android. But I am bit confused because of wrong positioning of objects in exported scene files.
for example -- I have 2 3d objects in blender and set both of their positions to different co-ords and export them  . But when I load them in jbrush/device , and set both their  translation to (0,0,0), then I want that both objects should coincide . But they are not coinciding  >:(. I want some suggestions to correct my code for positioning  of objects please help!  :-[
 screenshots- 1st is the blender pic
                       2nd is jbrush  pic

[attachment deleted by admin]
Title: Re: About wrong position of objects in my custom blender scene exporter for jpct-ae.
Post by: Wolf17 on November 18, 2013, 10:32:44 am
2nd img
edit : here in img 2 ... the 2 models are exported as it is from bleder and you can see how the position of objects are altered..........

[attachment deleted by admin]
Title: Re: About wrong position of objects in my custom blender scene exporter for jpct-ae.
Post by: EgonOlsen on November 18, 2013, 08:43:44 pm
What do getCenter() and getTransformedCenter() return for both objects?
Title: Re: About wrong position of objects in my custom blender scene exporter for jpct-ae.
Post by: Wolf17 on November 19, 2013, 09:46:49 am
 I "Think" I have solved my problem (Still not confident).
But can I upload this somewhere for anyone interested so that they can test and report bugs ? I want the script to be available for general download  . It is extremely crude(as i just modified already existing export .txt  script ) and just "works" (seems to be!) . I need code contributors , bug reporting and suggestions .
What it currently does is it writes a text file which is readable in jbrush-ae library.
What can you do -
1. Edit,place,rotate the mesh in blender .
2. Uses Diffuse color to set additional color.
3. Set transparency level.
4. Set object Texture in from Texture slot.
5. Upload scene in jbrush and edit more (settings like collision ,pointlights) and also serialize models.

blender img-
(http://i.imgur.com/3xDn0nl.png)
phone screenshot-
(http://i.imgur.com/ASEGppj.png)
Title: Re: About wrong position of objects in my custom blender scene exporter for jpct-ae.
Post by: EgonOlsen on November 20, 2013, 08:54:20 am
Just upload your script, i'm sure it will help others too. I can also host it on this server, if that helps. Have you considered to write some documentation for it in the wiki? I can create you an account if you want to.
Title: Re: About wrong position of objects in my custom blender scene exporter for jpct-ae.
Post by: Wolf17 on November 20, 2013, 01:39:30 pm
  I would Like it . But the problem is that , It is quite incomplete . As I said , it is very crude and I dont want to circulate a buggy tool . But I do need some feedbacks and suggestions . For now  , a special sticky topic  where I would post some instructions with a download link would be enough . I am attaching a tutorial and the tiny script .

[attachment deleted by admin]
Title: Re: About wrong position of objects in my custom blender scene exporter for jpct-ae.
Post by: MessyAnt on March 19, 2014, 11:43:11 am
Hi  , Can you share the addon(Jpct)  for Blender(v2.69) !?
Thinks!