Hi Joshua,

First, I recommend using the most recent copy of SmartBody from the trunk/.

Originally, SmartBody was designed to support blend shapes, and later it 
supported bone-driven faces. Because of that, the blend shape mode is the 
default behavior, and you need to pass the -facebone parameter to the 
sbm-fltk.exe executable to get the bone-driven faces to work as expected (or if 
you are running it from the debugger, right click on the project -> Properties 
-> Debugging -> Command Arguments: -facebone). To send commands to SmartBody, 
you can run Window->Command Window  and type into the lower box then press 
enter. Note also that the camera movement commands are like Mayas: 

ALT + Left = Rotate
ALT + Center = Pan
ALT + Right = Dolly

If you are using the SmartBody renderer, from the menu you can choose: 
(View->Character->GPU Deformable Geometry) to see the characters with their 
mesh and textures. The BML command to use is something like:

bml char doctor <face amount="1" au="6" type="facs"/>

(note that the default characters are: doctor, elder, brad, utah. You can 
replace 'doctor' with '*' to perform the same command on all of the characters).

You can use any of the Action Units that are loaded into the character, and you 
can see the list of Action Units by sending the command: 

print face au *

which will give you a list like this:

Action Unit #1: SkMotion "fac_1L_inner_brow_raiser".
Action Unit #2: SkMotion "fac_2L_outer_brow_raiser".
Action Unit #4: SkMotion "fac_4L_brow_lowerer".
Action Unit #5: Left SkMotion "fac_5_upper_lid_raiser".
Action Unit #5: Left SkMotion "fac_5_upper_lid_raiser".
Action Unit #5: Right SkMotion "fac_5_upper_lid_raiser".
Action Unit #6: Left SkMotion "fac_6_cheek_raiser".
Action Unit #6: Left SkMotion "fac_6_cheek_raiser".
Action Unit #6: Right SkMotion "fac_6_cheek_raiser".
Action Unit #7: Left SkMotion "fac_7_lid_tightener".
Action Unit #7: Left SkMotion "fac_7_lid_tightener".
Action Unit #7: Right SkMotion "fac_7_lid_tightener".
Action Unit #9: Left SkMotion "fac_9_nose_wrinkler".
Action Unit #9: Left SkMotion "fac_9_nose_wrinkler".
Action Unit #9: Right SkMotion "fac_9_nose_wrinkler".
Action Unit #10: Left SkMotion "fac_10_upper_lip_raiser".
Action Unit #10: Left SkMotion "fac_10_upper_lip_raiser".
Action Unit #10: Right SkMotion "fac_10_upper_lip_raiser".
Action Unit #12: Left SkMotion "fac_12_lip_corner_puller".
Action Unit #12: Left SkMotion "fac_12_lip_corner_puller".
Action Unit #12: Right SkMotion "fac_12_lip_corner_puller".
Action Unit #15: Left SkMotion "fac_15_lip_corner_depressor".
Action Unit #15: Left SkMotion "fac_15_lip_corner_depressor".
Action Unit #15: Right SkMotion "fac_15_lip_corner_depressor".
Action Unit #20: Left SkMotion "fac_20_lip_stretcher".
Action Unit #20: Left SkMotion "fac_20_lip_stretcher".
Action Unit #20: Right SkMotion "fac_20_lip_stretcher".
Action Unit #23: Left SkMotion "fac_23_lip_tightener".
Action Unit #23: Left SkMotion "fac_23_lip_tightener".
Action Unit #23: Right SkMotion "fac_23_lip_tightener".
Action Unit #25: Left SkMotion "fac_25_lips_part".
Action Unit #25: Left SkMotion "fac_25_lips_part".
Action Unit #25: Right SkMotion "fac_25_lips_part".
Action Unit #26: Left SkMotion "fac_26_jaw_drop".
Action Unit #26: Left SkMotion "fac_26_jaw_drop".
Action Unit #26: Right SkMotion "fac_26_jaw_drop".
Action Unit #27: Left SkMotion "fac_27_mouth_stretch".
Action Unit #27: Left SkMotion "fac_27_mouth_stretch".
Action Unit #27: Right SkMotion "fac_27_mouth_stretch".
Action Unit #38: Left SkMotion "fac_38_nostril_dilator".
Action Unit #38: Left SkMotion "fac_38_nostril_dilator".
Action Unit #38: Right SkMotion "fac_38_nostril_dilator".
Action Unit #39: Left SkMotion "fac_39_nostril_compressor".
Action Unit #39: Left SkMotion "fac_39_nostril_compressor".
Action Unit #39: Right SkMotion "fac_39_nostril_compressor".
Action Unit #45: SkMotion "fac_45L_blink".

