Character Facial Rigging/Controls in Panda

Hi everyone,

I’m trying to figure out a way to control the rig in Panda, that I set up in maya. The rig involves using set driven keys, and facial controls (nurbs circles) which control facial joints.

I had assumed it would be as simple as exporting the model as “-a both” using maya2egg, then translating the controls within Panda. Is this impossible?

If in fact set driven keys don’t work, what would be the best alternative? I’m really stuck here.

I’m not sure what is meant by “set driven keys”–I’m not an animator or a Maya user–but it sounds like the right approach. Note, though, that if your controls are not directly hooked up to vertices, but instead influence other bones which in turn influence the vertices, then you may have some difficulty. Panda will allow you to directly animate the bones that control the vertices, but won’t observe any constraints you apply between bones within Maya. This means you’ll have to directly animate the key joints, rather than some abstracted controls.

You might be talking about morph targets. Maya allows you to define multiple different versions of a face, with the vertices in different places to provide different facial expressions; then you can bind them all together and use sliders to control the amount of each one that is blended into the final output. This is not the same thing as joint animation, but Panda supports it. You can directly animate the sliders in Panda.

David

Thanks for the quick reply.

Though thats not the news you want to hear after you have just spent 2 days rigging and setting up facial controls. I guess morph targets (blend shapes) is the way to go, though they are a bit foreign to me.

You can still use joint animation. You just have to understand that you will expose only the lowest-level joints to Python, and then you can write Python functions that animate those joints the way you want them. Basically you can replicate your control groupings within Python code.

David

I have some questions:

  1. What David mentioned seems like Shape Keys in Blender ?
  2. As far as I know, it seems chicken do not support Shape key, is that right ?
  3. What is the best way to do it in blender+chicken ? How can I create these different facial expression and have chicken export it for panda to blender them ? Or the only choice is armature bone control?

clcheung:
1.jup
2.correct again.
3. for now you would have to do facial expression using armatures. however it is possible to access the shape-key data via python so it is possible to extend chicken to support shape-keys,too. but for now. joints,bones, armatures are the ways to go. a bit of a mess but it works quite well once its set up.

Hi ThomasEgi

If it is armature only, can I mix several facial expression and blend them together in panda ? How to do that exactly ? Any sample procedure and code ?

Thanks !

https://www.panda3d.org/manual/index.php/Actor_Animations
see the blending and sub-part animations.
i guess its as “easy” as creating a sub-part and play/blend the animations on that part. i never tried it but it should be quite straight-forward.

Thank you for the link.

Sounds a bit complicated to rig a face with bones !

I looks into the animation egg, it looks like the animation is armature base and not vertex base.

Does it mean that even I can export the Shape keys from blender, panda may not have the module readily accept them for blending in runtime ?

panda is well capable of vertex-based animations. for a long time it was not possible to read the shape-keys via blenders pyhton interface. today it’s really just a matter of adding this feature to the chicken exporter. given the big blender-rewrite at the moment, it makes little to no sense to spend effort in adding this feature, and then rewrite it a few weeks afterwards to work with the over-hauled blender2.5 python api. its more resonable to wait for blender 2.5 and then add it.

and yes it is indeed a bit tricky to animate a face with bones. i spend about 15 bones for the face to get some facial expressions working.

15 bones ! Do you have a bone structure picture that can be shared ? I just do 1-2 bones and want to kill myself already.

My materials on hand are shape keys. Do you know any good reference to do a pure armature for face ?

Driven keys in Maya are what you suspect, a tool for using control objects to indirectly control the animation of other objects. What he’s describing is having a bunch of bones in the face to do facial animation, and then moving those bones around using driven keys on some additional control objects.

Thomas’ suggestion is the way to use bones for facial animation; you can’t export the actual driven key-based controls, but you can use your driven keys to create a set of animations on the facial bones that you blend between in code.

The one tricky bit I’m unsure of is whether or not you’d need to bake the animations before they’ll be exported. I don’t know in this case specifically because I’ve yet to mess with the egg exporter (I’m pretty new to Panda too) but it’s similar to the considerations surrounding exporting IK. With the exporters for some game engines IK animations are dealt with fine on export, while with some exporters the IK animations have to be baked into FK animations first.

So, if I create a set of shape keys in blender, how can I “bake” it into animations that chicken recognize ?

@jhocking: its easy to make chicken export the armature as seen in the preview window, including all modifiers which affect the armature. (i think it should do it already, if not, its only 2 lines to change.)

@clcheung: http://home.arcor.de/positiveelectron/files/henrietta-face-rig.png <- allows a variety of facial expressions ranging from sadness and pain to things like gentle smiles or joy.and of course talking. but to be honest its quite a lot of effort to work with this.
and you cant “bake” the shape keys into something chicken can export unless you teach chicken to export shape-keys.

guys, I was responding to the OP and talking about Maya. I know nothing about Shape Keys in Blender.

I see.

Thank you very much for the information shared and provided.

If you wanted to allow shape of a face to be customized in a game - raise lower/eye brows for example - are these methods (morph targets/facial animation) typically used for that or is there another method better suited.

i havent seen many games which allowed that so i cant tell you what’s “typically” used.
i’d say both, morphtargets and bone-based animations can be used to archive it.
so it’s more a matter of what you feel easier to use.

i think POC uses bones which are scaled… dont know for sure but i think i read a post about it here on the forum once.

Sorry for resurrecting this.
But thats currently what I’m having trouble with. Maybe you can reupload it, ThomasEgi?