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:
    987
    Is this a sprite uve managed to convert in the past?
    At any rate I have a newer version for u, that has a much better sprite to mesh conversion.
    Please email me ur invoice number and Ill send it to u.
     
  2. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    No, it was a new sprite for tests...
    I sent you a PM with my e-mail address.

    Thanks a lot,
    6R
     
  3. eddie312

    eddie312

    Joined:
    Sep 13, 2012
    Posts:
    24
    looks very nice !
    Do the plugin make possible to create a rig and some animations and use it with other sprites of the same type ?
     
  4. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    Yes! You can switch the sprites to anything - and keep all the animations on different looking characters - you could even keyframe this switching - (see the end of this tutorial for an example) http://www.puppet2d.com/#!tutorials/c1kqr
     
  5. eddie312

    eddie312

    Joined:
    Sep 13, 2012
    Posts:
    24
    thanks for the answer.

    what about if one of the part of the player is convert to mesh and is no longer a sprite ?
    the only way is to change the material ? can we reset the mesh at runtime ( one time at the start of a game)?
     
  6. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    Mesh switching isn't as straight forward. I'm yet to research ways to do this... I'm not sure I would convert the sprite to a mesh and skin it to the bones at run time (at the start of the game) as u cant guarantee the skinning will be perfected. Perhaps you could pre skin the meshes to bones, and load these as prefabs which your code could reconnect to the controls - this way you could load them even during gameplay. I'll need to experiment to see if this is a good solution.
     
  7. ctha

    ctha

    Joined:
    Jan 13, 2014
    Posts:
    1
    Hi, is it possible, to connect and animate more than 3 bones for example like a snake. When I create more bones, only two last bones are moving. thanks for the reply
     
  8. msbranin

    msbranin

    Joined:
    Jan 19, 2009
    Posts:
    104
    Is puppet 2D Comparable to Smoothmoves? Same concept?
     
  9. johnny12345

    johnny12345

    Joined:
    Oct 8, 2012
    Posts:
    45
    is it possible to swap out parts,like having different hands and heads for different purposes, or even weapons ,adding bones to weapons and changing weapons.
    could I create all the animations then remove puppet as I'm thinking of creating characters, animating them and selling them on the asset store so id need to remove puppet from the package thanks

    thanks
     
  10. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    Ik controls work on 3 bone chains. Most likely Ull want to use orient controls for each of a snakes bones.
    There may be a way to link multiple ik controls together. Puppet2d is a rigging tool so there are probably ways to use it I haven't tried yet :)
     
  11. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    Puppet2d is devoted purely to skeletal animation. It makes use of Unitys now well developed animation editors.
     
  12. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    If u animate the bones directly u could sell on the asset store as long as u remove the rest of puppet2d scripts. Making use of puppet2ds controls would be more problematic. But I am looking to make a animation bake button to remove the controls. When ive made this feature ull be able to use the controls to animate and remove them for the asset store.
     
  13. johnny12345

    johnny12345

    Joined:
    Oct 8, 2012
    Posts:
    45
    ive just bought it anyway this kit is a steal at this price and im looking forward to some good updates but yeah bake animation would be cool then I could remove your scripts

    thanks
     
  14. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    On this video you can see a complex rigging on hands and feet too :



    6R
     
  15. johnny12345

    johnny12345

    Joined:
    Oct 8, 2012
    Posts:
    45
    Anyway this could work with mechanim
     
  16. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    I think it works with the basic mecanim animation - so u can have mecanim clips in the animator, and do transitions and things. Have you tried it out? How does it it behave?
     
  17. johnny12345

    johnny12345

    Joined:
    Oct 8, 2012
    Posts:
    45
    i'm hoping it'll work with 2d platform controller which uses mechanim once im at that stage ill let you know

    i just created a quick character while adding the bones some don't show especially the head bone and now ive started creating the bones the left arm bone isn't showing now

    answer = i missed the first part of your tutorial explaining about putting bones and controllers in sorting layers thanks

    another question
    when converting my leg sprite to a mesh it squashes it to the point i cant even see it,i did resize my sprites
     
    Last edited: Jan 26, 2014
  18. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    For my knight above, I have used mechanim and it works fine !!!

    6R
     
  19. eddie312

    eddie312

    Joined:
    Sep 13, 2012
    Posts:
    24
    An other question

    i'm currently using puppet 2d in order to animate my character who is in a 3d space and when i change is reference rotation the player controler are moving strangly on the z axis and broke the motion.

    the is the same probleme for exemple if i want to flip the character in order to use the same run motion for left run and right run
     
    Last edited: Jan 27, 2014
  20. johnny12345

    johnny12345

    Joined:
    Oct 8, 2012
    Posts:
    45
    Thanks @p6r anyone else had issues with converting sprites to meshes
     
  21. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    Is the local scale at 1,1,1 when you convert it to a mesh?
     
  22. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    Puppet2D is designed to work in the XY plane...
    have you got v1.4? There is a flip checkbox on the global_CTRL :)
     
  23. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    @ johnny12345 :
    Yes... I have issues too with the conversion into a mesh.
    2 "solutions" I have found :
    * If the mesh "disappears" or isn't complete, simply do Ctrl-Z and convert again ! The second time is OK !
    * If the sprite refuses to be converted and Untiy adds a "New GameObject" in the hierarchy and a collider in the inspector, try to modify the selection rectangle in the sprite editor. : simply make it bigger than the sprite (automatically sliced by the editor !). It works for the most sprites that had issues with conversion. Only one time I couldn't convert a sprite into a mesh with this system.
    Let me know if it works for you too or if you find another way to slove this...

    Hope it helps...
    6R
     
  24. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    I have added a video with a rigged gorilla for funny animations made with Puppet2D...

    Then I have added a 2D polygon collider to the "head" bone (with an orient control ! Doens't work with a IK control for example !) for collisions. I gave it the shape of the head. As you can see it is following the rotation of the head.



    6R
     
  25. johnny12345

    johnny12345

    Joined:
    Oct 8, 2012
    Posts:
    45
    i didn't have my local scale set to 1,1,1 i reduced my character down to 1,1,1 it converted fine thanks guys

    when converting the sprite you lose the Order in Layer option so how do we control the Zdepth

    thanks
     
    Last edited: Jan 27, 2014
  26. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    Thats something ill be fixing, in the meantime u should use the z value of the mesh to move it below the bones.
     
  27. eddie312

    eddie312

    Joined:
    Sep 13, 2012
    Posts:
    24
    "Puppet2D is designed to work in the XY plane..."

    I manage to do it in a 3D space!
    I made a scrip that change the AimDirection of the IK controller with the forward vector of the camera.

    "have you got v1.4? There is a flip checkbox on the global_CTRL "
    Yes and this is working very well thanks a lot
     
  28. eddie312

    eddie312

    Joined:
    Sep 13, 2012
    Posts:
    24
    Found a way to improve CPU speed In Puppet2D_GlobalControl.Cs Update Fonction this code

    PHP:
            foreach(SpriteRenderer ctrl in _Controls)
            {            if(
    ctrl)
                   
    ctrl.enabled ControlsVisiblity;
            }
            foreach(
    SpriteRenderer bone in _Bones)
            {
                if(
    bone)
                    
    bone.enabled BonesVisiblity;
            }
    this code is only needed on editor and take some performances
     
  29. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    Excellent -ill add it to the package. Have u by any chance got the code for changing the plane - im thinking that would be cool to add to the package as well - perhaps as a drop down in the GUI :)
     
  30. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    I just bought the asset and overall it seems good, however I'm struggling A LOT with the handles (IK controls, bones, etc). Their size is all over the place some times being VERY large (out of view) and sometimes working correctly.

    I know I can adjust the size on the panel, but most of the times on the minimum it's still too large (for example - https://www.dropbox.com/s/5cl5xviojdi4ljr/Screenshot 2014-02-01 01.23.55.png)

    Is there any way to circumvent this? I'm using the default size of 100 pixels/meter for my sprites.
     
  31. jimym

    jimym

    Joined:
    Apr 13, 2013
    Posts:
    8
    Hi
    I noticed you have controls for IK parent and orientation.
    what if i wanted to animate the scale of character parts.
    I guess I wouldn't use a control but would key frame the scale of individual bones?

    If I wanted to blend a walk animation into a run animation.
    How would I do this ?
    could I weight this.
    would I use Mechanim or are there other ways in unity to blend animations with say 20% walk 80% run ?

    program looks great so far.

    Thanks
     
    Last edited: Feb 1, 2014
  32. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    This is certainly on my list to improve, in the meantime you can change the size of the controls manually by locating the Textures in the GUI folder and changing the pixels to Units in the inspector.
     
    TheWarper likes this.
  33. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    I've been meaning to add scale on the parent and orient controls, if u email me ur invoice number ill send it to u before the asset gets updated.

    The best way to blend animations is to use the mechanim system
     
  34. jimym

    jimym

    Joined:
    Apr 13, 2013
    Posts:
    8
    Thanks for your reply.
    I am going to buy today.
    :)
     
  35. S37H

    S37H

    Joined:
    Apr 1, 2012
    Posts:
    25
    Does the IK work with just a single joint or could I possibly use it on something with more joints like a tentacle?

    Is there a "preferred angle" for the IK so it doesn't accidentally flip, or some kind of pole constraint to help prevent that?

    Can you swap sprite cards mid-animation?

    Thanks!
     
  36. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    IK controls work on 3 joint chains like arms or legs. Longer chains will require either using orient controls or u can actually parent Ik controls to each other - but that will take some experimentation.

    IK controls have a clever polevector which stays out in front, with a flip checkbox to reverse if u want (u can animate it) I adapted this feature from my Maya rigging knowledge as it its usually a pain to have to keep track of ur polevectors - and there is no need to in 2d as well!

    Swapping sprite cards works well as feature in unity - its a feature that goes hand in hand with Puppet2d. The nice thing about animating sprite swapping is u see the visual keyframes in the dope sheet. (Btw u cant at the moment animate mesh sprite switching - its on my list)
     
  37. Vinkie

    Vinkie

    Joined:
    Oct 24, 2012
    Posts:
    2
    Hi Jamie

    I just bought Puppet2D but i get a list of errors when i import it, and i dont know whats wrong.
    i tried re downloading it and importing it again but still the same result.
    my unity is up to date and im running the free version on windows 7.
    $PuppetError.png
     
  38. Vinkie

    Vinkie

    Joined:
    Oct 24, 2012
    Posts:
    2
    Sorry, i fixed it, i had another extension installed similar to puppet2D, seems they were conflicting.
     
  39. S37H

    S37H

    Joined:
    Apr 1, 2012
    Posts:
    25
    Ah I had the same issue! Thanks for the fix Vinkie. - it was the Sprites and Bones plugin.
     
  40. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    Would it be possible to have a character animation running (for example) and then by scripting make the character's torso rotate slightly so it aims up and down?
     
  41. S37H

    S37H

    Joined:
    Apr 1, 2012
    Posts:
    25
    jamieniman, if you happen to have a method of modifying an animation during run time to assist IK foot placement on an uneven surface, that would be awesome - if not, no worries. I think I have some ideas using raycasting to determine rotation and placement and then I just need to see if I can add it in late update in a way that it still sort of uses the current animation, just tweaks it.

    Also, do you have any thoughts as to anything you hope to add to this system in the future? If you've seen the Ubi Art Framework, some simple cage deformers that could be placed (probably parented to bones) would be really awesome for the precise squash and stretch potential.
     
  42. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    Haven't tried anything with foot placement, id love to hear how u get on with it.

    The cage thing is known as ffd, and is on the agenda probably after ive fully polished things and added some really useful features that are simpler to do such as mesh combining and animation baking
     
  43. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
  44. charlielee

    charlielee

    Joined:
    Apr 21, 2013
    Posts:
    8
    How to work with 3D Max for IK anmation If I don't wanna work with Unity's animation tool ?
    Is it possible ?
     
  45. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    Puppet2d is designed to be used inside unity, u can create the mesh in 3d max and skin it to the bones in puppet2d, but animation will need to be done in unity.
    Since 4.3 unitys animation editor has improved drastically with the dopesheet. You can see keyframes of sprites u switch mid animation. Id def recommend playing around with it.
     
  46. charlielee

    charlielee

    Joined:
    Apr 21, 2013
    Posts:
    8
    I really appreciate your advice.
    I'll try playing around with Unity !
    Thanks again.
     
  47. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    987
    I've done a few updates which I'm going to be submitting to Unity as v1.5 - as usual if you'd like these earlier email me with the Invoice Number and Ill send it to u:

    - Mesh Combining checkbox on Global_CTRL, this will combine all the skinned meshes into 1 drawcall.
    - Control Bone Sizing improvement
    - Ability to Scale Bones via Controls
    - Convert to mesh keeps layer sorting layer info
    - Undo Converting sprite with polygon2dcollider to mesh no longer deletes mesh
    - Convert mesh has a more intelligent asset creation, asking you if you want to overwrite previous mesh material
     
    Last edited: Feb 4, 2014
  48. funshark

    funshark

    Joined:
    Mar 24, 2009
    Posts:
    225
    Nice :)
     
  49. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    Nice! Another thing I'd suggest is to allow to change the transparency of the bones/controls. I had to edit Puppet2d textures directly in Photoshop so I could see better the prop I'm animating.
     
  50. charlielee

    charlielee

    Joined:
    Apr 21, 2013
    Posts:
    8
    I want to know whether Puppet2D support scale bones.
    Do you ?
     
    Last edited: Feb 5, 2014