Note that this list show you what are the action units that are available (1,2 
, 4, 5, 6, 7, etc.), what sides can be used (left, right or both), and which 
animation file is mapped to this facial motion ("fac_27_mouth_stretch").

So to make the character blink, you can run:

        bml char doctor <face type="facs" au="45" amount="1" />

to activate only one side of the face, you would add a side attribute:

        bml char doctor <face type="facs" au="45" amount="1" side="left"/>

Note that I am missing some textures on the doctor (eyes, mouth) so you might 
want to use Brad or perhaps Utah instead (the facial animations were created 
for Brad so they will work best on him).

Regarding looping animations, you can specify one animation using the 
<animation> command:

        bml char doctor <animation name="fac_15_lip_corner_depressor"/>

The underlying idle motion is played in a loop, and is set using the <body> 
command:

        bml char doctor <body posture="fac_15_lip_corner_depressor"/>

So by doing this, you are technically setting the underlying 'idle loop' to be 
a particular animation (and you could also so this for the facial animations), 
but this is probably not what you want. Choose an idle motion to set the idle 
looping.

        bml char doctor <body posture="HandsAtSide_Motex"/>

You can blend as many facial animations as you want, and I would recommend 
using the Face Viewer (Window->Face Viewer) to play around with them first 
(I've attached a screenshot).

The BML can be combined like this:

        bml char doctor <face type="facs" au="45" amount="1" /><face 
type="facs" au="26" amount=".5" />

and you can even set the timing and the duration of the facial animation like 
this:

bml char doctor <face type="facs" au="45" amount="1" start="0" end="3"/><face 
type="facs" au="26" amount=".5" start="1" end="4"/>

If you want to get a little fancier, you can set the blend-in (ready) and 
blend-out (relax) times like this:

bml char doctor <face type="facs" au="45" amount="1" start="0" ready="1" 
relax="2.5" end="3"/><face type="facs" au="26" amount=".5" start="1" end="4"/>

I'd also recommend that you look at the BML Creator (Window->BML Creator) for 
other BML commands.

Please let me know if this works for you. My team is going to be starting a 
documentation project in the next few weeks - I hope to have a mostly completed 
manual by September.

Regards,

Ari Shapiro

-----Original Message-----
From: Joshua Wong Wei-Ern [mailto:[email protected]] 
Sent: Thursday, July 28, 2011 6:30 AM
To: [email protected]
Subject: [SmartBody-dev] Facial animation problems


Hello,

I'm a graduate student in Singapore trying to use SmartBody to replicate an 
experiment. I've been trying to get Doctor to display facial expressions (eg. 
smile, frown) using the existing animation files found in 
data>sbm-common>common-sk , but so far have had no luck writing any sort of 
sequence file that works. I can call the motion and posture animations, but 
whenever it comes to the face, he stays blank.

I've looked at previous emails in the archives, and tried some of the options 
there... Tried using BML commands typed in directly into the cmd line (eg. 
<face type="FACS" au="4" amount="0.6" />), but it doesn't seem able to 
recognise or parse those BML commands. Tried the method of duplicating the 
keyframe information in the SKM files, similar to viseme_er_1sec, both with and 
without -facebone, with varying intervals of time. None of it seems to work, 
not even the original examples ("viseme_er_1sec" and "viseme_er_10sec"). I read 
also that it may be possible to loop the animation by setting it as a <body 
posture>, but I'm not quite sure where or how to do that.

I would be really grateful if you could tell me what the problem is, or 
preferably show a worked example to display one facial expression so I can 
figure out how to extrapolate others from that. On a slightly different but 
related note, is it possible to blend the different AU animations if I call 
them at the same time in the SEQ file, or do I have to call them one at a time?

Thanks,
Joshua

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Smartbody-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/smartbody-developer

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Smartbody-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/smartbody-developer

Reply via email to