Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Puppet2D - An advanced skeletal animation tool

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

  1. HHStudio

    HHStudio

    Joined:
    May 17, 2016
    Posts:
    10
    Hi All,
    We need an able 2D animation artist for animation 2D mutant monsters in "realistic" (not cartoonish) style for a new action video game made on Unity engine. Using puppet2D is preferrable. Please contact me to info@homo-habilis.com
     
  2. celarain

    celarain

    Joined:
    Dec 7, 2015
    Posts:
    10
    Hi! I bought few days ago Puppet 2D, and having a problem in the skinning step, creating the FFD Tool, when I end with the points and finishing FFD, dessapears the body I am selecting and creates a transparent mesh.

    Thanks in advance
     

    Attached Files:

  3. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    Hey I just had a question about how Puppet2D works.

    I'm working on a character system with its own skeletal hierarchy (bones are empty gameobjects with the sprites as child gameobjects of that bone) and the bones are stored by name in a script for access later for things like sprite swapping so I need the naming consistency, its always the same skeleton between characters.

    Right now I'm using the regular Animation tab to bake anims into that skeleton. If I animated it with Puppet2D could I later remove Puppet2D and bake the animation into my skeleton structure and still have it work? Can the built in Animation system even apply those anims to an identical hierarchy or is it somehow linked to serialization?
     
  4. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Is your sprite texture square, power of 2 with mipmapping turned off?

    Also make sure the sprite doesn't have any scale or rotation transforms on it.
     
  5. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    There is a bake animation animation onto bones feature - but I'm not really sure your own hierarchy will match up with the puppet2d bone hierarchy to transfer the animation.
     
  6. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    The assumption is that they'll make an identical structure. Can the Puppet2D hierarchy can be named to match what is needed? If so, it seems like it should work fine.
     
  7. Grendal1971

    Grendal1971

    Joined:
    Oct 22, 2013
    Posts:
    14
    Fresh Unity 5.4.1f1 and Puppet2d and I a console error "get_dataPath is not allowed to be called during serialization, call it from OnEnable instead. Called from ScriptableObject 'DockArea'. See "Script Serialization" page in the Unity Manual for further details." If this is covered elsewhere I am sorry I searched and didn't find it.
     
  8. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    623
    No, we are waiting for a fix.
     
  9. celarain

    celarain

    Joined:
    Dec 7, 2015
    Posts:
    10
    Solved, as you said I was scalling it, now its working, thank you :D
     
  10. celarain

    celarain

    Joined:
    Dec 7, 2015
    Posts:
    10
    Hi again, got another general question, how could I do in a 4 direction player, switch between the different animations? I will have 3 different atlas, horizontal, top and down.

    Thanks in advance
     
  11. Casanuda

    Casanuda

    Joined:
    Dec 29, 2014
    Posts:
    53
    Hi,
    This looks like a promising asset. A couple of questions before committing if you don't mind:

    1) Does this tool result in animation sequences I can use in mechanim that I could use to eg. blend between running, walking, jumping, etc?
    2) Can I affect the IK in realtime to eg. pick up something?
    3) Can I use this in conjunction with eg. Dynamic Bone https://www.assetstore.unity3d.com/en/#!/content/16743 that would add physics?

    Ta
    Cas
     
  12. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    I'll be releasing an update soon, I was also planning on also introducing a new feature, but its is taking longer to finish.

    In the meantime here's how to fix it:

    Replacing line 61 (Puppet2D_Editor.cs)
    Code (CSharp):
    1.  
    2. private string pngSequPath = Application.dataPath, checkPath;
    3.  
    with this one:
    Code (CSharp):
    1.  
    2. private string pngSequPath, checkPath;
    3.  
    and in OnEnable function, add this line:
    Code (CSharp):
    1.  
    2. pngSequPath = Application.dataPath;
    3.  
     
    docsavage likes this.
  13. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Yes, you can definitely take advantage of mechanim animation blending.

    Yes, the IK controls are GameObjects that can be manipulated in realtime.

    I haven't tried, but it seams plausible that it would work.
     
  14. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    It might make sense to have a different rig for the horizontal view (which can use the flip for left and right) and then have another 2 rigs for top and bottom. Then you can swap the enable their gameObjects to switch between them.
     
  15. celarain

    celarain

    Joined:
    Dec 7, 2015
    Posts:
    10
    Thanks jamie, that was what I thought :D
     
  16. TrickShinobi

    TrickShinobi

    Joined:
    Aug 31, 2016
    Posts:
    17
    How do I make the skeleton just collapse/fall like a ragdoll.
    It just stays stiff and I don't know where to look to make the character just fall.
     
  17. anilo

    anilo

    Joined:
    Feb 7, 2013
    Posts:
    31
    I am unable to export the animations as separate png files.

    I've tried to click on "Render Alpha" and "Render Animation" but I don't see any files exported in the folder.

    What am I doing wrong?
     
  18. davide445

    davide445

    Joined:
    Mar 25, 2015
    Posts:
    138
    Interested to animate this butterfly image but I'm a real beginner to Unity, any way to have a demo version of Puppet2D so to try it and unerstand if suits my needs?
    IMG_9404ed_cut.png
     
  19. celarain

    celarain

    Joined:
    Dec 7, 2015
    Posts:
    10
    Hi there! I am having some problems, I have a 2048x1024 psd atlas with my sliced character, when I use puppet on real scale, everything its fine, but after, when I have to scale the character, it seems its pixelated, and if I get closer still its fine. What could I do?
     
  20. Freeubi

    Freeubi

    Joined:
    May 30, 2014
    Posts:
    21
    Is there any way to export the animations made with Puppet2D in the way other apps can use?

    We are thinking to leave the unity from the iOS project.
    My idea is that i use unity for animations, export it then use in somewhere.

    Can i do that somehow (spritesheets are not working because we have clothes(hats, shoes etc) for our character )?
     
  21. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    The simplest way I found at the moment is to use Unitys 3d ragdoll (you need to disable the global control for it to work )
     
    TrickShinobi likes this.
  22. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    This could be the Unity 5.4 bug

    I'll be releasing an update soon, I was also planning on also introducing a new feature, but its is taking longer to finish.

    In the meantime here's how to fix it:

    Replacing line 61 (Puppet2D_Editor.cs)
    Code (CSharp):
    1.  
    2. private string pngSequPath = Application.dataPath, checkPath;
    3.  
    with this one:
    Code (CSharp):
    1.  
    2. private string pngSequPath, checkPath;
    3.  
    and in OnEnable function, add this line:
    Code (CSharp):
    1.  
    2. pngSequPath = Application.dataPath;
    3.  
     
  23. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Apologies, I don't have a way to offer a trial at the moment.
     
  24. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Have you tried turning mipmapping off on the texture?
     
  25. celarain

    celarain

    Joined:
    Dec 7, 2015
    Posts:
    10
    Just the opposite, I had turned off and had to turn on to see them without pixelating.
     
  26. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Is your filter mode set to bilinear ? (if it's set to point it would look pixelated)
     
  27. GreenHatJohn

    GreenHatJohn

    Joined:
    Nov 27, 2014
    Posts:
    8
    Is there an easy way to higher the maximum spline bones created? I'm making a chain (that I'll bind a mesh image to each bone) and don't want multiple spline control points besides the two ends.
     
  28. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    345
    I am looking to purchase an animation asset such as this one.

    How does puppet2d perform on mobile devices? Any performance impact?

    I am also looking to do something like this:

    http://esotericsoftware.com/spine-demos#Skins (the skins section)
    The same character setup, being able to switch different sprites to form different characters

    Is it possible for Puppet2d?
     
    Last edited: Oct 21, 2016
  29. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Currently you can have up to 10, but you can enable more by making a small edit to the code in Puppet2D_Editor.cs change on line 259 the number at the end to be as large as you want (currently its 10)
    Code (CSharp):
    1.  numberSplineJoints = EditorGUI.IntSlider(new Rect(80, 190+offsetControls, 150, 20), numberSplineJoints, 1, 10);
     
  30. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    It performs pretty well, there also different optimisations you can do (like baking onto the bones)
    To see more about performance in p2d see here http://www.puppet2d.com/performance-tips

    Of course you can!

    You can switch parented sprites out in code or in the animation.

    Code (CSharp):
    1. GetComponent<SpriteRenderer>().sprite = newSprite;
    Or if you are using the skinned mesh feature you can switch them by changing the material applied (can be done as animation or in code) This will work as long as the texture shares the same UV space.
    Code (CSharp):
    1. GetComponent<SkinnedMeshRenderer>().sharedMaterial = newMaterial;
     
  31. Rusted_Games

    Rusted_Games

    Joined:
    Aug 29, 2010
    Posts:
    135
    This update looks amazing

     
    CarterG81 likes this.
  32. Mintonne

    Mintonne

    Joined:
    Aug 7, 2015
    Posts:
    306
    Hello @jamieniman

    What an awesome asset you've put together.

    Just a quick heads up, the forum link on the asset store description is not working. Took a minute to find this forum page.
     
  33. anilo

    anilo

    Joined:
    Feb 7, 2013
    Posts:
    31
    When will AutoRig be released?
    Also, will you be fixing the Export capability.
     
  34. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Yes! Its been fixed (Also alpha exports with the color)

    I'm submitting it this week, hopefully it should be on the asset store before the end of the month
     
  35. laylayzi

    laylayzi

    Joined:
    Apr 9, 2014
    Posts:
    2
    I got a problem with Parent object to Bones.
    When i created bone with IK control, i look good but when I parent object to bones, It weird
    Here the screen record
     
  36. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    You dont want to be selecting the IK control itself when you click "Parent Objects To Bones" as this is parenting the control to the bones causing a feedback loop
     
  37. laylayzi

    laylayzi

    Joined:
    Apr 9, 2014
    Posts:
    2
    Thank you for your reply. It is OK now!
     
  38. Headworker

    Headworker

    Joined:
    Sep 6, 2012
    Posts:
    28
    Hello Jamie,

    everytime I get back to your Asset, it gets more and more impressive :)

    I am just tinkering with AutoRig and have the following problem:

    I have a single biped sprite. After aligning the guides and pressing "AutoRig" I get the following error:

    Exception: Error marking neighbors -- t doesn't contain edge p1-p2!
    Poly2Tri.DelaunayTriangle.MarkNeighbor (Poly2Tri.TriangulationPoint p1, Poly2Tri.TriangulationPoint p2,
    [...]

    If it helps, I could post the following lines of the execption, too.

    Here is a picture of my setup before pressing "AutoRig"

     
    Last edited: Dec 21, 2016
  39. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    The poly2Tri mesh triangulation library very occasionally errors. I find that in these cases if you just make the slightest change to the sprite (eg increase the transparency around the image by a few pixels) then it will convert to mesh ok.
     
  40. Headworker

    Headworker

    Joined:
    Sep 6, 2012
    Posts:
    28
    Thanks, Jamie. I now had the time to test it out. Worked as you said.

    Will there be more animation packs? When will they be out? I am looking forward to them very much, the platform pack is not exactly what I need.

    Keep up the awesome work and all the best for 2017!
     
  41. hemdanw

    hemdanw

    Joined:
    Nov 5, 2012
    Posts:
    14
    Hi,

    Just purchased Puppet2D today.
    Running into this error with Unity 5.5.0x3 (Unity Early adopters, 2D Experimental Release 3). Performing the recommended code changes fixed the errors.

    Assets/Puppet2D/Scripts/Editor/Puppet2D_Editor.cs(437,47): error CS0619: `UnityEditor.EditorApplication.SaveAssets()' is obsolete: `Use AssetDatabase.SaveAssets instead (UnityUpgradable) -> AssetDatabase.SaveAssets()'
    Assets/Puppet2D/Scripts/Editor/Puppet2D_Skinning.cs(1076,27): error CS0619: `UnityEditor.EditorApplication.SaveAssets()' is obsolete: `Use AssetDatabase.SaveAssets instead (UnityUpgradable) -> AssetDatabase.SaveAssets()'
    Assets/Puppet2D/Scripts/Editor/Puppet2D_SortingLayerEditor.cs(232,21): error CS0619: `UnityEditor.EditorApplication.SaveAssets()' is obsolete: `Use AssetDatabase.SaveAssets instead (UnityUpgradable) -> AssetDatabase.SaveAssets()'

    - Wael
     
  42. hemdanw

    hemdanw

    Joined:
    Nov 5, 2012
    Posts:
    14
    Hi,

    Trying to animate a tentacle made up of 8 bones. The problem is that the moment I add an IK control, the bone movement becomes messed up with super large angle flips. Is there any way to limit the angles between bones or should I be using splines? Splines seem to be designed for meshes... the tentacle is made up of 8 sprites which were matched up with 8 bones... Am I doing this right? I can't find how to set the angle limits between bones.
     
  43. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Thanks!
    What animation pack would be useful for you? I'm going to ask around, to see what it make sense to work on next.
     
  44. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Yes - I've also noticed in the new unity it turns off the sprite status on the textures when p2d reads it - so ill be looking to fix that in the next update (right now you'll want to reset it to a sprite if you undo any skinning)
     
  45. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Currently the angle limits are automatically set, but I think you can set them in the debug menu.

    My ideal recommendation is to create a straight tentacle and use the spline bones. This will be much nicer to animate with.
     
  46. Nikolasio

    Nikolasio

    Joined:
    Dec 6, 2014
    Posts:
    59
    Hi Jamie,

    I've updated to unity 5.5.0f3 and I get these warnings:

    Method Puppet2D_Skinning.BindRigidSkin has invalid parameters. MenuCommand is the only optional supported parameter.
    UnityEditor.AttributeHelper:ExtractMenuCommands(Assembly, Boolean)
    Method Puppet2D_CreateControls.IKCreateTool has invalid parameters. MenuCommand is the only optional supported parameter.
    UnityEditor.AttributeHelper:ExtractMenuCommands(Assembly, Boolean)
    Method Puppet2D_Skinning.ConvertSpriteToMesh has invalid parameters. MenuCommand is the only optional supported parameter.
    UnityEditor.AttributeHelper:ExtractMenuCommands(Assembly, Boolean)
    Method Puppet2D_Skinning.BindSmoothSkin has invalid parameters. MenuCommand is the only optional supported parameter.
    UnityEditor.AttributeHelper:ExtractMenuCommands(Assembly, Boolean)

    And also this one:

    Assets/Puppet2D/Scripts/Triangulation/Delaunay/DelaunayTriangle.cs(51,32): warning CS0649: Field `Poly2Tri.DelaunayTriangle.mEdgeIsConstrained' is never assigned to, and will always have its default value


    What to do?

    Cheers,
    Nikola
     
  47. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    I'm looking into this - I've already noticed one issue with Unity5.5 - whenever P2D reads a sprite it converts it to a texture for some reason (You'll need to change it back manually if you have undone and want to convert it back into a mesh)
     
  48. Headworker

    Headworker

    Joined:
    Sep 6, 2012
    Posts:
    28
    Hey Jamie!

    <Thanks!
    What animation pack would be useful for you? I'm going to ask around, to see what it make sense to work on next.>

    Well just for me, doing mostly turnbased games, the following pack would be a awesome:

    Discrete humanoid animations for walking, running, getting hit (different levels, like small hit, hard hit), death anims and variations, melee attack (with large weapons and smaller ones), handgun and rifle attacks. This would rock and I believe there may be a not so small market for it :)

    Thanks for asking!
     
  49. Nikolasio

    Nikolasio

    Joined:
    Dec 6, 2014
    Posts:
    59
    Ok, Thank's.
     
  50. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    104
    Hi Jamie,

    My two brothers have purchased your wonderful tool and want me to script their game. I'm trying to make a character controller that accesses the flip boolean in your script when a or d is pressed and I can't get it to work. I can kind of recreate what flip seems to do (rotate 180 y axis, scale z axis negatively). Am I being a total noob?