wiki:FaceEngine

Version 21 (modified by welberge, 7 years ago) (diff)

--

FaceEngine

AsapRealizer's default FaceEngine provides flexible support for morph based and/or MPEG4 facial animation.

XML setup

AsapRealizer's default FaceEngine is setup through the FaceEngineLoader xml description.

Typical setup:

<Loader id="faceembodiment">
..
</Loader>
<Loader id="faceengine" 
          loader="asap.faceengine.loader.FaceEngineLoader" requiredloaders="faceembodiment">
    <FaceBinding basedir="" resources="Humanoids/billie/facebinding/" filename="facebinding.xml"/>
</Loader>

The FaceEngine requires a FaceEmbodiment? and a facebinding.

The facebinding

The facebinding is an XML file describing the Binding between BML face behaviors and the motor units that execute them.

Binding a Morph motor plan unit

Example:

<FaceUnitSpec type="faceLexeme">
   <constraints>
     <constraint name="lexeme" value="smilemouth"/>
   </constraints>
   <parametermap>
     <parameter src="amount" dst="intensity"/>
   </parametermap>
   <parameterdefaults>
      <parameterdefault name="intensity" value="1"/>
      <parameterdefault name="targetname" value="KevinHead.mesh-Smile"/>
    </parameterdefaults>
  <FaceUnit type="Morph"/>
</FaceUnitSpec> 

Here, the obligatory

<parametermap>
  <parameter src="amount" dst="intensity"/>
</parametermap>

maps the BML faceLexeme amount parameter directly to the intensity (=blend value) of the bound morphs. The obligatory targetname specifies a comma separated lists of morph targets that are used to achieve this specific BML behavior.

Binding a AU motor plan unit

AU motor plan units have an intensity, au (=au nummer) and side (LEFT, RIGHT, BOTH, NONE(for AUs that don't have a side)) parameter that needs to be set/bound.

Binding all faceFacs behaviors to their corresponding AU motor unit:

<FaceUnitSpec type="faceFacs" namespace="http://www.bml-initiative.org/bml/coreextensions-1.0">
  <constraints/>
  <parametermap>
    <parameter src="amount" dst="intensity"/>
    <parameter src="au" dst="au"/>
    <parameter src="side" dst="side"/>
  </parametermap>
  <FaceUnit type="AU"/>
</FaceUnitSpec>

Binding the faceLexeme "RAISE_LEFT_BROW" to an AU motor unit:

<FaceUnitSpec type="faceLexeme">
  <constraints>
    <constraint name="lexeme" value="RAISE_LEFT_BROW"/>
  </constraints>
  <parametermap>
    <parameter src="amount" dst="intensity"/>
  </parametermap>
  <parameterdefaults>			
    <parameterdefault name="au" value="1"/>
    <parameterdefault name="side" value="LEFT"/>
  </parameterdefaults>
  <FaceUnit type="AU"/>
</FaceUnitSpec>

Binding a configuration of multiple AUs

The FACS motor unit specifies a configuration of AUs, specified by the filename of this configuration and an intensity. The intensity scales the values specified in the FACSConfiguration.

<FaceUnitSpec type="faceLexeme">
  <constraints>			
    <constraint name="lexeme" value="expectingbrows"/>
  </constraints>
  <parametermap>
    <parameter src="amount" dst="intensity"/>
  </parametermap>
  <parameterdefaults>
    <parameterdefault name="intensity" value="1"/>
  </parameterdefaults>
  <FaceUnit type="FACS" filename="Humanoids/shared/faceexpressions/expectingbrows.xml"/>
</FaceUnitSpec>

expectingbrows.xml:

<FACSConfiguration>
   <AU number="1" side="LEFT" value="0.38"/>
   <AU number="1" side="RIGHT" value="0.35"/>
</FACSConfiguration> 

Binding a Plutchik-based emotional expression

requires one to set/bound an intensity, angle and activation parameter (the latter two are coordinates on Plutchik's wheel).

<FaceUnitSpec type="faceLexeme">
  <constraints>			
    <constraint name="lexeme" value="surprise"/>
  </constraints>
  <parametermap>
    <parameter src="amount" dst="intensity"/>
  </parametermap>
  <parameterdefaults>
    <parameterdefault name="angle" value="90"/>
    <parameterdefault name="activation" value="3.6"/>
  </parameterdefaults>
  <FaceUnit type="Plutchik"/>
</FaceUnitSpec>