Title: Data File Formats
Author: Gedalia Pasternak
Created: Nov 7, 2K
Last modified: December 12, 2K
To do: add params for cheek

File Formats

Description File

This file is not actually intrinsic to the facial animation code however it is used it init the actor a wrapper class for the facial animation system.

face-data/gedalia2/gedalia.msh          //Mesh file
face-data/gedalia2/gedtags2.dat        //tagged file
face-data/gedalia2/gedmuscle.dat     //Muscle file
face-data/expressions.dat                //expression library,  usually shared by all the actors
face-data/keyframes.dat                  //compound expression library, usually shared by all the actors

Muscle Data

<number of muscles>
<string> Type of muscle "linear", "cheek", "limited", "eye"
<name> (in quotes)
List of params:

Params:
"linear" and "forehead" "limited" "circular" and "eye" "cheek"  
<point>  // bone
<point>
// skin
float //start
float //end
float //angle
float //clamp
<point> //bone
<point> //skin
float
   //start
float   //end
float  //angle
float   //clamp
float   //pathlen
float   //x falloff
<point> //center
<point> //scale
int  //orientation  (1,2,3)
float // x factor
float // y factor
float // z factor
<point>  // bone
<point>
// skin
float  
float 
float 
float  
 


list of <channel Name> <channel value> where channel Name is the Name of a muscle or an additional channel that has been defined in the code
"<e>" to end the list and the expression.

Tagged Data

#lefteyelid unweighted   // name of list and type, type can be weighted or unweighted   
 int                                //number of verts in list
list of verts (with or without quotes)


#righteyelid same as above


#Jaw weighted
293                //number of verts
list of verts and wieghts:
0                   //vert number
0.2               //weight of vertex

Expression files

<number of expressions>
<name of expression>
list of <channel Name> <channel value> where channel Name is the Name of a muscle or an additional channel that has been defined in the code
"<e>" to end the list and the expression.

Keyframe Data

<number of compound primitives>
<name of  compound primitives>
list of keyframes 
<e> to end the list and the compound primitive.

A key frame list consists of the name of one or more primitives followed by  optional time parameter and a ';' if there is no time param it is assumed that the transition to the primitive takes one second.

Examples work a lot better:

yes
bendforward ;    //take one second to bend forward
Neutral ;            //take one second to go back to nutral
bendforward ;    //do it again
Neutral ;        
<e>

laugh
bendforward Smile openmouth .5 Left_Blink .5 Right_Blink ; 
// this means add the values of bendforward, smile, open mouth  and 1/2 left and right blink
<e>

The system also supports animating the channel information via the scripting language. 
So you could do the following:

muscle_twitch
1.0 Left_Zygomatic_Major <t> .1 ;  //take one tenth of a second to contract the LZM muscle to a value of 1.
0.2 Left_Zygomatic_Major <t> .1 ;  //take one tenth of a second to relax  the  LZM muscle to a value of .2
1.0 Left_Zygomatic_Major <t> .1 ;  //do it again
0.2 Left_Zygomatic_Major <t> .1 ;


File sizes

Shared resources
     Expression file
- 41+ expressions       < 10K uncompressed          1K compressed
     Compound expressions library          < 2K uncompressed           .5K

Unique resources for each model
     Tagged points + Muscle data 
< 10 K
     Mesh file 100K> Could be improved with a progressive mesh format.
     Texture maps size of BMP texture maps