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. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    Is Puppet 2D compatible with normal maps? I tried Spine but it wasn't compatible.
     
  2. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    Hi,

    Just bought it and testing it out, and it looks really cool, great job :)

    I have a couple issues with basic asset functionalities though:
    1. There's tons of inconsistent lined endings. I saw this has been made present already, so I'm just pinging it for a quick fix
    2. The package contents are kind of messy. Can't we have a "demo" folder with all the demo content (animations, textures, etc), so that it's easy to pinpoint stuff we don't want to import with the rest of the package?
    Cheers,
    Daniele

    EDIT
    P.S. Also, it would be nice if the Puppet2D window had a scroll function for when it's not fully visible (super easy to implement)
     
    Last edited: Apr 4, 2016
    funshark likes this.
  3. GreenHatJohn

    GreenHatJohn

    Joined:
    Nov 27, 2014
    Posts:
    8
    Can I use the 'paint weights' function if I've made my sprite an FFD skinned to some bones? It doesn't seem to want to work.
     
  4. GreenHatJohn

    GreenHatJohn

    Joined:
    Nov 27, 2014
    Posts:
    8
    It does sort of work, but when I'm in 'paint weights' mode on my FFD skinned sprite and select a bone to start painting I get a console warning me that the bone doesn't have a mesh skinned to it.
     
  5. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    You cant use paint weights on FFDs. Instead you can change the weighting in the inspector on each control.

    Also if you want to change the bone assignment of the FFD control you need to select the control and the bones you want to influence it and click bind smooth skin.
     
  6. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Yes, you can use shaders with normal maps with puppet2d meshes.
     
  7. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    I'll add these to my list. (1 is already there, just haven't got around to fixing it - it doesn't cause any functional errors though)
     
  8. GreenHatJohn

    GreenHatJohn

    Joined:
    Nov 27, 2014
    Posts:
    8
    Thank you for the quick reply! In the meantime, I did figure out the manual weight editing on the FFD controls, but didn't' realize I could re-assign which bones were influencing a single control point. That's nifty!

    On a side note, I kind of wish the documentation was a little more streamlined for this product. There's a lot of features and shortcuts I've found out at random and some things that I just didn't get what they actually meant in the editor tools until I experimented a bit, but are pretty powerful depending on the user's situation.
     
  9. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    Hi again,

    I just made a mess, help! I tried to paint the weights of a mesh, but I couldn't manage to do it correctly (partially because the painting tool sometimes gets stuck and/or does crazy things). Right now I would just want to go back to the default weight that Puppet2D applied initially, which was much better than what I have now, but I can't seem to find a way? I suppose this is easy but I'm lost :B
     
    funshark likes this.
  10. Stevepunk

    Stevepunk

    Joined:
    Oct 20, 2013
    Posts:
    205
    Thanks for your response! I'll give this a shot!
     
  11. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    P.S. In the meantime I fixed this by re-creating a new mesh from the same sprite. Would be curious to know if there's a "reset" weights option though, and if there is not I would vote to include it, if possible :)
     
  12. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    You can reset the bone weights by selecting the mesh and the bones and click bind skin weights button again.
    Thanks for your review by the way :)
     
  13. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    Ah that is cool! Silly me for not thinking to try that :B
     
  14. Max_power1965

    Max_power1965

    Joined:
    Oct 31, 2013
    Posts:
    127
    Hello guys,
    I'm having a little trouble with you'r plug in. I've created a few animation for my character. When I add the prefab to the scene and hit play everything's works fine. But when I add the rigidbody 2D to the character, he start to go up, if I increase the gravity scale the player will go up even faster. Is seams that the rigidbody2d cause some problems but i cant understand why.
    I'v only the script created by your plug in attached to the object. (see the image attached)
    What is the problem?
    Thanks
     

    Attached Files:

  15. rastinrastini

    rastinrastini

    Joined:
    Jul 8, 2010
    Posts:
    158
    Hi
    how can i use it to twist body like rotating body in sword action?
    Thankful.
     
  16. Kellyrayj

    Kellyrayj

    Joined:
    Aug 29, 2011
    Posts:
    936
    Hey there,

    Does Puppet2D support sprite swapping? Say I want to change a character hair or shirt?
     
  17. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    @Bridin From my experience, you can swap sprites whenever you want, either in the middle of an animation (because it uses regular Unity animations) or via code.
     
    Kellyrayj likes this.
  18. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    Heyo!

    I practiced Puppet2D while creating a silly game for my stepson's birthday, and I thought I'd share it here (as a fellow asset dev I always like when people share their stuff on my thread, but if you prefer otherwise let me know and I'll apologize ;)).

    Here it is, The Playa. A silly webGL game where you can create & share silly songs, farts included. It's very basic Puppet2D: all the character's movements are made with it, and I had a blast. A really great asset to use inside Unity :)

     
    Kellyrayj likes this.
  19. Zhong-Min

    Zhong-Min

    Joined:
    Apr 7, 2015
    Posts:
    3
    Hello,

    We created animation with Puppet2D. It works well in the Android devices, but some textures are not in the correct positions in the iOS handsets.

    We found we used below actions for these textures:
    1) "Convert Sprite To Mesh"
    2) "Bind Smooth Skin"

    While, for those correct textures, we only used action:
    1) "Parent Object To Bones" manually.

    We are not sure what happened and how to solve.

    Help please.
     
  20. Attentionspan

    Attentionspan

    Joined:
    Feb 15, 2015
    Posts:
    4
    Hello, Did anyone tested how many characters you can run and animate at the same time ? I was considering building a strategy game, so i will have a lot of characters moving around.

    I plan to have one character with all the animations finished, and then i will replace the armors weapons etc to their related unit class. They do not have tons of bones ands rigs. Only the neccesery ones like hands, elbow etc. But i plan to have a maximum number of 100 units on screen.

    Is it possible with Puppet2D or should i change my plans ?
     
  21. Zhong-Min

    Zhong-Min

    Joined:
    Apr 7, 2015
    Posts:
    3
    We solved by setting it to be POT.
    Thanks a lot.
     
  22. viashino999

    viashino999

    Joined:
    Jul 7, 2014
    Posts:
    1
    hi i new here i want to know what to do when i get this erros when i use ferr2d and puppet2d T-T any ideas Puppet2dAndFerr2dProblem.jpg
     

    Attached Files:

  23. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    I would recommend having a parent gameObject that has the rigidBody2D on it, and then having the global_CTRL underneath that. That way you you wont have conflicting movement coming from the animator and the rigid body
     
  24. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Perhaps you could use FFD controls to deform the body to look like its being twisted.
    Or you could make some new twist images and animate them by switching the material. (To animate the switching of skinned parts you need to make new materials that have a different texture in the same UV space, and then you can animate the change of the material)
     
  25. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Thats awesome! As a weird coincidence that trumpet player looks a lot like me!
    Yes I love when people show Puppet2D stuff on the forum. I wish people would do it more!
     
  26. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Oh, thats good to know, thanks
     
  27. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    It can be possible, but you should definitely look here to see how to best optimise: http://www.puppet2d.com/#!performance-tips/c22l9
    Parented sprites work the fastest, and you can always bake the animation onto the bones to remove all the working scripts to help on CPU.
    If you are using skinning you will most likely want to implement some kind of dynamic skinned mesh combiner to reduce the amount of draw calls.

    Hope that helps

    Jamie
     
  28. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Yes, its because we both use poly2Tri. Its an easy fix - just delete the Puppet2D Triangulation folder.
     
  29. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,239
    I am your stepfather then! :D
     
  30. vertigostudios

    vertigostudios

    Joined:
    Oct 1, 2012
    Posts:
    101
    Hi jamieniman,

    I'm currently using the Unity2d default animator to create our animations and then simple save the animations to a animations folder.

    Is it possible to save the animations same as above so that I'm able to send a prefab to my partner in crime.
     
  31. vertigostudios

    vertigostudios

    Joined:
    Oct 1, 2012
    Posts:
    101
    Hi again, when I've added all the art and locked it all down and assigned it to player layer. I then start to add bones. The problem i'm experiencing is that all the bones are behind the art so I'm unable to see the bones. Any help is appreciated.
     
  32. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Make sure you are setting up "Sorting Layers" (not layers) and you have a bone and character sorting layer. Then you should set this in the P2D UI. That way all the bones get created in the correct bone sorting layer. (For controls you can either use the bone sorting layer or make a separate one for controls)
     
  33. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    I'm not 100% sure what you are asking here - could you elaborate a bit?
     
  34. ooooooooooooooooooooooooooooo

    ooooooooooooooooooooooooooooo

    Joined:
    May 9, 2016
    Posts:
    1
    something wrong when executing in play mode

    UnassignedReferenceException: The variable mesh of Puppet2D_EditSkinWeights has not been assigned.
    You probably need to assign the mesh variable of the Puppet2D_EditSkinWeights script in the inspector.
    Puppet2D_EditSkinWeights.Refresh () (at Assets/Puppet2D/Scripts/Puppet2D_EditSkinWeights.cs:45)
    Puppet2D_EditSkinWeights.Update () (at Assets/Puppet2D/Scripts/Puppet2D_EditSkinWeights.cs:38)
     
  35. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    I think you may have forgotten to exit "manual edit weights" mode.
    Just Click the button "Finish Edit Skin Weights".
     
  36. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    Hi, i already sent an email about this last night so if you already replied to that don't worry about this. But i figured you may check this more and i could provide more details cause i really need to figure this out today cause i can't do anything until this works.

    I'm having an issue where when i try "Bind to smoothskin" on an FFD mesh the FFD mesh vanishes and no binding occurs.

    At first i was getting this all the time and couldn't use the feature at all. But now after deleting all the FFD and making them again i've gotten through a good chunk of the character with it working perfectly and but now the problem came back.

    Whats really annoying is i can't undo the glitch, the FFD vanishes, i can't see the sprite, the position the sprite should be at has shifted, and it still doesn't work with the bone (i think), and undoing ignores all of this. So in order to try again i have to reimport the sprite and delete all the FFD stuff.

    Is something i'm doing causing this glitch? There's no error log info at all, and if i make a new scene the feature works as expected.

    Actually, i just now as i'm typing this, I took a close look to see if there was anything else, and low and behold it turns out all the FFD points converged on top of each other? I didn't notice this before, but i guess thats why i can't see the sprite any more...

    Still don't know whats causing this, i'm using unity 5.3.1f.

    EDIT: So i shifted all the points until they were spread out and low and behold the sprite is in tact but all the points converging is still a problem even trying to use a different FFD after that.

    EDIT2: I did notice the new FFD ctrl group was the same name as the previous one...maybe thats the problem?

    EDIT3: Nope made another FFD, automatically had a different number but same issue when binding...

    Is it worth noting bind to smoothskin works fine when using a non FFD mesh.

    EDIT4: Still happening, The values for the control points all default to one coordinate and i can't change them :/

    So [spritename]_Ctrl_GRP_X all has it's position at the same value. The values for [spritename]_Ctrl_X are all 0.

    Issue occurs with new bone groups in the same project...

    EDIT 5: It occurred in a new scene, then stopped doing it once i deleted all bones in the scene and i could finish a simple setup. importing a prefab of one of the characters i'm having the problem with to a new scene didn't resolve the problem.

    I want to try just rebuilding the character all together but i'd hate to go through all that work and still not know what the cause is...

    EDIT 6: I've been making new scenes and saving prefabs to make this work but it works on one bone and FFD then the next it starts the glitch.

    I've spent all morning on this T_T
     
    Last edited: May 10, 2016
  37. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    OK can you send me a pic of the inspector of a corrupted FFD control.
    For some reason I believe you are losing an assignment. I think this is causing all future FFDs not to work as they search through active FFD controls in the scene and error on the fault. I must have a error check which is hiding the fault.
    First let's work out what assignment gets lost. Then we need to work out what you are doing that is causing the error.
     
  38. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    867
    Thanks for the reply, will do.

    EDIT: actually that statement was wrong, though i did see some Shifting.
     
  39. Zoub

    Zoub

    Joined:
    Jan 14, 2016
    Posts:
    7
    Hello

    when i scale down my character the IK controls go crazy

    could you please help me
     
  40. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Ok some questions to diagnose the issue:
    1. Do you have everything parented to the global_CTRL, and are you scaling the global_CTRL?
    2. Are you making sure to keep your bones and your controls separate (so dont parnet bones to controls or controls to bones)?
    3. Are you scaling linearly or non-linearly? (IE are you scaling in x,y & z equally)
    4. Are you animating the flip attribute on the global_CTRL?
    5. Do you have a rigid body on the global_CTRL?
     
    Zoub likes this.
  41. Grafos

    Grafos

    Joined:
    Aug 30, 2011
    Posts:
    231
    It's my first attempt at using Puppet2D and I have been having the exact same issue. Spend the whole day initially scratching, then banging my head. I must have watched the croc tutorial a dozen times! I create the ffd and when I try to bind it, poof, the sprite just disappears! Undo does not bring it back.
     
  42. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Could you try this for me:
    Create the FFD and select a couple of the controls and see the vert number (in the inspector) and see if they have different numbers or if they are all 0. They all being zero is whats causing the FFD to break when you skin it - as the controls need their vert number to work out how to skin to the bones.

    The funny thing is that for the other guy the issue just stopped happening. So I haven't manage to work out how to reproduce the bug of it setting all the vert indexes to zero.
    If thats what is happening to you could you record yourself making an FFD, making sure to show the console, as well as the hierarchy.

    Also could you try it in a fresh project and scene to see if you get the same result.
     
  43. Grafos

    Grafos

    Joined:
    Aug 30, 2011
    Posts:
    231
    The project is fresh, it has a few imported plugin and one multi-sprite. I nevertheless tried it in another project with just pupped2D and it did not portray the same behavior. Could it be a plugin conflict?

    The vertex numbers are indeed all 0.
    There is nothing to see in the console, there is no error message.

    I have to get some sleep, I'll see what I can do about your recording request tomorrow
     
  44. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Possibly. Or maybe its something that has previously errored in your rig that is silently breaking future FFDs.

    Could you try a fresh scene in your project and see if you have the same issue with vert number 0. If you do then I would start to suspect that its a plugin conflict thing.
     
  45. Zoub

    Zoub

    Joined:
    Jan 14, 2016
    Posts:
    7
    Thank you for your help

    i was only scaling x,y really do appreciate the quick support
     
  46. Grafos

    Grafos

    Joined:
    Aug 30, 2011
    Posts:
    231
    Hi, I did what you suggested and it works fine. I'll let you know if the issue comes up again. Thanks!
     
  47. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    985
    Can you keep an eye on the FFD controls vert number - and if you get it set to zero again let me know what you just did. I want to get to the bottom of why thats happening.
     
    Grafos likes this.
  48. wladm

    wladm

    Joined:
    Oct 4, 2015
    Posts:
    7
    Just got this and it seems like such a terrific tool. I wanted to ask, is there a way to animate individual bones without having to use IK controls?
     
  49. Grafos

    Grafos

    Joined:
    Aug 30, 2011
    Posts:
    231
    You can animate the bones directly, you don't have to use IK if you don't want to
     
  50. anilo

    anilo

    Joined:
    Feb 7, 2013
    Posts:
    31
    Bind Smooth Skin Problems

    I was simply trying to bind skin to torso bone for my stickman character.
    See video here:
    http://screencast.com/t/5IFpt9qhwujb

    First I converted the Torso sprite to Mesh.

    The newly converted Sprite to Mesh is actually pink in color
    AND
    The original black sprite is still visible.

    Next I wanted to "Bind Smooth Skin" so :
    1) I selected the Bones, then
    2) I selected the new Torso Mesh and clicked on "Bind Smooth Skin".

    This binds the new pink torso to the bones.... which sucks because I wanted to bind the black torso to the bones.

    Not sure how I can bend the black torso as well when I rotate around the hip and spine.

    Let me know if you think I am doing something wrong.
    This is my first time playing with the Skinning options and would appreciate some help.