skeletal human animations [UPDATED]

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
xray
Posts: 231
Joined: Fri Feb 02, 2007 1:06 pm
Location: Germany, Munich
Contact:

Post by xray »

Thanks Cardinal!

The flickering light isnt a problem I think, I just dont wanted to use the normal lightning as material flag so I created lights and used EMF_NORMALIZE_NORMALS for the model!
xray
Posts: 231
Joined: Fri Feb 02, 2007 1:06 pm
Location: Germany, Munich
Contact:

Post by xray »

Now it works also with Irrlicht 1.4, so you dont need Acki's IrrExtension !
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

that is awesome!

i saw the demo program and will definitely add this to my demo collection.

by the way, let me know if there any code that will work for a human face, i'm looking into making a demo of a talking human face.

thanks a lot.
Image
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

Wow this is really cool. This look very fluid (i also like the accelration blending)

One tiny thing that makes it look unnuatural is the fixed pelvis. the pelvis ocscilates within 5 cm from its rest postion vertically and laterally (2.5cm displacement).

If you use trig for this like some of the other limbs you can have max lateral displacement to the fixed foot side when the free moving foot is at its highest point in the cycle.

Max vertical dispalcement when both feet or just one foot on the ground.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

i found an article about walk cycle.

http://www.idleworm.com/how/anm/02w/walk1.shtml

Image
Image
xray
Posts: 231
Joined: Fri Feb 02, 2007 1:06 pm
Location: Germany, Munich
Contact:

Post by xray »

Cool, thanks... I will have a look at it and maybe can improve the animation cycles!
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

just to let you know, i'm going to use this code to rig the character i'm currently shading.

what's the license of your code? if i may ask.

i'm also planning on adding more animType(s) in there just for fun and experimentation.
Image
xray
Posts: 231
Joined: Fri Feb 02, 2007 1:06 pm
Location: Germany, Munich
Contact:

Post by xray »

Im still happy that the source is helpful for someone, so there is no license you can use and/or modify it to your needs. It would be fine if you let the information in top of the skeleton header (accept the informations you want to add if you modify the header) but I cant and dont want to ban you to do this, its just a please :)

Regarding your link to the walk cycle, I modified both walk and run cycle alot so it looks much more realistic now, not so stiff. Before I post the new source I want to improve the blendings from one to another cycle...
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

no problem, of course your name will added.

the code looks good, i'm hoping i could use it to write a demo of a fight scene where there are no more guns and knives, only hand-to-hand combat.

a good example of that is a karate fight scene. i read an article in gpugems2 about hair-n-body collisions (nalu demo), and figured those collisions can be implemented for a fight scene as well.
Image
Tr3nT
Posts: 65
Joined: Thu Nov 29, 2007 5:19 pm

Post by Tr3nT »

uhm...I wanted to do a "tekken like" fight game.....but I have lots of problems......
for good positions I'm trying to make a little program where u can set the rotation of the bones and apply it in real time but i don't understand well the code for the movements......

but how can I make a non-loop animation?????

for the moment I have only this question...
fmx

Post by fmx »

fighting games are never easy, my friend, and achieving animations something of the quality of "tekken" WITHOUT motion-capture or even some understanding of animated-formats in general, will leave you with many wasted hours, days or even years

I hope someone can help you, but I really hope more, that you can help yourself,
and realise what you should be using, and what you shouldn't, well in advance of when you run into a brick wall


best of luck
:)
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

Damn that looks GOOOD!

Maybe add another jump which is like faster or higher so a combination of run and jump would fit good.
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
xray
Posts: 231
Joined: Fri Feb 02, 2007 1:06 pm
Location: Germany, Munich
Contact:

Post by xray »

@Tr3nT: Your question is easy to answer. The animation functions are all stored in
bonesOsci if you have a look at it. And this bonesOsci variable is an array of
core::vector3df. And the anumeration points to the specific bone. For example SKT_BONE_LEG_R
is the right leg :)
So this bonesosci array stores the current bone rotation. For example lets take this line:

Code: Select all

	bonesOsci[SKT_BONE_TORSO] = core::vector3df(0, dryAbrasion*8.f*sinAlpha ,0);
here the torso bone only gets an y rotation, and a simple sinus function is caculating
every frame a new position. This dryAbrasion variable handles a simple line which
is able to increase/decrease the amplitude of this sinus function (for blendings from
one animation to another). So if you just want to set one value for the bone you do something like this:

Code: Select all

	bonesOsci[SKT_BONE_TORSO] = core::vector3df(0, 90.f ,0);
But as fmx said, a tekken fight game isnt really easy, towards the animations of the players.
And also oscillation functions like sinus and cosinus arent really enough for example if you
want a leg kick of the player. Well it would work but than you should learn more about functions,
this is important.

By the way, motion capture isnt so difficult. If I had more time for other projects than my game
I would create a motion capture software with irrlicht. Some time ago a created over pascal a software
which captures a video over a webcam and caculates the position of a spere (table tennis ball)
in the room, for every 3 axis. So it would just need an interface for throwing all position data
to irrlicht and to specific bones of a body. So it would make it really easy for any armateur at home
to create motion captures. Maybe some time...

@MasterGod: I will try it

Keep updated, in some days maybe I will release a new version, and now the bones are shaking through
animations. Looks much more realistic!!
xray
Posts: 231
Joined: Fri Feb 02, 2007 1:06 pm
Location: Germany, Munich
Contact:

Post by xray »

A new version is out, and now it looks much more realistic.
I added to all animations shaking bones, also the blendings
are now a little bit better, so have a look at it!
neoIxen
Posts: 13
Joined: Fri Mar 16, 2007 3:39 pm

Post by neoIxen »

this one is one of my favourite code snippets :wink:

I really like it, but it lacks of a frame-limitation...
If i don't activate vertical sync. (constant 60fps) in my nvidia driver the guy runs with speed of light :P
Since this is based on irrlicht ("licht" == "light" ^^) it's not bad and show how fast irrlicht is, but for games it's a bit too fast :P

And I also think VSync isn't the best solution, because it matches the refresh rate of the screen, doesn't it :?:

and what about reversing some animations or adding some new ones for running/walking backwards or so :roll:

neoIxen
Post Reply