GPWiki.org
GPWiki.org
It is currently Fri May 24, 2013 2:05 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: openGL game with android
PostPosted: Tue Nov 08, 2011 4:27 pm 
Rookie

Joined: Tue Nov 08, 2011 4:03 pm
Posts: 2
Hello!

Can I re-implement the code from codehead's tutorial, basic bones system, in Android so that I can create a character that can move like a human? i think a bone system like that would be perfect to simulate the character movements in 2D. Also because I need total control of how the character move as I wish to simulate moves like a dance routine.

Regarding the skin, can I make my character look more than a "stick man" in the tutorial?

And thank you (bonehead) for the awesome tutorial and the demo code, it's exactly sort of thing that I need for this project that I'm doing.


Top
 Profile  
 
PostPosted: Tue Nov 08, 2011 6:35 pm 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 6717
Location: Oxford, Englandshire
Hi Bili!

This tutorial? (OpenGL:Tutorials:Basic Bones System). That wasn't mine, I just did the last few edits that are showing. The original work was by Akiross I think (a bunch of edit history was lost in a site move a while back).

Anyway, you are free to take the code and modify it if you wish. There shouldn't be anything on the Wiki that's restricted. (a mention of the source would be nice though. ;) )

Deforming a mesh to match the skelton is covered in the tutorial, but it is skimmed over a little. One thing I will say is that OpenGL on Android can be a bit sluggish. I'd go for more of a doll/robot joint approach where you break up your model into chunks (Torso, upper arm, lower arm, hand) and simply draw each sub-object at the bone location.

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
PostPosted: Tue Nov 08, 2011 8:45 pm 
Rookie

Joined: Tue Nov 08, 2011 4:03 pm
Posts: 2
Yes, that's tutorial! Oh wow, it looks like he is a lecturer.

I will need to provide reference for my project anyway so mentioning the source and the wiki will definitely be there.

I have to do animation for the project so I think this is the most flexible way to do it. Well at least I can try, it's one of the options for animation. Breaking up the model into different chunks as you mentioned is exactly what I'm going to do for this project. I have started with bones though!

Can you recommend me some books/tutorial in this topic area that dive deeper in details? I found that tutorial few days ago but I find it quite fascinating. Perhaps because I tried to rig a model in blender before and it uses these bone and joint systems and found them to be very powerful and awesome for animation.


Top
 Profile  
 
PostPosted: Tue Nov 08, 2011 11:08 pm 
Bibliotherapist
User avatar

Joined: Wed Nov 03, 2004 1:28 pm
Posts: 6717
Location: Oxford, Englandshire
If you're using object 'chunks' you can drop them in to replace the bones. I don't have an example handy, but I did do a test a while back with a similar setup. You can use glRotate and glMove to move along the object hierachy. Also glPush/glPop allow you to work back and forth between the major roots (torso, hips, etc).

The key is to ensure that the origin of each object is at its pivot point and you know the offset to the next object.

_________________
10 PRINT "Bad Monkey ";
20 GOTO 10


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group