Question subject: Handling m3g format (3D files for mobiles) in J2ME
Posted: Thu Oct 21, 2010 12:37 pm
Joined: Thu Oct 21, 2010 7:16 am Posts: 1 Has thanked: 0 time Have thanks: 0 time
Hai,
I am new to this forum. I am developing my first application in J2ME of handling m3g files which includes Loading of Model,Loading of Texture, Rotate Right, Rotate Left, Zoom in and Zoom Out.
Now loading of m3g image is done. Texture Loading is not happening.
I am loading car model as m3g file. For the same car the texture is not loading which is in Jpg or png formats.
Can you guide me how to load the texture.
The code which I am trying is given below for loading of model and texture.
// loading of model
G3D = Graphics3D.getInstance(); world = (World)Loader.load("/Swift/car.m3g")[0]; Object3D root[]; root=Loader.load(name); world = (World) root[0]; mesh=(Mesh)world.find(4);
What is happening with the above code is model is loading properly and able to rotate and zoom but the texture is not at all loading.
Then I interacted with the Graphics Team and finally they have given me m3g format file only which consists of its own textures as inbuilt. In this case what is happening is, the model is loading properly with the textures. But I am unable to rotate or zoom the model. If I click for rotate or zoom the model is hiding out of the screen and unable to monitor the X,Y,Z co-ordinates and Camera position.
I have referred and used the code which is given in the following link :