playMaker

Author Topic: Mixamo/general animating  (Read 1854 times)

iron-hands

  • Playmaker Newbie
  • *
  • Posts: 5
    • View Profile
Mixamo/general animating
« on: November 03, 2014, 09:42:26 AM »
Hello all.

New to Playmaker, had a question regarding animations.

First, is there a tutorial available on setting up a controlled/animated character through Playmaker anywhere?

Second, in my first attempt, I was eventually able to setup a basic animation change, but I had to import the animations and model as legacy instead of humanoid.  I'm wondering if this will impact my production, as Mixamo shows humanoid as being much more advantageous in the long run (particularly when it comes to swapping out test models for finished).

cmonroy

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
Re: Mixamo/general animating
« Reply #1 on: November 03, 2014, 11:33:03 AM »
Mecanim animations are controlled via an animator controller using values to determine which animation to play when. Playmaker provides some custom actions to manipulate those values directly. For instance, if you have your animator controlling the motion of your character using two variables: speed and direction, Playmaker can put values into those variables. It quite simple once you have your animator FSM ready.

There is a tutorial scene at https://hutonggames.fogbugz.com/?W1031 for checking how to do this.

Humanoid animations are supposed to be retargetable and as such, they have several adavantages over legacy ones. But having the ability to mix and match animations between your characters can also give you a few headaches... For instance, a basic walk cycle can look awesome in a male character but quite wrong in a female one...

iron-hands

  • Playmaker Newbie
  • *
  • Posts: 5
    • View Profile
Re: Mixamo/general animating
« Reply #2 on: November 03, 2014, 12:48:56 PM »
So basically, just leave the animating to mecanim, and handle the movement (to trigger the mecanim state event) from playmaker?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: Mixamo/general animating
« Reply #3 on: November 03, 2014, 01:07:44 PM »
Basically, yeah.

Setup some conditions of bools, events, floats, etc.. and just reflect those from your FSMs into the Animator and Mecanim will fire the events like you set them up. It handles the blending of the animations.

iron-hands

  • Playmaker Newbie
  • *
  • Posts: 5
    • View Profile
Re: Mixamo/general animating
« Reply #4 on: November 04, 2014, 02:28:26 PM »
Thanks.  Had it going (relatively) quickly last night.  The main problems I was having were twofold - the first, I was expecting that Playmaker would display a list of the available variables in the "Set Animation Int" type actions in a dropbox.  Worked fine when I typed it all in manually.

The second, I had a heck of a time trying to work out the target, basically the "From Owner" versus specifying one directly.  It seems to be a little tempermental, and I had the same issue a quick follow camera.  Likely just issues with where the FSM and/or GameObject is attached in the hierarchy in relation to the model, right?

cmonroy

  • Playmaker Newbie
  • *
  • Posts: 34
    • View Profile
Re: Mixamo/general animating
« Reply #5 on: November 04, 2014, 06:21:47 PM »
Create a gameObject variable in your FSM, then use the FindGameObject with the tag "Player" to set the value of your variable. You can do the same with the camera.

Best practice would be to create an empty game object and attach all your FSM's there. Parent the character mesh procedurally to the game object. That way, you only have to remember to change the tag of your character and add the rigid body and collider (character controller, for instance) to the character. Your game object takes care of the rest.

iron-hands

  • Playmaker Newbie
  • *
  • Posts: 5
    • View Profile
Re: Mixamo/general animating
« Reply #6 on: November 04, 2014, 06:28:17 PM »
yupyup, it's all sorted as far as i can tell, now it's on to figuring out the root motion... as I understand I can't use "controller move" to handle it, since the animation motion triggers the detection, i need to scale it back to actually detect keypresses.  thats the big thing now, thanks everyone for the assistance!