Author Topic: loading 3d's  (Read 2541 times)

Offline kitox

  • byte
  • *
  • Posts: 8
    • View Profile
loading 3d's
« on: December 12, 2012, 10:16:23 pm »
i cant understand the hello world tutorial... i dont have any idea how to load .obj format........help please....

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: loading 3d's
« Reply #1 on: December 12, 2012, 10:19:34 pm »
Please stop spamming the forum with help requests...that won't take you anywhere. If you don't understand HelloWorld, you should try to...understand HelloWorld. HelloWorld is as simple as it gets. Before trying to load obj files, you should really try to get familiar with HelloWorld.

Offline kitox

  • byte
  • *
  • Posts: 8
    • View Profile
Re: loading 3d's
« Reply #2 on: December 12, 2012, 11:45:31 pm »
ok...sorry..

Offline BABABLACK_911

  • byte
  • *
  • Posts: 14
    • View Profile
Re: loading 3d's
« Reply #3 on: December 21, 2012, 07:10:58 pm »
I've achieved the loading of OBJ files.... just replace the code in hello world..

/*cube = Primitives.getDoubleCone(20);
            cube.calcTextureWrapSpherical();
            cube.setTexture("texture");
            cube.strip();
            cube.build();
world.addObject(cube);*/

by this...

cube = Object3D.mergeAll(Loader.loadOBJ(getResources().getAssets().open("airboat.obj"), null, 10));
               cube.build();
               world.addObject(cube);

be sure to surround this snippet by a try catch block.
hope this helps.