www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: kitox on December 12, 2012, 10:16:23 pm

Title: loading 3d's
Post by: kitox 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....
Title: Re: loading 3d's
Post by: EgonOlsen 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.
Title: Re: loading 3d's
Post by: kitox on December 12, 2012, 11:45:31 pm
ok...sorry..
Title: Re: loading 3d's
Post by: BABABLACK_911 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.