Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Puppet2D - An advanced skeletal animation tool

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

  1. timothyallan

    timothyallan

    Joined:
    May 22, 2013
    Posts:
    72
    Just to further my issues with combine mesh, it works fine only if I set the Num Skin Bones to 1 instead of 2. In the video, I map the bones using Num Skin Bones 2, then undo it and re-do it with 1 so you can see how broken things get. I also tried using the Skinned Mesh Combiner CSharp script as recommended above, and it behaves the same if I set the Num Skin Bones to 2.

    This is the only version of Puppet2D I've tried, so I don't know if this is normal, and there's nothing in the docs about what Num Skin Bones is other than "choose the skinning value to be 1 or 2"

    This happens regardless of the number of bones I actually have selected when I click Bind Smooth Skin.

     
  2. PabloAM

    PabloAM

    Joined:
    Dec 25, 2012
    Posts:
    35
    Hello, I´m going to buy it but I have a question before.

    If I create a mesh, will it keep the Z position with NGUI panels? I mean, I would like to add a animation in front of a panel (Button animation) and PJ animation behind that panel.
    Does it keep Z layers or depth layers like other NGUI element?

    Thanks!
     
  3. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Could you try setting your blend weights to 2 bones in the quality settings, and see if that fixes it
    http://docs.unity3d.com/Manual/class-QualitySettings.html
     
  4. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    I'm not exactly clear on what you're trying to do with this? (I'm not 100% clear what ur asking?)
     
  5. timothyallan

    timothyallan

    Joined:
    May 22, 2013
    Posts:
    72
    Yep, that has fixed it up. Thanks for the suggestion.

    However, if that messes up other things I have going on in my project, is that the only solution?
     
  6. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    If you recreate the IK handles and give them the same name and hierachy as the previous ones, the animation should still work (as the IK handles start from a zero local position, they should keep the same general movement from a new offsetted positon as well)
     
  7. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Erm,
    I should have put this in the combine meshes code to change it in the skinnedMeshRenderer itself (To set the quality to 2 bones) You can set this yourself in code - just it needs to happen after the combine meshes function has been executed.

    (I've added this to my bug list now)
     
  8. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    What you'll need is something to change the vertex colour of the mesh. If you take a look at the Puppet2D_SortingLayerEditor.cs script - theres a bit where I you can change the UV offset of the mesh. If you add a line here to change the colour that could work. ( http://docs.unity3d.com/ScriptReference/Mesh-colors.html )
    this is an interseting issue - I wonder if it has something to do with mipmapping with textures, I'll need to investigate it.
     
  9. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,080
    Thanks for the reply, but what about the usage of other shaders?
     
  10. Nyxo

    Nyxo

    Joined:
    Mar 12, 2013
    Posts:
    19
    Hi jamieniman,

    The high level of what I'm doing is IK-based foot placement, for things like stairs, slopes, etc..
    The specific issue I'm having, however, is performing a specific calculation within the scope of the IK that exists in Puppet2D.

    As I understand it, the only way to achieve foot placement would be by moving the IK handles, as opposed to the actual Transforms of the feet. This would maintain the IK relationship between the hip, knee, and ankle/foot bones, allowing the leg to look like it's moving naturally (as opposed to getting separated or some such). Correct me if I'm wrong on this assumption, but so far doing this has provided me with the results I've been looking for.

    However, in order to calculate exactly where the foot needs to be placed, I can't use the IK handles, as they don't map directly to a visible position on the foot in a way that's meaningful to foot placement. The calculation needs a transform that will always be exactly on the bottom of the foot, regardless of the various rotations that the IK chain Transforms are at.



    In the above image, you can see where the IK handles for the feet are, and the pink crosses represent where I need to read the actual foot positions for proper foot placement. The reason I can't just use the IK handle position with an offset, is because of the rotations that get applied all the way along the IK chain. I've dealt with this quite easily by simply adding an empty GO as a child of the foot.

    So what I have now, is a normal transform (at the pink cross) that I'm using to calculate where the foot currently is, and where it needs to move to. I've done this, and I now have a Vector3 representing the offset I need to apply to the Transform at that pink cross.

    The problem is that I can't just blindly apply that offset to the Transforms of the leg, because of the IK chain. In order to properly maintain the benefits of the IK, I need to move the IK handle, not a normal Transform. And I can't move the IK handle by the amount I calculated for the Transform at the pink cross, because the IK handle isn't in the same position as the pink cross Transform, so it won't result in the pink cross Transform being put in the correct position (because the IK chain applies rotations all along it's length)

    So what I'm looking for, is a way that I can take this offset I have for the pink cross Transform, and somehow calculate how much I need to move the IK handle so that it will result in the pink cross Transform moving by that exact offset.




    For example, in the image above, say I wanted to move the foot on the left straight up by 0.1 units. How do I achieve that exact movement by instead moving the IK handle? I can't just move the IK handle straight up 0.1 units, because the rotations of the IK chain would result in a difference of position for the pink cross Transform that is not 0.1.

    I hope this explains my problem better~
     
  11. PabloAM

    PabloAM

    Joined:
    Dec 25, 2012
    Posts:
    35
    Hello again, I have finally bought it. But I have a big problem :S

    I have done a skeleton has you can see in the screenshot, but when I try to add new IK controller debug says:
    "bone_2 already has an IK control".
    It´s a double bug, because I have chosen "bone_15" don´t "bone_2" and it doesn´t have any IK controller.

    I have tested with Unity5.1.1 and 5.0 with sames results.

    What could it be?


    Thanks in advanced! :)
     

    Attached Files:

  12. dreamhead

    dreamhead

    Joined:
    Apr 15, 2010
    Posts:
    124
    hi there i just started using puppet2d and got everything rigged but when i want to ainmete i can only animate one bone per time in the animation timeline of unity like you see in de clip,how can i fix this?
    thanks in advance

     
  13. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    There is most likely a way to do it that way, I'd need to really delve into it to work it out. Perhaps instead can I suggest looking up this important rigging concept called reverse foot . This is a technique where you make a reverse bone hierachy, essentially to allow you to rotate from the ankle as well as the ball of the foot (or toe).
    Try this tutorial http://www.rigging101.com/free/reversefootlock/index.htm

    *Edit*

    On second thoughts - trying do make a whole reverse foot would be a bit overkill. Instead do something like the following:
    1. duplicate the ik control with its parent gameObject
    2.remove the ik script from this duplicate.
    3. Move its parent to the bottom and back of the heel.
    4.Parent the original IK_CTRL_GRP to this control
    5.Remove the sprite renderer from the original control, as you wont need it

    You should then be able to animate and do ground movement from a good location (its better place to animate the leg any way)
     
    Last edited: Jul 1, 2015
  14. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Hi, cute character! You need to make sure you put the animator component on the global_CTRL and remove it from all the other controls. (In the future the first things you should do when making a character is make sure the global_CTRL has an animator and a animatorController)
     
  15. martibergoglio

    martibergoglio

    Joined:
    May 28, 2015
    Posts:
    14
    Hi men,

    Me and my team bought puppet2d for a project we are making now, im in charge of the characters animations, we use cartoon characters so i have very small legs and arms, in the past few days i was testing a lot of combinations for the rigging and skinning and still can´t find the perfect way to do my animations the best way. I need an advice, can i select 2 sprites together (arm and hand) and convert to mesh and then use Bind smooth skin with it´s three bones (shoulder, elbow and wrist)? the behavior is the same as if i used only 1 sprite?
     
  16. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    439
    Hi, is this asset been on sale for awhile or plan to? I know you have no control over it, but I know some have no plans to be on sale, the reason I ask, I hate buying an asset just for it to go on sale a week later. Thanks..


    Also I been debating about buying this asset for awhile now.

    I own Spine I do not have the Pro,since its to expensive.
    Can anyone tell me the Pro and Cons vs Spine, and Puppet 2D, Please no bashing of either product, I like great Pros and Cons, i'm a small Indie company, this is not for a hobby.

    I already , spent money on non sense, no support assets, and frankly getting tired of being burned, so I like some honest opinions only by people who used either or both products, please.

    Thanks in advance,

    \PS: Again, don't reply with bashing or this program sucks, this is not helpful.
     
  17. martibergoglio

    martibergoglio

    Joined:
    May 28, 2015
    Posts:
    14
    I have an issue now, i use SourceTree and merged the master branch into my personal branch with one new scene and now i realize that all my scenes with characters ready for animation looses the controls (parent control, oriented control, etc...) can anybody help me?
     
  18. dreamhead

    dreamhead

    Joined:
    Apr 15, 2010
    Posts:
    124
    thx i got it working, great tool bwt :D
     
  19. dreamhead

    dreamhead

    Joined:
    Apr 15, 2010
    Posts:
    124
    and i got a other question about the animation,how do i make multiple animation for one character do i just put in one timeline and cut it from there in separated animation pieces?

    thanks in advance
     
  20. PabloAM

    PabloAM

    Joined:
    Dec 25, 2012
    Posts:
    35
    Hello, After days testing it. Finally doesn´t works for I want.

    Meshes doesn´t work with NGUI sprites, and the game is done 100% with NGUI.

    How could I get a refund?

    Thanks!
     
  21. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Sure, I believe you can parent NGUI sprites to bones - but if you want mesh skinning you will need to convert them to meshes via Unity Sprites.

    Please send your invoice# to puppet2d@gmail.com and I'll get a refund sorted
     
  22. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    So what you're looking for is 2 bone feet eg thigh>foot (ordinary foot ik is 3 bones eg thigh>knee>foot)
    Either use an IK, set it to multi sprite and then the number of bones to 2 (so it will just be a bone aiming at the foot).
    Or you can use spline controls, set only 1 bone and click to create a control at the thigh and foot. This will also allow the foot to stretch keeping it rooted to the floor
     
  23. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Do the controls have scripts? Is the global_CTRL script enabled and does it have references to all the controls?
     
  24. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    No, you can create multiple clips from the animation window. Make sure there is only one animator component only on the global_CTRL with a animator controller attached to it. Then as you create the animation clips they will appear in this animator controller. If you look up mechanim tutorials you can see how to work with these clips
     
  25. martibergoglio

    martibergoglio

    Joined:
    May 28, 2015
    Posts:
    14
    This is the scene now, the Controls are not visibles.
    bad.jpg
    Do you see something wrong?
     
  26. martibergoglio

    martibergoglio

    Joined:
    May 28, 2015
    Posts:
    14
    i will try it but now i can´t because for the same problem with SourceTree, i don´t know what happen but puppet2d stop working, you can see by yourself:


    Edit 1: I was looking for what might be the problem and i found that for eg the bone_1_CTRL have not cheked the Sprite Renderer and in Sprite line says Sprite Missing...

    Edit 2: i hade to reverse the commit and create a new branch from the latest thar worked ok, i don´t know what happend...
     
    Last edited: Jul 8, 2015
  27. PabloAM

    PabloAM

    Joined:
    Dec 25, 2012
    Posts:
    35
    I could wait if you are going to add that feature in the future :)

    Thanks!
     
  28. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    439

    Wow I guess this has no pros ?? being ignored is a bad sign, thanks anyways .
     
  29. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Ha ha, i didn't reply cos it sounded like you were asking for the opinion of p2d users not the developer!
     
  30. timothyallan

    timothyallan

    Joined:
    May 22, 2013
    Posts:
    72
    How is everyone using colliders with P2D animations? Mesh colliders (or any others) don't animate with the mesh, all colliders vanish if "Combine Meshes" is used... Is primitives on bones the primary method?
     
  31. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    439

    actually both... the sale part was for you, other parts were others, sorry I should of said that,
     
  32. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    As you said, I don't have any control over when Unity puts it on sale. (I don't even get an email letting me know they've done it! Though I always appreciate it when they do put it on sale)

    I don't have any plans on doing a private sale at the moment though. My apologies if you choose to buy it and Unity do a 50% sale the next day!
     
  33. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Yes, I recommend putting the colliders on the bones when using combineMeshes.
    Also, you correctly pointed out unfortunately unity's mesh colliders don't deform with skinnedMeshRenderers.
     
  34. Keith90

    Keith90

    Joined:
    Sep 27, 2013
    Posts:
    116
    Hello,

    I currently have an issue with Puppet2D and joints that hopefully you or someone can figure out.

    I made a character and rigged him up with Puppet2D. I added hingejoints to each limb so that way on a press of a button, it acts like a ragdoll. It works fine except for when the character is flipped, then the joints are all off and act weird. Does anyone know a solution for this?

    Thanks for your time.

    - Keith
     
  35. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    439
    ya surprised it never made it on the 2d sale,..which I thought was silly. anyways I will buy soon anyways. finishing another games soon as its done I will pick it up, right now i'm making a 3D game so it useless to me right now.. so hopefully it will go on sale soon.

    But have Spine and wanted input from users but seems like no one has Spine or used it before.. just tired of wasting money on assets...
     
  36. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Hinge Joints most likely don't work well with the way I do the flip. I would imagine if you are doing ragdoll you should anyway disable the global_CTRL. Then you'll need to find a way to flip the character without it breaking the hinges. See if scaling -1 in the X works.
     
  37. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Yeah I would have liked it to have made the 2d sale, but never mind :)
     
  38. Keith90

    Keith90

    Joined:
    Sep 27, 2013
    Posts:
    116
    There's no wasting money with this asset. It works quite well and as you can see, the support is great, plus the tutorials are awesome. :)


    I'll be sure to give that a shot. I'll just disable the global_CTRL and do the -1 scaling. Hopefully at works well. Thanks. :)
     
  39. dreamhead

    dreamhead

    Joined:
    Apr 15, 2010
    Posts:
    124
    hey
    is there a way to add sprite animations on top of the rig like blinking eyes or something like that?
     
  40. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    For eyes the simplest thing is to use sprites parented to bones. You can switch the sprite in the animations, and each time you switch it you'll see the sprite as a keyframe in the animation.
     
  41. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Thanks!
     
  42. nqnam

    nqnam

    Joined:
    Sep 20, 2013
    Posts:
    2
    I have problem at very beginning of using Puppet2D.Namely : I cannot use create bone tool , and my screen is quite different from that one in youtube tutorial.(select can I only the default , not control)
     
  43. Collrain

    Collrain

    Joined:
    Oct 27, 2012
    Posts:
    45
    Hello, I update my project to 5.1.1f, during the process I seem to have lost the pole vectors and top, middle and bottom joint vectors for my character. If I manually try to reassign them in the ....._CTRL's it results in the animations all being messed up. Is there any way I can rectify the issue when upgrading? I have a backup in in 5.0.1 which still works, what's the best way to upgrade the project, or export the working prefab and import into 5.1.1f? Any help would be great, also I love puppet2d its an awesome addon.
     
  44. dreamhead

    dreamhead

    Joined:
    Apr 15, 2010
    Posts:
    124
    so they they need a seperate animator file for they eyes ? like you see in the movie clip

     
  45. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    You need to set up the sorting layers first (top right of Unity)

    The puppet2d GUI has been improved a lot since that original tutorial - but the features that tutorial teaches haven't changed dramatically
     
  46. mogwhy

    mogwhy

    Joined:
    Nov 20, 2014
    Posts:
    36
    hi,
    i have a side facing character.
    flipping in playmode doesn't work. in edit mode flip works and the animations.

    on flip: the converted meshes disapear completely and the other sprites break somehow. pupils disappear, arrangement on the z axis breaks and the sprites are not fliped.

    i did try to delete the Library Folder to reload assets, but it had no effect.

    refresh global controls, last update, .. didn't help and i don't use mipmaps on the character.

    but as said only in playmode
    preview animation and fliping works while editing

    FOUND the problem (5 hours jippiii).
    There was one animation (NOT EVEN ACTIVE) where it changed the transform position of the Global_CTRL. the problem is: also a rotation animation track was added.
    Having an animation somewhere linked in the controller which changes the rotation of the Global_CTRL, is enough to break the flip functionality.
     
    Last edited: Jul 20, 2015
  47. Hakka

    Hakka

    Joined:
    May 20, 2013
    Posts:
    1
    Hi Jamie /o/
    We're using Puppet2D for some animations in our game, https://www.facebook.com/KawiterosGame and it's working very hella fine so far :D So thank you for making such a great plugin.
    We just have a quick question. Have you ever heard about any of your users building their game to a console (PSX, Xbox-whatever) ? And if they did, how did it go?
     
  48. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,035
    is it compatible with Windows Store Builds? (universal, windows 8.1, WP8 )
     
  49. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Is it happening when you switch unity versions or when you update puppet2d to the latest version?

    Sometimes a horrible thing happens when you update a unity asset where the script internal IDs all change and all the references to the prefabs get lost.
     
  50. jamieniman

    jamieniman

    Joined:
    Jan 7, 2013
    Posts:
    783
    Don't have a separate animator for the eyes - have one animator on the global_CTRL.

    Either animate the blinking in each of the animations. Or have a separate layer in your animator that has the blinking animation on it