little dancing guy

Official forum for the Chipmunk2D Physics Library.

little dancing guy

Postby arri » Thu Aug 20, 2009 2:56 am

hi,

i created a character using chipmunk. a human body with a corps, a head, and all the limbs and extensions in place.
using rotaryLimitJoint and dampedRotarySpring i managed to make him stand all by its' self,
although he looks like he's on (too much) amfetamine...

now i'm a bit stuck on how to procede.
my final goal is to make him dance different dances/styles.(and not fall over)
maybe according to a several "choreographies".

one way i'm thinking of is to connect all limbs/joints to (invisible) static bodies, and have all these bodies perform (hardcoded...) animations, so that the character will move the way i want. but that's not at all as easy as it sounds..
also i played around with applying forces or impulses, but that looks very clunky, and it is very hard to keep the movements within moderate ranges.
would anyone here have suggestions on how to solve problem?
the actual dances/choreographies don't matter so much, as long as they look more or less natural/convincing.

and then i also have a weird problem.
when the little guy is standing at ease, he will always slowly and smoothly but consistantly slide to the left in the space.
i've tried everything with regard to surface/friction settings, but nothing that solves this. even applying very strong damping to the space will only slow down the sliding, biut not stop it.
i imagine it has to do with how the body is actually a complex system with springs that maybe have some internal (invisible) resonance that cause this effect.
in which direction could i look for a solution?

many thanks,
arri
arri
 
Posts: 4
Joined: Thu Aug 20, 2009 2:18 am

Re: little dancing guy

Postby slembcke » Thu Aug 20, 2009 11:10 am

To the first part, instead of damped rotary springs to control his movements, I would try using a gear joint with a 1:1 ratio, a force maximum, and then animate the phase parameter of the joint. This will look much less springy and wavy. Beyond that, actually animating him... I have no idea, you are blazing new ground I think.

As to the sideways movement problem. I would also expect that it's because you have a collection of constraints that are all vibrating in such a way as to make him scoot. I've noticed this as a problem sometimes with things that have multiple legs resting on the ground all connected by joints. I think it's not really a bug per say, but an artifact of how the solver works. I'm not really sure how to reduce it either other than increasing the iterations. Disabling elastic iterations is a good place to start.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: little dancing guy

Postby dieterweb » Sun Aug 23, 2009 1:33 pm

I would try to not animate the character with chipmunk, but use a skeletal animation for him. When he is dead, or falls, turn him into a ragdoll with chipmunk physics.
Visit our game Blog: http://zombiesmash.gamedrs.com or follow us on twitter: http://twitter.com/zombiesmash
dieterweb
 
Posts: 176
Joined: Fri Feb 27, 2009 7:12 am
Location: Germany

Re: little dancing guy

Postby arri » Sun Aug 30, 2009 10:41 am

thanks for these suggestions,

@slembcke: the gearjoints indeed work much better, i use them with certain force (not max) and bias settings, so that the joints can still be bent by 'external' forces .. also, the gearjoints make it very easy to create certain combinations of movements that are very common, such as lifting a leg, while beding the knee of that leg.. in this case the hip- and the knee-joints should bend with the same amount, but in opposite directions.

dieterweb, i've been thinking of creating a skeleton-model myself to do what you suggest, but due to time constraints i left that idea behind, since the chipmunk-way might not be ideal, but it more/less works for what i want, and is actually pretty easy to implement..
and instead of implementing my own skeleton-model, i've been looking if there maybe are any (opensource) skeleton-model/-animating libraries around, but i haven't found any. are you aware of such a project somewhere?


thanks
arri
arri
 
Posts: 4
Joined: Thu Aug 20, 2009 2:18 am

Re: little dancing guy

Postby dieterweb » Sun Aug 30, 2009 11:56 am

I searched for open libraries, but have not found anything usefull. There is much for 3D, but not 2D. Of couse these can be used for 2D, too, but they where too complex for what I needed.

Here is a good tutorial: http://gpwiki.org/index.php/OpenGL:Tuto ... nes_System

Thomas
Visit our game Blog: http://zombiesmash.gamedrs.com or follow us on twitter: http://twitter.com/zombiesmash
dieterweb
 
Posts: 176
Joined: Fri Feb 27, 2009 7:12 am
Location: Germany

Re: little dancing guy

Postby arri » Tue Sep 22, 2009 8:54 am

thanks thomas,
yes i also found such libraries, but thei're way over the top for what i want..

anyway, ..for those interested:

the results of my adventures creating a dancing guy using chipmunk
can be checked-out in the iphone-app JeePee, which just entered the appstore.
it's free, very funny (especially for the dutch), and utterly useless!

the app is not gonna make me rich, but i'm sure JeePee will generate
revenue indirectly, and the first place i'll visit will be your donation-button.. :)

thanks a billion!

gr
arri
arri
 
Posts: 4
Joined: Thu Aug 20, 2009 2:18 am

Re: little dancing guy

Postby dieterweb » Tue Sep 22, 2009 4:00 pm

looks really funny. I would add some rotationary constraints to the pivot joints. The ragdoll would not collapse so unnaturally.
Visit our game Blog: http://zombiesmash.gamedrs.com or follow us on twitter: http://twitter.com/zombiesmash
dieterweb
 
Posts: 176
Joined: Fri Feb 27, 2009 7:12 am
Location: Germany

Re: little dancing guy

Postby slembcke » Tue Sep 22, 2009 5:22 pm

Awww. Requires 3.0. I haven't updated my iPod so that we have a 2.x testing device.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm


Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 0 guests

cron