Sign in to follow this  
scarypajamas

Making a humanoid model look up and down

Recommended Posts

I'm looking for an easy approach is to making a humanoid skeleton model bend over and upwards.

 

I did some research and found that Quake 3 split their models into 3 pieces: the legs, torso, and head.  They positioned each one in the "correct" location using "tags" in engine.  They then independently bent the torso and head forwards or backwards depending upon if the player looked up or down.

 

What are some "easy" approaches using one model with a skeleton?

 

A secondary question is whats an easy way to animate the legs and upper body individually?

 

Thanks.

Share this post


Link to post
Share on other sites

I did some research and found that Quake 3 split their models into 3 pieces: the legs, torso, and head.  They positioned each one in the "correct" location using "tags" in engine.  They then independently bent the torso and head forwards or backwards depending upon if the player looked up or down.

 

This was a long time ago, when 3D rigs where simple things.

You could still do it this way, however you will have lots of limits on what you can achieve with such a simple rig. The advantage would be the performance you can get from it.

 

Search "3D character animation" "3D rigs for game animation"

 

 

http://iamzimmer.blogspot.co.za/2013/01/game-character-rig-skeleton.html

This is a example of a more modern rig I found on the net, one of the first images Google provided.

 

This appears to be a complex all purpose rig, before exporting the helper bones would have to be deleted.

In general most rigs have 42 bones on export.

 

Note: This is for the most used rigs(humanoid enemies in shooter games) and after exports, the rigs used to create the animations is as large as the animator needs.

 

Head, Neck, Eye guide, Cervical, Thoracic, Lumbar, R/L Arm, R/L ForeArm, R/L Hand, Pelvis, R/L UpperLeg, R/L LowerLeg, R/L Foot, R/L Toes.

The Hands are: Palm, Thumb(3 joints), Index Finger(3 joints), MiddleFinger(2 joints) and the RingFinger and Pinky both share one bone.

 

 

I have seen some developers creating bones for each finger with 3 joints each, that is 15 bones for one hand, combined with the toes you would need over a 100 bones for such a complex rig.

The other downside is that each bone, if they are animated or not, will have a impact on performance. So using a 15 bone hand on a character that only has to pull a trigger is just a waste.

Share this post


Link to post
Share on other sites

What program/engine are you looking to use? UE4 does things different than Unity and Blender is different (in the finer points) to both.

 

Custom.

 

 

I did some research and found that Quake 3 split their models into 3 pieces: the legs, torso, and head.  They positioned each one in the "correct" location using "tags" in engine.  They then independently bent the torso and head forwards or backwards depending upon if the player looked up or down.

 

This was a long time ago, when 3D rigs where simple things.

You could still do it this way, however you will have lots of limits on what you can achieve with such a simple rig. The advantage would be the performance you can get from it.

 

Search "3D character animation" "3D rigs for game animation"

 

 

http://iamzimmer.blogspot.co.za/2013/01/game-character-rig-skeleton.html

This is a example of a more modern rig I found on the net, one of the first images Google provided.

 

This appears to be a complex all purpose rig, before exporting the helper bones would have to be deleted.

In general most rigs have 42 bones on export.

 

Note: This is for the most used rigs(humanoid enemies in shooter games) and after exports, the rigs used to create the animations is as large as the animator needs.

 

Head, Neck, Eye guide, Cervical, Thoracic, Lumbar, R/L Arm, R/L ForeArm, R/L Hand, Pelvis, R/L UpperLeg, R/L LowerLeg, R/L Foot, R/L Toes.

The Hands are: Palm, Thumb(3 joints), Index Finger(3 joints), MiddleFinger(2 joints) and the RingFinger and Pinky both share one bone.

 

 

I have seen some developers creating bones for each finger with 3 joints each, that is 15 bones for one hand, combined with the toes you would need over a 100 bones for such a complex rig.

The other downside is that each bone, if they are animated or not, will have a impact on performance. So using a 15 bone hand on a character that only has to pull a trigger is just a waste.

 

 

Is it the engines responsibility to animate the humanoid forwards and backwards or is it the artists?

 

If you rotated a torso around a pelvic bone, then the triangles from the upper body will clip into the triangles from the pelvic area.  The vertices must be compressed nicely in order to create a smooth look, like in these screenshots [1] and [2]. 

 

[1] https://doi.ieeecomputersociety.org/cms/Computer.org/dl/mags/cg/2008/03/figures/mcg20080300484.gif

[2] https://62e528761d0685343e1c-f3d1b99a743ffa4142d9d7f1978d9686.ssl.cf2.rackcdn.com/files/111482/width668/image-20160215-22596-1xdjfyg.png

 

This bending needs to happen from the bottom of the torso and up to the neck (so the back bends nicely).

 

My question is:

#1. Whose responsible for the bending, the engine or the artist?

#2. If its the engine, then what algorithms are used for this?  Do vertex weights set by the artist come in to play or does the engine just use "special" bones (maybe based off there name) to do rotation/weighting?  I'm asking how this works in general.

Share this post


Link to post
Share on other sites

There is no only "engine" or only "artist". Artist does the rigging/skinning and makes animation clips which are then used by the engine to process further. There may be IK solver work done on engine side, clip blending, attaching objects to bones, adding restrictions, ragdolling and so on.

 

Look for "inverse kinematics lookat" to find some read about this topic. Just to confirm I understand what you're trying to achieve correctly, you want to do something like this:

 

https://www.youtube.com/watch?v=jzDCvlWvhfY

 

Share this post


Link to post
Share on other sites

Just to confirm I understand what you're trying to achieve correctly, you want to do something like this:


Yes, thats what I'm trying to solve however, I only need looking up and down as opposed to all around you like in the video.  Is IK the easiest way to achieve this?

 

Here are some other techniques I've considered, but I'm not sure about there feasibility:

  • Have the artist create the up/down bend and then blend it with another upper body animation like saluting and leg animation.
  • Take the Quake 3 route and make the head, torso, and legs separate pieces assembled in engine.
  • Create a skeleton that the engine "understands" and the artist builds around.  The bones of the skeleton would be understood by the engine so it knows how to create a bend.  Is this how its normally done?

 

Additionally, is there a popular IK library (in C or C++) that could be leveraged?

 

Thanks so much for your help.  Its difficult to describe a problem when you don't know the terminology.

Edited by scarypajamas

Share this post


Link to post
Share on other sites

I've worked a couple of games were we did this splitting... in both cases we had the engine know what bone would be used to split an animation from...

 

For example, your artist could create a running animation, a shooting animation independently....this way we set to use the pelvis as the spliting bone... so you could run the shooting animation from the pelvis upwards (ignoring it from the pelvis downwards), and the running animation from the pelvis downwards (ignoring the upper part of the animation).... and you would get a "running and shooting" animation.... 

 

The same could be done with the head, we could specify the neckbone for splitting animations, so that we could rotate the head depending on where the user was looking at (not animated by the arstist), and everything below would be animated accordingly depending on the current action by the player (running, shooting, standing still, etc).

Share this post


Link to post
Share on other sites

Weights and bones in maya/blender/max will be exported and read as is in your custom engine. Same data. Same outcome.  The only difference between the two is it is your job to deal with game engine stuff, like IK and blending of multiple animations together.

 

As for your original question, you basically can hi-jack your bones after they are done with your animation code. You can directly set your spines matrix as well as your head if you want head tracking.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this