Thoughts on mechanim And how it could be better..IMO

Lets start by saying that i cant tell an opinion on the retargrting/root motion/ curves etc stuff of mechanim, simply because the issues and suggestions i will sortly list, are prior to all that stuff.

  1. meeting the requirement of a transition from the “any state” node, should not fire again if the state that we will go, is the same state as the one we are currently in. At least make it an option for the “any state” node.

  2. the sub-state node should actually work as a group, meaning that we should be able to make a transition from and to a sub-state itself rather than each of its nodes indepentadly and from each of its node to each other node in the SM. So while the SM is in a sub state node, a transition meeting the required conditions will make a transition from any of the child nodes of the sub state to whatever state it is connected. Similarily a transition from a state to a sub state could activate a state that we mark as default in the sub state. Similar to a HFSM which currently is not.

  3. allthough ping pong style animation can be done using 2 states with 1 being played at -1 speed a transitions from one to another based on exit time, it would be much nicer to have an option for ping pong animation. They are prety usefull.

  4. i believe that exit time “condition” should not fire on a state whose animation is loopable by default.

  5. Support for copy-pasting multiple nodes along with their transitions as a whole. Lets suppose that we made a nice flow for a bunch of states and decide to move all those under a sub state for clarity. Now we will have to remake all the states, transitions and their settings.

  6. support copy pasting transition settings.

Generaly, while mechanim’s internal stuff might be fantastic, i feel that the ui as well as the whole setuping relative the the state machine need improvement.

Thanks.

My 1 euro.

  1. Its true there is a usability issue with Any State requiring you to clear the trigger once the transition has started to gain the full benefit. We are discussing a number of solutions to this problem. I believe the current most popular one is a trigger type event that gets reset once it triggers a transition. But we’re not yet fixed on any particular solution.

  2. This suggestion is something you can achieve with layers… you blend from one layer to another, each layer has its own current state and transitions. Sub State Machines allows you to build bigger and more complex state machines that would not be manageable without this concept.

  3. Ping Pong has been discussed numerous times, essentially we had a hard time coming up with real scenarios where you actually need it. Please give us a few and we might reconsider.

  4. Are we talking about what the default transition trigger should be? There is no other suitable candidate to use as a default… even on looping animations exit time is very suitable as this allows you to control the exact timing of a transition and such predict exactly how the transition will look EVERY time its fired. And you can set it to 1.8 meaning 80% into the second loop. I find that very suitable.

  5. Yes, I’ve actually suggested this myself, unfortunately it was too close to the actual 4.0 release to make it in. We do want to add something like this in the future.

  6. Yes, this would be very useful.

  1. a trigger node would be very useful ( solves this problem: http://forum.unity3d.com/threads/158661-Mecanim-Any-State

  2. Is there a ‘Mecanim’ way to blend between layers easily without code? Also I think that if you were able to create transitions from a sub state group to another state it would be extremely useful. This transition would override any ‘child’ transitions

Awesome work though :slight_smile:

yes, 1 is about that kind of issues that sirival stated above

  1. as sirival says, I’d like a more…consistent mechanim way. Using the layer based approach, doesnt make it possible to make specific transitions from one “group” to another.

  2. personaly i’ve made most of my idles in ping pong as well as dance animations. Of course they could be made looping, but making them in ping pong works fine as well as needs half work done. I m sure other people will have their own uses for ping pong.

  3. No… maybe I wasnt very clear in that one. Exit Time being the default transitions is great and indeed very usefull. I like that. But if I have a state that it’s animation is loopable, do you think it is suitable for a transition from this state to fire on Exit Time. I mean why there be an exit time since the animation is loopable? In any case this one is the least of my concerns, so no biggy.

  4. nice. eager to see it implemented.

  5. same as well.

Also, in the dev preview forum (now closed) there was a thread about making random idles. Some people suggested using a blend tree and a parameter for indexing which is something that we have tried and sounded cool, but I don’t think that actually works, since if we are currently playing index 1 for example which is the normal idle and after a random time we were to play index 5, the animation will not look nice since there will be a transition from animation 1 to animation 4 passing through all inbetweens. The next thing we tried was setting the index parameter first and then trigger the blendTree node from an “any state” node right after. I can’t tell exactly what was happening behinf the scenes, but the transition from one animation to another did had a pop instead of using the transition settings set from “any node” to the blendTree.

Thats all I guess. Thanks for reading.