Playmaker Forum

PlayMaker News => General Discussion => Topic started by: jeanfabre on February 18, 2013, 08:06:51 AM

Title: Mecanim support and demo [New February 2014 Version]
Post by: jeanfabre on February 18, 2013, 08:06:51 AM
Hi Everyone,

 At last :) I have ported the whole Mecanim Animator api into a set of custom actions ( each properly documented with online help page like the official set of playmaker actions).

 I have also rebuilded two unity example scenes so far, so you can either download the custom actions or download demos if you want to see it in action to learn. Note that the demo will require the Unity mecanim example scene package.

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

I will port ALL scenes in the end, but I did not wanted to delay any further the release of the custom actions. some will likely evolve over time as I work out all the samples and redo them in playmaker.

Don't hesitate to fire questions and ideas, findings, etc etc.

Enjoy ( it is indeed incredible what Unitydid with this animator system!

 Jean

 
Title: Re: Mecanim support and demo
Post by: mickman on February 18, 2013, 09:03:59 PM
WOW !!!  Awesome Job..  I've been reading all the new animator actions available..  that's an entire library right there..   nice one :)   

I've been setting up a scene based around the  Mecanim NAVMESH  Sample scene... it uses finger tap to move the avatar about...  Sure hope this will make a debut. 

Once again  Top Job Jean,   

     PlayMaker absolutely shines   :)


Title: Re: Mecanim support and demo
Post by: Red on February 19, 2013, 01:32:59 PM
Heheheh, I'm definately going to check it out but it seems that the system that I cobbled together using the legacy system would surely benefit from it.

but hey, being able to use different animations for newer models will surely help my workflow pipeline (since i won't have to animate 9+ different "walk, run" animations (those take me the most time... animating has always been one of my weaker points.)
Title: Re: Mecanim support and demo
Post by: mrbdrm on March 04, 2013, 09:40:14 AM
Great job
much needed.
keep it up
Title: Re: Mecanim support and demo
Post by: jeanfabre on April 08, 2013, 04:56:42 AM
Hi,

 I made a new update of the mecanim support, but I want to get feedback first before I update it on the wiki:

http://hutonggames.com/playmakerforum/index.php?topic=3590.msg16555#msg16555

This package is much more reliable and predictable then the current one, and it features a new demo, where you can move around, jump and say hi ( as you run :) )

bye.

 Jean
Title: Re: Mecanim support and demo
Post by: Maurice on April 08, 2013, 03:04:54 PM
Hello Jean this is much better. Any sign when you have the other demo's ready.

I want to use TeddyBear Bazooka ( IK ) for my game, and the climbing.

Thanx and keep up the good work.
Title: Re: Mecanim support and demo
Post by: jeanfabre on April 09, 2013, 01:32:04 AM
Hi,

 Will work on it this week hopefully.

bye,

 Jean
Title: Re: Mecanim support and demo
Post by: mister d on April 13, 2013, 06:30:58 AM
hy jean ,
i want to see how u use the match target action, i cant seem to get it working
Title: Re: Mecanim support and demo
Post by: jeanfabre on April 15, 2013, 06:50:01 AM
Hi,

 yes, the action should run on everyframe... Please download the latest package from the wiki, I have ported the targetMatch scene into playmaker.

Lots of actions refactoring and bug fixing, so it's a mandatory update anyway :)

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

bye,

 Jean
Title: Re: Mecanim support and demo
Post by: Red on May 05, 2013, 12:48:51 PM
Now i guess i HAVE to update my animation systems.

thank you very much!

Though, one thing that i've not been able to find an answer for so maybe ask here.

