wiki:BodyAndFaceEmbodiment

BodyAndFaceEmbodiment

The FaceEngine and AnimationEngine expect an Embodiment that implements the FaceEmbodiment? or SkeletonEmbodiment? respectively. Several implementations exists, allowing one to flexibly hook up AsapRealizer to any such Embodiments.

HmiRenderEmbodiment

Provides a SkeletonEmbodiment? and FaceEmbodiment? that is directly linked to a virtual character that is to be placed in a HmiRenderEnvironment?.

Example loader:

<Loader id="graphicalembodiment1" loader="hmi.renderenvironment.HmiRenderEmbodimentLoader">
    <EmbodimentSettings embodimentId="graphicalembodiment1"/>
    <Body postprocessing="ARMANDIA" 
          texturedir="Humanoids/armandia/maps" 
          resourcedir="Humanoids/armandia/bin"
          filename="armandia_boring_neckfix_light_toplevel.bin"/> 
    <PermanentMorphs>
        <PermanentMorph target="Body_NG-mesh-morpher-Body_chest_L-0" amount="4.0"/>
        <PermanentMorph target="Pull_A_-mesh-morpher-_pull01_morph_NG-0" amount="1.7"/> 
        <PermanentMorph target="Body_NG-mesh-morpher-Face02-18" amount="1"/>
    </PermanentMorphs>
    <Face>
        <FapDeform filename="Humanoids/armandia/mpeg4faps/armandia.xml" facemesh="Body_NG-mesh-1"/> <!-- Hmi graphics specific: the mapping from FAPs to mesh. -->
        <FaceExpressionMorphTargets>      <!-- the morph targets that are available for face expressions -->
            <Target name="Body_NG-mesh-morpher-A-2"/>
            <Target name="Body_NG-mesh-morpher-E-5"/>
            <Target name="Body_NG-mesh-morpher-I-6"/>
            <Target name="Body_NG-mesh-morpher-U-4"/>
            <Target name="Body_NG-mesh-morpher-O-3"/>
            <Target name="Body_NG-mesh-morpher-P_B-8"/>
            <Target name="Body_NG-mesh-morpher-Hum-19"/>
            <Target name="Body_NG-mesh-morpher-Wink-20"/>
            <Target name="Body_NG-mesh-morpher-yeux_NG01-1"/>
            <Target name="Body_NG-mesh-morpher-F-7"/>
            <Target name="Body_NG-mesh-morpher-Smile01-9"/>
            <Target name="Body_NG-mesh-morpher-Pff-10"/>
            <Target name="Body_NG-mesh-morpher-T_severe-11"/>
            <Target name="Body_NG-mesh-morpher-T_severe02-12"/>
            <Target name="Body_NG-mesh-morpher-T_dent-13"/>
            <Target name="Body_NG-mesh-morpher-T_trist-14"/>
            <Target name="Body_NG-mesh-morpher-T_trist02-15"/>
            <Target name="Body_NG-mesh-morpher-HAA-16"/>
        </FaceExpressionMorphTargets>
    </Face>
  </Loader>

IpaacaFaceAndBodyEmbodiment

Provides a SkeletonEmbodiment? and FaceEmbodiment? through Ipaaca (e.g. to steer Billie in Ogre).

Example loader:

  <Loader id="ipaacaembodiment" loader="asap.ipaacaembodiments.loader.IpaacaEmbodimentLoader"/>


  <Loader id="bodyfaceembodiment" requiredloaders="ipaacaembodiment" loader="asap.ipaacaembodiments.loader.IpaacaFaceAndBodyEmbodimentLoader">
    <renaming morphRenamingFile="Humanoids/billie/renaming/billiemorphsrenaming.xml"/>
  </Loader>

BodyAndFaceSpreadEmbodiment

Provides an SkeletonEmbodiment? and FaceEmbodiment? that steers multiple other embodiments simultaneously. This can for example be used to steer several humanoids with the same animation data in HmiRenderEnvironment?, but show only one of them at a time (cycle between different embodiments, use HmiRenderEnvironment?.setHumanoidVisible("humanoidId", true/false) to show/hide a humanoid).

Example loader:

<Loader id="graphicalembodiment" loader="hmi.environment.bodyandfaceembodiments.loader.BodyAndFaceSpreadEmbodimentLoader" requiredloaders="graphicalembodiment1,graphicalembodiment2"/>

BodyAndFaceSwitchEmbodiment

The BodyAndFaceSwitchEmbodiment creates multiple inputs that can be switched between for a single output embodiment. This is useful when for example one wants to switch between steering the body with BML through AsapRealizer and steering it with the MURMLKeyframeEditor. The !InputSwitchEmbodimentSwingUI provides a Swing userinterface element to control the switch.

Example loader:

 <Loader id="switchpanelembodiment" loader="hmi.jcomponentenvironment.loader.JComponentEmbodimentLoader">
    <JComponent id="panel2"/>             
 </Loader>
 <Loader id="switchembodiment" loader="hmi.environment.bodyandfaceembodiments.loader.BodyAndFaceSwitchEmbodimentLoader" requiredloaders="bodyfaceembodiment">
    <Inputs ids="realizerembodiment,kfeditorembodiment"/>    
  </Loader>

 <Loader id="switchiu" loader="hmi.jcomponentenvironment.loader.InputSwitchEmbodimentSwingUILoader" requiredloaders="switchpanelembodiment,switchembodiment"/>

Discussion

Reply here to give additional information or ask questions.

Attachments