Search Unity

Puppet2D - An advanced skeletal animation tool

Discussion in 'Assets and Asset Store' started by jamieniman, Dec 31, 2013.

  1. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Do you mean flipping the character? You can do this using the flip checkbox on the global_ctrl.

    If you mean mirroring animation as in transferring the animation from the left side to the right side, I don't have this feature yet. (Most 2D character aren't made to be mirrored as they are drawn at a slight angle, anyhow)
     
  2. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    If you have a copy of Puppet2D and want to beta test v2.0 please email puppet2d@gmail.com your invoice number and I'll send you a copy.

     
  3. mccann

    mccann

    Joined:
    Sep 24, 2013
    Posts:
    29
    Ok. It makes sense now that if you want ragdoll to work, you'd have to disable your global_CTRL. Regarding 2D physics with puppet2d, colliders shouldn't be a problem. It was the 2d rigidbodies that looked like they might be an issue when gravity enabled. We can try to put your puppet2d animation in for the main character of the Unity 2D Platformer demo and see how that works.
     
  4. Keksmanu

    Keksmanu

    Joined:
    Jul 11, 2014
    Posts:
    11
    Tried this but sth.(puppet2d related) doesnt let "flip" to change state while the game is running, not with a script and even when clicking the flip checkbox it is not working.
     
  5. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Do you have everything parented under the global_Ctrl?
     
  6. rushil133

    rushil133

    Joined:
    Nov 21, 2012
    Posts:
    19
    @jamieniman thnxxss for your earlier reply; it had sloved my issuse but now i am facing another issue with rigging the legs:-:-

    I am also attaching the video showing the above concern :-


    Kindly guide me so that i can continue my work with your awesome plugin!!!
     
  7. mccann

    mccann

    Joined:
    Sep 24, 2013
    Posts:
    29
    What specifically is the issue? (at what time do you see it in the video?)
     
  8. mccann

    mccann

    Joined:
    Sep 24, 2013
    Posts:
    29
    @jamieniman I got Puppet2D working with the Unity 2D Platformer code! :)
    So, your asset does work with rigidbodies, gravity, etc. Sorry to even question / doubt!

    Things learned:
    • I had some how captured the Player Position in the animation (oops)
    • Think I had an issue with Layers
    • Rigidbodies could be attached to the sprites without issue

    Thought I'd share the working version:
     
  9. rushil133

    rushil133

    Joined:
    Nov 21, 2012
    Posts:
    19
    @mccann @jamieniman Let me explain you my issue again :-
    Basically i am trying to setup the rig in the legs but when i select left leg sprites & bones,click on bind smooth button the left leg is getting rigged but now when i repeat the same process on right leg ;somehow the shoe on the left leg is getting disappeared( just after clicking on bind smooth skin button).

    I am also attaching the video showing the above concern :-


    Kindly guide me so that i can continue my work with your awesome plugin!!!
     
  10. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    The two shoes have the same name, so when you skin the second one it overwrites the first one.
    Just give them unique sprite names so they don't conflict :)
     
    mccann likes this.
  11. rushil133

    rushil133

    Joined:
    Nov 21, 2012
    Posts:
    19
    @
    @jamieniman thnxxs for your reply but even after changing the shoes sprite name the issue is not resolved still shoe on left is getting disappeared( just after clicking on bind smooth skin button).

    I am also attaching the video showing the above concern :-


    Please guide me i am struck with this issue....
     
  12. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Apologies - I didn't mean changing the gameObject name - they both are made from the same sprite I think. That means the mesh in your project is the same. So what happens is when you skin one of them, the other probably moves to the same spot. In order to have another shoe you will need a unique mesh with its own skinning information. You can do this by dragging in the shoe sprite and converting it to a mesh again. Make sure you click "not overwrite" so that it creates a new mesh in the project. Now when you skin it it will overwrite the other shoe.
     
    mccann likes this.
  13. mccann

    mccann

    Joined:
    Sep 24, 2013
    Posts:
    29
    In your Trello site, you mention "tail" feature in 2.0. Do we have the ability to make things like tails and "long necks" in 2.0? If so, I'll send you my account info to help beta test. :)
     
  14. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Yup! You can see it in action here:

    (Although the video shows an earlier version)
     
  15. JDuaneJ

    JDuaneJ

    Joined:
    Jul 26, 2014
    Posts:
    29
    Hello Jamie, I'm seeing a problem after I bake the animation. When the anim is baked, I see the reverse of what your tutorial shows...I see the controls still animating and not the bones. I cannot get the bake animation to work.

    Never seems to fail; follow tutorial video exactly and cannot get same results. Very frustrating.
     
  16. Headworker

    Headworker

    Joined:
    Sep 6, 2012
    Posts:
    28
    First id like to repeat myself : awesome tool, so much control and fun!
    Here is a my wishlist, if you can find the time:

    -> More In-Depth Tutorials / Complete Workflow Videos
    I understand you are busy with the features, but often my results differ from yours when I follow the tutorial videos excatly.

    -> I have the same problem as JDuaneJ with baking.
    Please try to make an In-Depth Baking Tutorials sometime. Like how to get from rigged, animated character to Bone-only-animated character, which can be controlled by scripts and animators. I do struggle here, although ive been trying for a long time. For example, I have a GameObject as a parent for my character with rigidbody (movement gets applied here). Do I parent this to the Global_CRTL before baking? Whats the correct setup and so on.

    Thanks again for this awesome tool!
     
  17. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    After you bake the animation, do you remove the old clip from your animator and add the baked clip? (It lives in the Puppet2D>Animation>Baked folder)
     
  18. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    You're definitely right I need to make more tutorials. I'm currently focused on getting v2.0 polished and released, along with all the support videos for the new features.
    Once thats all done, I'm going to prioritise new more in depth tutorials.

    Baking the control animation onto bones is an optional optimisation step. Once baked you can work without the puppet2D scripts as essentially all you have is animation on gameObjects.
    You shouldn't need to put the GameObject under the global_ctrl for baking as only the bone animation is baked out.
     
  19. Headworker

    Headworker

    Joined:
    Sep 6, 2012
    Posts:
    28
    Thanks.

    Afterwards, which object is holding the animator component? Is the Global Control still needed? If not, where is the animator located?
     
  20. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    The global_Ctrl should still be there with the animator component. Only you can disable/remove the script on it.

    If you want to make use of the flip and combineMesh functionality of the global_ctrl, you should instead uncheck autoRefresh, and remove all the IkHandles & ParentControls form the global_ctrl script. That way it will nolonger update the control scripts.
     
  21. Headworker

    Headworker

    Joined:
    Sep 6, 2012
    Posts:
    28
    Thank you, that finally did the trick! I did what you told me, and just renamed the GlobalControl to be my new Root GameObject of the animated Character. Thanks!
     
  22. JDuaneJ

    JDuaneJ

    Joined:
    Jul 26, 2014
    Posts:
    29
    Jamie, what workflow would you recommend for keeping a "Base" mesh w/rig for each anim? I'm currently rigging with Puppet2D, then duplicate the rigged character to animate. Essentially, I want to have the ability to go back and tweak animations without having to remold the base pose into that anims starting position. Currently, every time I wish to tweak an anim after it's in game or baked, I have to re-pose my character from the base pose...for example, positioning the character back into the start of the jump anim from the idle base pose. Can you edit a baked anim?
     
  23. JDuaneJ

    JDuaneJ

    Joined:
    Jul 26, 2014
    Posts:
    29

    Ahh, I was unaware that you must remove the old clip from the animator. It works!
     
  24. JDuaneJ

    JDuaneJ

    Joined:
    Jul 26, 2014
    Posts:
    29
    Jamie, I'm seeing a warning at runtime that says "Animation...must be marked as Legacy" I know how to do this with a traditional imported animation from an FBX, but I can seem to locate this with the baked anim from Puppet2D.
     
  25. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Are you using the animation component (as opposed to the animator)?

    To change it back and forth between legacy and mechanim - change the inspector to debug view and change the animation type from 2(mechanim) to 1 (legacy)
     
  26. Bubbol82

    Bubbol82

    Joined:
    Jul 15, 2014
    Posts:
    6
    Hello im new on puppet i have the program from few days,i have a problem on the first minutes of your main tutorial.When i try to parent a bone to a joint this thing happens as i show in the picture.The bone remain connected to the left shoulder,but i want parent the spine bone as showed in your tutorial without the shoulders joints.Any help,thanks. Immagine.jpg
     
  27. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    I'm a little unclear on what you're asking here.
    Perhaps it could help to keep 2 animatorControllers. One of them for the control animations, and the other for the baked animations with all the mechanim network stuff.
    When you want to make a new animation starting in the same pose as lets say the walk- duplicate the walk control clip and start editting it from there - that way you start with the same pose. I think you should still be able to copy and paste keyframes between clips anyway.
    I wouldn't recommend editting the baked animations directly - it would be painful, and you would have to redo it if you wanted to use the controls anyway.

    Are you definitely in need of baking animations by the way? - I only recommend doing this step if optimisation is really important for you.
     
  28. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    The missing shoulder bone was a bug in the earlier version in which the tutorial was made. Since the shoulder is parented to the spine, its correct to see the connection. :)
     
  29. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    I see you're beta testing v2.0. As you're new to puppet2D in general, you might find the only tutorial I did on FFDs a bit fast, I do plan on doing a slower one with voiceover for when I release it.
     
  30. JDuaneJ

    JDuaneJ

    Joined:
    Jul 26, 2014
    Posts:
    29

    Ah this worked nicely.


    My project is for iOS and Android, so anything I can do which increases performance I'll make the effort. Baking animations seems to be the way to go for this project (for right now at least).
     
  31. Bubbol82

    Bubbol82

    Joined:
    Jul 15, 2014
    Posts:
    6
    Ahhh thats why, its ok then,thanks i will post again if i have other doubts or problems.
     
  32. JDuaneJ

    JDuaneJ

    Joined:
    Jul 26, 2014
    Posts:
    29
    Ok now I'm seeing "Animation clip 'DoorPeak01_Baked' is not retargetable. Animation clips used within the Animator Controller need to have Muscle Definition set up in the Asset Importer Inspector" Is this something cause by Legacy Animation?
     
  33. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Is this a bug you could find steps to repeat? Previously you mentioned you needed to change an animation from legacy to mechanim - have you not been creating all your animations in mechanim?
     
  34. JDuaneJ

    JDuaneJ

    Joined:
    Jul 26, 2014
    Posts:
    29

    Previously I had to change Mechanim to Legacy for the animation to function. Now I'm seeing this warning flagged when I play the game. I don't know what this means tho. I have the global control with an Animation component and it's referencing the baked anim from P2D. I assume legacy is reading the bones in the animation, but can't find a "rig"? When I export fbx from 3DSMax into Unity, there are components to the prefab such as, Model, Rig, and Animations.
     
  35. SecretItemGames

    SecretItemGames

    Joined:
    Apr 13, 2012
    Posts:
    16
    Hi, I got a problem with Puppet2D. In my scene I got a box collider which i control to move around. Under it I parented the Global_CTRL with bones and all that stuff. When I flip Global_CTRL it changes rotation values not only on y but on x and z as well. This leads to the character changing rotation while the box collider stays the same. If flip is triggered often enough it can even lead to having the character 90+ degree to a direction while the collider stays the same. I tried fixing this with the following code but something from puppet 2D prevents it from getting executed (ChildObject is Global_CTRL).

    Code (CSharp):
    1. if(ChildObject.transform.rotation.y == 0f || ChildObject.transform.rotation.y == 180f)
    2. {
    3. Debug.Log("Rotate");
    4. Vector3 v3FreezeRotation = new Vector3(0f,ChildObject.transform.rotation.y,0f);
    5. ChildObject.transform.localRotation = Quaternion.Euler(v3FreezeRotation);
    6. }
    Any idea on how to fix this?
     
  36. Rodyfish

    Rodyfish

    Joined:
    Sep 4, 2014
    Posts:
    18
    Hi I just bought the asset, and it seems really nice :).

    But I have some beginner troubles.

    1) My screen is not that big, so I cant leave much space for the Puppet2D_Editor. Unfortunately it doesn't offer me an opportunity to scroll, if I want to make the window smaller.

    2) When playing with the bone creation, I cant get the documented shortcuts to work. Even though the documents only refer to pc use, I guess there shouldn't be a problem with the normal ctrl = cmd convertion.

    When I click on a bone, I'm able to move the joint with the mouse, but all the children follows. What if I just want to move the joint, without moving all the children? Your documentation mention something about the need of pressing shift, but all it does is moving the joint horizontal or vertical. And I'm able to move the joint with just normal mouse dragging, instead of using the documented ctrl (cmd on mac I guess).

    So how do I move a joint without all the children i following?
     
  37. Rodyfish

    Rodyfish

    Joined:
    Sep 4, 2014
    Posts:
    18
    Oki after further investigation, I can see than none of the shortcuts works for bone creation. I don't know if it's because of I'm using version 4.6, which is still in beta, or it is because I'm using a Mac.

    Unfortunately I don't have the opportunity to test it in 4.5 at the moment, so if it works there, please let me know :).
     
  38. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Iid advise putting your box collider onto the global_CTRL, and use the flip checkbox on the global_CTRL to flip the character.

    The reason I flip the character by rotating it 180 and scaling it -1 in z is this is the best way currently to make sure any rigid bodies and colliders under the global_Ctrl flip correctly.
     
  39. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Is "Create Bone Tool" button green when you are trying the shortcuts?
    If yes, my first guess is that your bone layer is locked - that would cause all the shortcuts to stop working. I created Puppet2D on a mac so its not that (Mac users will still use ctrl to move the bone not command) Otherwise I hope its not a 4.6 thing, that would suck.
     
  40. Bubbol82

    Bubbol82

    Joined:
    Jul 15, 2014
    Posts:
    6
    Hello i watched your video on youtube,have you releases the 2.0 version of Puppet2d?
     
  41. SuperNbie

    SuperNbie

    Joined:
    Nov 1, 2012
    Posts:
    11
  42. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Itll be out soon ;-)
     
  43. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Hi Everyone,
    I'll be away until Sunday, in the meantime here's the new demo ccharacter and tutorial for the Puppet2D v2 soon to be released:



     
  44. Keith90

    Keith90

    Joined:
    Sep 27, 2013
    Posts:
    116
    Hey, quick question.

    From my understanding, baked animations are basically animations that don't rely on the bones/ikhandles. Is that correct? If so, what are the pros and cons to it? In terms of performance. Thanks. :)
     
  45. Bubbol82

    Bubbol82

    Joined:
    Jul 15, 2014
    Posts:
    6
    Ok thanks
     
  46. JDuaneJ

    JDuaneJ

    Joined:
    Jul 26, 2014
    Posts:
    29
    Ok I'm experiencing a new problem. When I have more than one character in my scene with "GLOBAL_CTRL", every time I bake an animation, the Puppet2D script gets added to all of the characters with "_GLOBAL_CTRL" in their names.
    For example I have "Monster01BaseGlobal_CTRL" and "IdleSleepGlobal_CTRL". Both two different characters with different animations. When I'm building animations for the Monster character, and I bake the anims...scripts are being added on top of one another in the "IdleSleepGlobal_CTRL". So at one point I had 5 Puppet2D Bake Animation Scripts on that control. lol

    Is there a special thing that I'm missing here?

    upload_2014-9-25_10-24-59.png
     
  47. JDuaneJ

    JDuaneJ

    Joined:
    Jul 26, 2014
    Posts:
    29
    Jamie, can you make the control sprites render on top of 3d geometry? I find this very useful for when my character is being animated with a prop, and some of the controls are behind the 3D geometry. How would I do this, or can you add this to the next update?
     
  48. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Baked animations allow you to remove all the controls along with their runtime scripts. This leaves you with keyframes on the bone GameObjects. It should help with performance.
     
  49. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    You should only have 1 character in the scene when you bake it (only bake one character at a time)
     
  50. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Add the Puppet2D_SortingLayer script onto your 3d object :)