Simple 3d Model with 3 animations

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

Simple 3d Model with 3 animations

Postby skul3r » Mon Mar 01, 2010 2:18 pm

Hi,

I'm new to android and I would like know how hard would be to load a 3d model with 3 animations in it (a simple character).... All I need is to play the animations in the application and change beetween them... it is not a game. Just a single character that changes animations (feelings).

I did the application in j2me without problems using the m3g...

What kind of 3d models android supports? I have the source files from the 3d model... so I can export to any file extension!

Thanks,

Daniel
skul3r
Freshman
Freshman
 
Posts: 8
Joined: Fri Jul 03, 2009 2:04 pm

Top

Postby betwixt » Tue Mar 02, 2010 11:57 pm

Check the AndroidGL project at googlecode, there is ModelLoader from md2 format.
betwixt
Freshman
Freshman
 
Posts: 5
Joined: Fri Jan 22, 2010 5:57 pm

Postby skul3r » Thu Mar 11, 2010 3:05 pm

Thanks it works!

However, I get outOfMemoryExecption every time that I execute my application for the second time :(.

I did some modifications on the suhas3d's project to change the animations inside the md2 and a little correction on the texture. I attached the project in the post.

I tried to fix the outOfMemoryExecption referencing variables to null and calling System.gc() but no success :(

can anyone help me with it?

To see the outOfMemoryExecption just press Menu > Exit from the application and run it again!

Thanks!
Attachments
suhas3d.zip
(1.49 MiB) Downloaded 355 times
skul3r
Freshman
Freshman
 
Posts: 8
Joined: Fri Jul 03, 2009 2:04 pm

Postby Mike Nelson » Fri Apr 02, 2010 4:50 pm

without looking at your code sounds like your not cleaning up when the program exits. by default it just goes in the background, and if it loads up again and try's to load all the data allover again, it could easily run out if you're using a lot of RAMs.
Mike Nelson
Freshman
Freshman
 
Posts: 9
Joined: Fri Apr 02, 2010 4:41 pm

Top

Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 5 guests