the movement system i have... the animated character is nested inside it as a child of the main thing... and it is, technically, not the one moving (though i do have to feed it orientation data, compare that with the direction it's walking/running and calculating a blend to make the legs move properly...) so, i was wondering if the demo files movement systems are tied in more intimately with the mecanim in the demo such that mecanim is working in tandem to control the movement... or if it's only, and i mean only, extracting values and triggering the appropriate animations (and the root object movement script/system is the only thing that handles the movement of the object.)

any thoughts?
Title: Re: Mecanim support and demo
Post by: jeanfabre on May 07, 2013, 01:49:35 AM
Hi,

 you have both possibilities,

If your animations are "in place", then you will have to implement the movement, mecanim will only trigger the animation and since it doesn't move, your character will go nowhere.

in most cases, the actual movement an direction will be handled separatly, that's likely always true for bipeds, but for exotic rigs, you may rely purely on animation own movement and orientation in space to have your character evolve around.

 Does that make sense?

 also, be aware that it's generally driven using physics, so you likely want to always animation in place, and then use the unity physics engine to move your character around to benefit from collisions etc etc.

bye,

 Jean
Title: Re: Mecanim support and demo
Post by: jeanfabre on May 10, 2013, 04:01:55 AM
Hi,

 More demos available for Mecanim, you know have the following to play with:

-- Turn on the spot,
-- IK.
-- target match
-- animation controller
-- Generic skeleton

 Download the packages from the wiki page: https://hutonggames.fogbugz.com/default.asp?W1031

Bye,

 Jean
Title: Re: Mecanim support and demo
Post by: andreasng on October 08, 2013, 03:27:45 AM
Hey

I've been very happy with the playmaker "play animation" for testing out the things I make before I hand over the animations to our coders. Now that I've switched to mecanim it seems that that is not possible any longer.
Thrilled to find that there actually is playmaker support for mecanim. However in the package I only see gets and sets, and nothing that has the ability to "play animation". I'm especially happy with the "play random anim" and the "play anim" for legacy.
Does playmaker support superficially playing animations through mecanim without the "fuzz"?
Title: Re: Mecanim support and demo
Post by: jeanfabre on October 08, 2013, 06:43:21 AM
Hi,

 I am not sure it's even possible to begin with. If you have a concrete example let me know. Else the likely and only way is to create your mecanim graph, even as simple as it can be.

Bye,

 Jean
Title: Re: Mecanim support and demo
Post by: Blitztron on November 08, 2013, 11:06:41 AM
I'm experimenting a bit with the Teddybear NavMesh Agent. I'm trying to copy the FSMs and use them on a different character.

So I have added the teddybear and my new character to my scene. I then copied over the scripts and duplicated the Locomition animator and renamed it. I've also, of course, changed the navmesh avatar reference in the Agent control FSM.

And it works. Sort of. They both run to the point given by the mouse button. But it seems as the teddybear controls my characters animator. How do I fix this?
Title: Re: Mecanim support and demo
Post by: jeanfabre on November 11, 2013, 01:26:01 AM
Hi,

 It's not your teddybear that controls your character, it's likely that you have both objects reactin to user input, right?

bye,

 Jean
Title: Re: Mecanim support and demo
Post by: Blitztron on November 19, 2013, 05:34:14 AM
Yeah.

But  when the teddybear is removed the new character is stuck in idle forever. Weird.
Title: Re: Mecanim support and demo
Post by: jess84 on November 19, 2013, 07:33:26 AM
I just downloaded this stuff to have a look, from https://hutonggames.fogbugz.com/default.asp?W1031

Using Unity 4.3.

I imported PlayMakerAnimatorActions.unitypackage  first, then PlayMakerAnimatorWithDemos.unitypackage

However I get the following error, so can't do anything:

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?
Title: Re: Mecanim support and demo
Post by: jeanfabre on November 19, 2013, 07:42:53 AM
Hi,

 Have you also downloading the Unity Demo package? it's required, it has all the assets. The link is on the meacnim wiki page, but I added it below for convenience.

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


WARNING: it has yet to be ported to Unity 4.3 as a lot has changed on Mecanim with the latest Unity, so you mae have obsolete warnings and errors here and there, until I properly adjust everything.

Bye,

 Jean
Title: Re: Mecanim support and demo
Post by: elvis75k on December 17, 2013, 07:48:10 PM
any news about 4.3 support? I will love to animate my 2D sprite with Mecanic.
Thanks!

edited: Mecanim Animator is not supported yet (http://hutonggames.com/playmakerforum/index.php?topic=5741.msg27696#msg27696); i hope for some handy actions to work with sprites.
Title: Re: Mecanim support and demo
Post by: funshark on December 18, 2013, 11:43:39 AM
Well, actually, you can't animate anything without mecanim in 4.3, am I wrong?
Title: Re: Mecanim support and demo
Post by: jeanfabre on December 18, 2013, 12:18:23 PM
Hi,

 of course you can, everything you could do before mecanim, you can still do. What makes you think that Mecanim is the only way?

bye,

 Jean
Title: Re: Mecanim support and demo
Post by: Dev_Sebas on December 18, 2013, 01:23:06 PM
Just reporting that GetAnimatorIsControlled action in Unity 4.3.2f1 is obsolete.
Assets/PlayMaker Animator/Actions/GetAnimatorIsControlled.cs(87,56): error CS0619: `UnityEngine.Animator.IsControlled(UnityEngine.Transform)' is obsolete: `use mask and layers to control subset of transfroms in a skeleton'
Title: Re: Mecanim support and demo
Post by: funshark on December 18, 2013, 01:33:19 PM
Hi,

 of course you can, everything you could do before mecanim, you can still do. What makes you think that Mecanim is the only way?

bye,

 Jean

Because when I create an animation in the Animation editor, it creates automatically an "Animator" component and an "event" in the Animator window.
It's not totally what we call mecanim I think, but it's related in a way.
Title: Re: Mecanim support and demo
Post by: jeanfabre on December 18, 2013, 02:34:28 PM
Hi,

 what Animation editor are talking about? can you make a reference or a screenshot?

I know for sure ( and it's a real shame), that Unity messed up a bit with the name "animation" and it's very very confusing right now, because there is two types of animation, one for mecanim and one for legacy. and it's mess cause switching between the two is not clear not well documented.

 You may be experiencing this, and in which case, you should report a bug to Unity, so they get as much complains as possible on that matter to properly adjust their interface to make it obvious.

Bye,

 Jean

Title: Re: Mecanim support and demo
Post by: funshark on December 18, 2013, 03:05:47 PM
That's the Animation editor I'm talking about :
(http://genshoku.net/temp/Animator_01.jpg)

Here we can see that Playmaker is asking for the Animation component :
(http://genshoku.net/temp/Animator_02.jpg)

And here I've added manually an Animation component to be able to fill the action but it doesn't work --> the events are not taken in account
(http://genshoku.net/temp/Animator_03.jpg)
Title: Re: Mecanim support and demo
Post by: funshark on December 18, 2013, 03:23:38 PM
Ok I have some news.

I wasn't aware of the existence of a "switch" to pass your Animation to the legacy mode. ( btw you can find it on the clip with the help of the Inspector debug mode =3= yay!)
Now I can use Playmaker to control the Animations ( with the Animation component ) but unfortunately, the Sprite animation integrated in Unity 4.3 does not work anymore after that :(((
Title: Re: Mecanim support and demo
Post by: elvis75k on December 18, 2013, 07:32:24 PM
That's the Animation editor I'm talking about
---
Here we can see that Playmaker is asking for the Animation component :
---
And here I've added manually an Animation component to be able to fill the action but it doesn't work --> the events are not taken in account
This is the same problem i've ecountered yesterday. I was trying to convert the logic behind the prime31 CharacterController2D (https://github.com/prime31/CharacterController2D) with PM but failed miserably at the animation stage (never used mecanim before). All the brand new unity 2D tutorials 4.3 use mecanim to handle animation of sprites. How can we play 2D sprites animations then (idle, jump, walk, run) using playmaker? Do we need a custom mecanim action? or it's already here?
Title: Re: Mecanim support and demo
Post by: jeanfabre on December 19, 2013, 02:20:59 AM
Hi,

 Ok, the way to go is likely the following ( thanks to lea Hayes for this)

Quote
1. Remove "Animator" component from game object.
2. Add "Animation" component to game object.
3. Associate the recorded animation with the animation component.
4. Select the animation asset.
5. Right-click the inspector and select "Debug" mode.
6. Change the animation type from "2" to "1" (legacy mode).
7. Right-click the inspector and re-select "Normal" mode.
 
This allows you to use animations recorded using the animator component,
with the legacy animation component. I have been encountering a number of
issues with the animator components in my current project and have been
forced to use the legacy one.

Can you try this?

Bye,
 
Jean
Title: Re: Mecanim support and demo
Post by: funshark on December 19, 2013, 06:39:00 AM
The thing is, when we do that, we can't use the Sprite animation functionality included in Unity 4.3
Title: Re: Mecanim support and demo
Post by: jeanfabre on December 19, 2013, 06:49:34 AM
Hi,

 Odd. have you contacted Unity on that matter?

bye,

 Jean
Title: Re: Mecanim support and demo
Post by: funshark on December 19, 2013, 07:13:36 AM
I don't know how to contact directly Unity for this type of problem :)

But I've found some thread mentioning the same issue :

http://answers.unity3d.com/questions/577098/unity-43-2d-animation-dope-sheet-not-working.html
http://forum.unity3d.com/threads/211942-Sprite-Animations-with-Legacy-not-possible?p=1458537#post1458537
Title: Re: Mecanim support and demo
Post by: jeanfabre on December 19, 2013, 08:53:07 AM
not related: very impressive artwork and 3d portfolio funshark!!!

bye,

jean
Title: Re: Mecanim support and demo
Post by: Lane on December 19, 2013, 09:16:55 AM
not related: very impressive artwork and 3d portfolio funshark!!!

bye,

jean

Man +1, that stuff looks great!
Title: Re: Mecanim support and demo
Post by: jeanfabre on December 19, 2013, 12:54:41 PM
Hi,

 PlayMaker support  for Mecanim and Unity 4.3.2 is now out :)

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

Demos are missing ( they still can be useful here and there, but definitly obsolete in mayny ways). I'd like Unity to provide a good update on their mecanim tutorial packages... but that's likely not for tomorow unfortunatly. I'll see what I can do with the GDC mecanim demo, it has some stuff, but not covering everything unfortunatly.

So, don't hesitate to report issues and all, not every actions where tested ( cause some actually makes no sense yet to me... and Unity doc is missing or not useful for a proper understanding).

Bye,

 Jean
Title: Re: Mecanim support and demo
Post by: funshark on December 19, 2013, 01:08:51 PM
not related: very impressive artwork and 3d portfolio funshark!!!

bye,

jean

ahah thank you! This is mostly old works ;)

Man +1, that stuff looks great!

Thank you! :)

Hi,

 PlayMaker support  for Mecanim and Unity 4.3.2 is now out :)

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

Demos are missing ( they still can be useful here and there, but definitly obsolete in mayny ways). I'd like Unity to provide a good update on their mecanim tutorial packages... but that's likely not for tomorow unfortunatly. I'll see what I can do with the GDC mecanim demo, it has some stuff, but not covering everything unfortunatly.

So, don't hesitate to report issues and all, not every actions where tested ( cause some actually makes no sense yet to me... and Unity doc is missing or not useful for a proper understanding).

Bye,

 Jean


YAY!
Now let me try if I can finally play that *** sprite animation ! :p
Title: Re: Mecanim support and demo
Post by: funshark on December 19, 2013, 01:16:45 PM
Works great as far I've tested! :)

Thank you for the hard work Jean!
Title: Re: Mecanim support and demo
Post by: elvis75k on December 19, 2013, 03:41:23 PM
Is this for real??? I'm testing right now! Thanks tanks thanks thanks thanks (not by ctrl-c / ctrl-v) :) I'll report here if i have issues ;)
Title: Re: Mecanim support and demo
Post by: elvis75k on January 13, 2014, 04:51:10 PM
unity 4.3.3 out:

Quote
Mecanim: Fix backward compatibility issue with animation imported in 4.2 and then imported in 4.3, we did change the default behaviour between those two version on how transform animation are imported
Title: Re: Mecanim support and demo
Post by: jeanfabre on February 06, 2014, 07:09:39 AM
Hi,

 Mecanim Demos are now back:

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

bye,

 Jean
Title: Re: Mecanim support and demo [New February 2014 Version]
Post by: Dev_Sebas on February 06, 2014, 08:14:52 AM
Thanks will check it out!