playMaker

Author Topic: Need help with animation [SOLVED]  (Read 8080 times)

BitMorsel

  • Playmaker Newbie
  • *
  • Posts: 6
Need help with animation [SOLVED]
« on: June 04, 2013, 04:31:02 AM »
Note: Im trying to animate with Playmaker, not mechanim.  I'm just using animation from the mechanim tutorial.


I have been trying to control an animation attached to a character using Playmaker with no success. In order to get the animation to work at all, I needed to set up the Animation Component...no problem. But then there is the Animator Component which is required by the Animation Component and i did not see it covered in the this tutorial. 


It seems to me that the Animator Component is new, and in order to make it work you have to create an animation controller (a different FSM) with Unity.  I was able to get the animation to work with the native animation controller, but I am unable to call the animation with the Playmaker FSM.

When I run my game, I get this error...

Robot : FSM : Idle : PlayAnimation : Missing animation: Idle
UnityEngine.Debug:LogWarning(Object)

...even though the animations are attached to the game object.



Any guidance would be greatly appreciated.  :)
« Last Edit: June 05, 2013, 07:48:11 PM by BitMorsel »
Follow me @Bitmorsel

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Need help with animation.
« Reply #1 on: June 04, 2013, 06:18:37 AM »
Hi,

 Is your animation a regular anim from a fbx file, or an "animator" animation? I am not sure what is your actual set up here.


bye,

 Jean

BitMorsel

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Need help with animation.
« Reply #2 on: June 04, 2013, 03:30:05 PM »
Hi,

 Is your animation a regular anim from a fbx file, or an "animator" animation? I am not sure what is your actual set up here.


bye,

 Jean

The model that I am using is an FBX file that I exported from mixamo and the applied other animations to it using the Animation/Animator Components. 

I auto-rigged my character in mixamo and then took animations from the Mecanim Animation tutorial, the project folder is linked below the video if you care to look at it.

Playmaker doesnt seem to recognize these animations, or i can't call them.  But when using the Animator Component properly, you must assign it an Animation Controller.

The animation controller must be created from your Project folder, and is very similar to using playmaker (i believe it is also an FSM).  You place your animations on a grid and link them with transitions and can create blend trees, etc.

I don't want to do all that.  I just want to call two different animations with Playmaker, but they just dont seem to recognize it.  The only way i've been able to get the character to perform the animation is when the Animation Controller is in place.
« Last Edit: June 04, 2013, 04:10:48 PM by BitMorsel »
Follow me @Bitmorsel

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Need help with animation.
« Reply #3 on: June 04, 2013, 04:12:17 PM »
Well, not sure exactly how you have things set up so i'm taking shots in the dark here... though, if you can attach some screenshots of the rig and animation tabs that can give us a good idea of what is going on.

first thing that i'd like to know, however, is whether the rigging information for the FBX file is set as humanoid... as far as i understand, Mecanim is primarily meant to be used with characters that have a bone set up much like humans do (which also means you can use it for quadrupedal characters like dogs, mecha, etc... as long as the bone heirarchy is something that mecanim can understand.)

but yeah, screenshots would certainly help us diagnose what's going on here.

BitMorsel

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Need help with animation.
« Reply #4 on: June 04, 2013, 05:05:30 PM »
but yeah, screenshots would certainly help us diagnose what's going on here.


As you can see, i didn't import any animations but the rig is setup properly.  I added animations from a different source.  The animations work, just not with playmaker.

Follow me @Bitmorsel

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Need help with animation.
« Reply #5 on: June 05, 2013, 01:17:33 AM »
Hi,

 Mecanim is supported on the Wiki, that's maybe the confusion here.

Simply get it here:
https://hutonggames.fogbugz.com/default.asp?W1031

You'll have also demos so that you can make sure this is actually what you need.

 You can't control Mecanim using standard playmaker actions, you need this special set.

bye,

 Jean

BitMorsel

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Need help with animation.
« Reply #6 on: June 05, 2013, 02:14:21 AM »
Thanks for pointing that out for me Jean.  I was actually just trying to bypass Mechanim altogether, and access the animation through Playmaker. 

 I guess the question I should have asked would be "is animation in unity dependent on using mechanim?"

I didnt see mechanim covered in the Playmaker tutorials I've watched.  So I was guessing that Mechanim was something that was recently added to Unity in an update.  It now seemed that animation didnt work the same way it did in the playmaker tutorials, this is where I became confused. 

So I just want to be clear.  Is it required to use mechanim to animate with playmaker?  Or is it because I'm using a specific animation setup that I need to do it this way?

EDIT: I just tried the demo scenes in that Mechanic/Playmaker add-on and get this error.

''Assets/PlayMaker Custom Actions/Animator/DoLocomotion.cs(27,27): error CS0246: The type or namespace name `Locomotion' could not be found. Are you missing a using directive or an assembly reference?''

I tried adding the locomotion package to the project, but that did nothing to solve this problem.  Not sure what 'Locomotion' its refering to.
« Last Edit: June 05, 2013, 02:55:17 AM by BitMorsel »
Follow me @Bitmorsel

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Need help with animation.
« Reply #7 on: June 05, 2013, 05:37:46 AM »
Hi,

 You need to import the mecanim demo package for the demos to work, it relies on it, it's on the wiki page.

https://hutonggames.fogbugz.com/default.asp?W1031

the actualy link is the following:

http://u3d.as/content/unity-technologies/mecanim-example-scenes/3Bs

bye,

 Jean

BitMorsel

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Need help with animation.
« Reply #8 on: June 05, 2013, 02:07:06 PM »
Thanks again for the help Jean.  Guess I just need to open my eyes a little more, heh.   ::)

Still curious if this is all necessary or if I can animate with Playmaker without using Mecanim.

« Last Edit: June 05, 2013, 02:57:49 PM by BitMorsel »
Follow me @Bitmorsel

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Need help with animation [SOLVED]
« Reply #9 on: June 06, 2013, 01:08:34 AM »
Hi,

 Yes, but only the old animation system,with regular fbx anims.

bye,

 Jean

D12Duke

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Need help with animation [SOLVED]
« Reply #10 on: February 27, 2016, 08:39:53 AM »
Well, I don't believe this was actually solved.  I am having the same issue with my .fbx animations and getting them to play with PlayMaker.  It's simply not calling the animation.

Edit:  For anyone else reading this :::

Create your character in Fuse / 3ds max etc.  Take the FBX file you created (the one in T-Pose) and import it into Unity and drag the 'object name' file at the bottom onto the T-Pose Character (it will look like 9 blocks).

Import the animation from Mixamo and expand it.  Drop the Mixamo.com file onto the T-Pose (first file) model and as the post above suggested, THEN change it to legacy.

Do it in that order or PM can't see it in the FSM action state Animation component.
« Last Edit: February 27, 2016, 08:58:17 AM by D12Duke »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Need help with animation [SOLVED]
« Reply #11 on: March 30, 2016, 07:05:20 AM »
Hi,

 Thanks for the confirmation on the steps to undertake. In general the key is to understand the legacy vs animator animation differences, that's way I marked this thread solved.

Bye,

 Jean