Animations(2)

Today I finished the animations (part 1) for Kleiner, Gman and Evil.

I have no idea when to expect the rest…. (*SIGH*)

Let me give you an example of how an animation file works:

// Comments will show up as this!
actor “Kleiner” //actor name
{
  channel “audio” // audio channel
  {
    event speak “speech” //the event speech begins here
    {
      time 0.293333 2.708208 // begin and end time of the event
      param “st\kleiner\20 kill us.wav” //what file it has to play
      fixedlength //the length is fixed, otherwise you’ll get messed up speech
      cctype “cc_master” //no idea what this is XD
      cctoken “” //Same here… lol
    }
  }
  channel “lookat” //look at channel
  {
    event lookat “lookat” //the event lookat starts here
    {
      time 0.006667 3.266667 //begin and end time
      param “!player” //Parameter !player means that the actor has to look at the player
    }
  }
  channel “animation” //the animation channel
  {
    event gesture “glasses” //the event which I gave the name glasses
    {
      time 0.966667 3.266667 //begin and end time
      param “kgesture11” //the specific animation
      absolutetags playback_time //define certain points in the animation
      {
        “apex” 0.147059 //define the apex time
        “accent” 0.338235 //define the accent time
        “loop” 0.411765 //define the loop time
        “end” 0.588235 // define the ending time (actor goes to begin position)
      }
      absolutetags shifted_time //if you have changed the tag position these will change
      {
        “apex” 0.147059
        “accent” 0.338235
        “loop” 0.411765
        “end” 0.588235
      }
    }
  }
  channel “face” //channel face
  {
    event flexanimation “flex” //begin of flexanimation with name flex
    {
      time 0.000000 3.266667 //total time
      param “” //parameters
      flexanimations samples_use_time //means that its going to define times
      {
        “head_rightleft” range 30.0 -30.0  //indicates what is moving and in what range
        {
          1.6933 0.6600 //define the end time and begintime
        }
        “head_tilt” range 15.0 -15.0
        {
          1.6933 0.0000 //define the end and begintime
        }
        “head_forwardback” range 0.2 -0.2
        {
          1.6933 0.0000
        }
      }
    }
  }
}

scalesettings //these settings are used by faceposer(are ignored in-game)
{
  “CChoreoView” “100” //choreography maker scale
  “SceneRampTool” “100” //scene ramp tool scale
  “RampTool” “100” //ramp tool scale
  “ExpressionTool” “100” //expression tool scale
  “GestureTool” “100” //gesture tool scale
}
fps 60 //how many FPS to display in the 3D window
snap off //means that the snap option is off (no idea what use it has…)

Of course I’m not making text files all the time, I use Faceposer to create the choreography and then, once I save it, faceposer converts it to the code you see above. The game then loads it in once I give the NPC the command to play this animation. And based on the values the game engine extrapolates how the NPC should move.

To make an NPC do an animation you’ll need the console. First spawn an NPC, then while pointing at it type the following in the console ent_setname NAME  Now, still pointing at the NPC type ent_fire NAME setexpressionoverride scenes/NAMEOFYORSCENE.vcd Now the NPC plays the animation in a continuous loop, when filming you’d have to cut the right part out.

Advertisements

2 responses to “Animations(2)

  1. hi I was fortunate to find your subject in google
    your post is superb
    I get much in your blog really thank your very much
    btw the theme of you site is really exceptional
    where can find it

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s