playMaker

Author Topic: Combining animation data?[SOLVED]  (Read 19069 times)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Combining animation data?
« Reply #30 on: January 01, 2013, 08:33:15 AM »
Hi,

 haven't looked at your package yet, but can you double check this:

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

 this might answer your problem actually, it basically is an example on how to combine and blend several animations at the same time ( like firing and running).

bye

Jean

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Combining animation data?
« Reply #31 on: January 01, 2013, 10:29:01 PM »
I've taken a look at that, tried to apply it to my scene... and it still isn't taking.

it's something to do with the layers... is there some sort of naming conventions i should be avoiding such as underscores or dashes?

i even went so far as to drop a new asset in with only a handful of bones in there and just added that to it and THAT worked... but i can't figure out why my other asset is not blending.

and i even went and rearranged the system so there were no non-bone objects in the animation stack.

i;m going bald here.

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Combining animation data?
« Reply #32 on: January 01, 2013, 10:31:05 PM »
I also completely reworked the system so that the "play animation" fires and then carries on to an idle "waiting" action." also, i tried just dropping the following actions.

add animation clip
set animation layer
add mixing transform

in the same order as the test object.

what the heck have i done wrong that it's completely ignoring the layers?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Combining animation data?
« Reply #33 on: January 02, 2013, 06:04:04 AM »
uhm... get back to me at the end of the week, I'll have a look.

bye,

 Jean

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Combining animation data?
« Reply #34 on: January 02, 2013, 10:54:36 AM »
I think i may be on to why this is happening...

i've been doing some tests and taking it one step at a time... also, redid the entire rigging (managed to find a way to save the animation data but that was because i created an identical set of bones and just constrained them positionally and rotationally to the old rig... then extracted the position and rotation data and reapplied it on a new layer and then collapsed it back after deleting the old rig... this was hairy and i'm still not certain that i'm typing the process up exactly)

but, i think when it comes to handling animations, only one layer is allowed to be set to a particular animation sequence, regardless as to how you've told it to behave (such as only animate the upper torso, lower torso, etc.)

going to do some more testing to confirm this and to figure out more about it... but, if it is confirmed that only one layer per animation set, i wonder if there are any resources that state this that i (and maybe another person) may be overlooking or if it's just not stated, it ought to be.... still testing to confirm though.


NOTE and UPDATE... yes, i have confirmed that even if a FSM is trying to access a layer itself, the animation data can only hold one layer value across the entire game as far as i have been able to figure.  next step will be to take the animations i want to give two separate layers to is to just add in additional animations in the animator in the inspector and just tell it to use it separately... i'll update to see if that has resolved the issue.
« Last Edit: January 02, 2013, 11:27:33 AM by Red »

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Combining animation data?
« Reply #35 on: January 02, 2013, 12:43:23 PM »
Yes, it is confirmed... one animation layer per named animation.

now all i have to do is figure out a way to synchronize them up (so that the frame that the animation is on in the run/walk/idle movement animation controller is the same frame as the run/walk/idle weapon anomation controller.)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Combining animation data?
« Reply #36 on: January 02, 2013, 02:35:10 PM »
Hi,

 Nice debugging session I can see.

 Is it a Unity restriction or a Playmaker restriction?

bye,

 Jean

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Combining animation data?
« Reply #37 on: January 03, 2013, 09:44:21 AM »
Hi,

 Nice debugging session I can see.

 Is it a Unity restriction or a Playmaker restriction?

bye,

 Jean



That i don't know (the restriction) so i've asked around to see if this is a Unity specific thing, a game-dev specific thing (which i don't think is likely since you can code any behavior if you're not restricted by an engine's limitations) or a playmaker thing. if it's a playmaker thing, i can't see it being problematic as i'm trying to see about finding a way of reusing animation clips but just changing the name that they've had applied to them, but i don't know if that will overwrite the clip's "name" or if it will just say "this is a new variable that happens to access this same animation clip."

and as for the timing, i figured that one out and it was a blonde-moment on my part... one of the animation clips i was declaring was the wrong one... so, when he was idling, his shoulders swayed from side to side... and it was a timing thing, it was that i accidentally declared the "holding gun while idle" animation as "running with the gun" animation. as things stand, i've managed to get the animation layer system working... it was tricky but it's done as well as getting other FSMs to fire off events to play particular animations. (*which is something i've recently learned... it doesn't have to be a global event for another fsm to fire off an event in the first system... i'm not sure if it throws errors if the system it's in doesn't have the appropriate event in the list of events to use... and i have no idea how to test that... but so far the system that i've been working on has worked.

i'll see about posting a screencast about it so others that might be having issues will understand how to deal with it... but, i want to make sure i have all the facts first before i leap into that.

Other than that, thank you for the link. i don't think i would have figured this out without those assets to pick apart.
« Last Edit: January 03, 2013, 09:52:36 AM by Red »

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
Re: Combining animation data?
« Reply #38 on: July 01, 2013, 07:18:33 AM »
Hey guys - I realise this topic is quite dead, but I just wanted to say that i followed Artician's suggested method of using mixing transform, and it worked like a charm for me :) thanks alot for explaining so well and adding the screenshots :) Just leaving this here in case anyone (like me) is searching for this and stumble across this thread - It still works! (july 2013)

Thanks :)
Remember, you don't fail unless you give up trying to succeed!