playMaker

Author Topic: Mixing Transform and Anim Blending[SOLVED]  (Read 9213 times)

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Mixing Transform and Anim Blending[SOLVED]
« on: May 20, 2012, 01:46:12 AM »
I have a character with a run animation and a swing animation, and I need to blend them to animate simultaneously.  The swing animation only has keyframes on the waist up, making it an easy candidate to give priority to that portion of the skeleton while it plays.  

I assume I need to add a Mixing Transform, but the Mixing Transform doesn't seem to do anything when added to the state that plays the animations.  I've tried using it in combination with Set Weight, Blend and other animation actions, but there's very little feedback given.  There are quite a few errors I could see being the potential cause, but I've so far been unsuccessful at finding a solution.  

Has anyone had any experience blending animations via PlayMaker?

« Last Edit: October 22, 2012, 03:24:57 AM by jeanfabre »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Mixing Transform and Anim Blending
« Reply #1 on: May 20, 2012, 09:42:20 PM »
The Add Mixing Transform just wraps the Unity command:
http://unity3d.com/support/documentation/ScriptReference/AnimationState.AddMixingTransform

I'll do some tests to make sure it works, but maybe the doc above will help...

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: Mixing Transform and Anim Blending
« Reply #2 on: May 20, 2012, 11:13:26 PM »
Thanks Alex.  I mainly wanted a second opinion on if it were working, and if anyone had used it could hopefully tell me where I went wrong. 

Also, a typo in the Add Mixing Transform action in the State Action Editor tab: "Transfrom".

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: Mixing Transform and Anim Blending
« Reply #3 on: May 30, 2012, 01:40:07 PM »
I was able to find success with this action finally, though only partially.  I was hoping not to bother you with it again, but maybe you could parse this error for me?  This displays every time a scene is played, when the FSM using the addMixingTransform action is present:

NullReferenceException
HutongGames.PlayMaker.Actions.AddMixingTransform.DoAddMixingTransform () (at Assets/PlayMaker/Actions/AddMixingTransform.cs:58)
HutongGames.PlayMaker.Actions.AddMixingTransform.OnEnter () (at Assets/PlayMaker/Actions/AddMixingTransform.cs:37)
HutongGames.PlayMaker.FsmState.OnEnter ()
HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState)
HutongGames.PlayMaker.Fsm.DoTransition (HutongGames.PlayMaker.FsmTransition transition, Boolean isGlobal)
HutongGames.PlayMaker.Fsm.ChangeState (HutongGames.PlayMaker.FsmEvent fsmEvent)
HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEventTarget eventTarget, HutongGames.PlayMaker.FsmEvent fsmEvent)
HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEvent fsmEvent)
HutongGames.PlayMaker.Actions.GetButtonUp.OnUpdate () (at Assets/PlayMaker/Actions/GetButtonUp.cs:29)
HutongGames.PlayMaker.FsmState.OnUpdate ()
HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state)
HutongGames.PlayMaker.Fsm.Update ()
PlayMakerFSM.Update ()

It says NullReferenceException, but there are no invalid or empty parameters in my setup. 

Thanks for any advice you can offer.

iPetProjectDev

  • Playmaker Newbie
  • *
  • Posts: 23
Re: Mixing Transform and Anim Blending
« Reply #4 on: June 10, 2012, 12:32:34 AM »
That is what I checked in to find out about when I added an AddMixingTransform action. I have tried every hierarchy in case it pointed at the wrong one and get the same message as above twice and four repeats of an InvalidOperationException. I usually use a Transform var and drop the joint in that and reference that way as I ain't had no luck with the String method either. if the Transform is buried nine deep in a joint hierarchy the String method gets unwieldy and hard to manage.

SeanC

  • Junior Playmaker
  • **
  • Posts: 61
Re: Mixing Transform and Anim Blending
« Reply #5 on: June 26, 2012, 10:17:08 PM »
Hey Artician,

Im also messing with trying to get addMixingTransform to work. Were you able to get success with this? Currently, when the state triggers containing the action, nothing happens. The FSM is playing correctly, but my anim is not showing up. I double checked to make sure the anim is working properly by swapping in a play animation action and all was well.

Curious if you came across some method that got you moving in the right direction.

Sean

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: Mixing Transform and Anim Blending
« Reply #6 on: June 27, 2012, 03:43:38 AM »
Hey there SeanC,

I am still stuck on this.  I happen to be writing up a lengthy post detailing all my trials and errors using the Mixing Transform and related actions.  I'll probably post it up soon because I'm getting back to this part of my project (left animation alone for a while because this caused me to hit a dead end).

I'll update this thread soon with some troubleshooting details and descriptions of what I've tried, and hopefully we can get to the bottom of this.  It helps to have other people chime in on the topic though!  I hate being the only guy to bug Alex and the community for help.  :)

I'll keep you posted.

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Mixing Transform and Anim Blending
« Reply #7 on: October 18, 2012, 05:41:20 PM »
Hi SeanC
Do you continue with the same problem?
Is this a bug or something?
It´s seems so easy. Can anybody help me on this?
Cheers

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Mixing Transform and Anim Blending
« Reply #8 on: October 19, 2012, 02:56:43 AM »
Hi,

 Have you tried this example, It contains a fully working character rig with complex animation rigg, mixing and blending.

http://hutonggames.com/playmakerforum/index.php?topic=2267.msg10191#msg10191

bye,

 Jean

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Mixing Transform and Anim Blending
« Reply #9 on: October 19, 2012, 07:01:41 PM »
Thank you Jean. :)
I´m studying it, seems a nice example.
Bye