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

PuppetMaster - Advanced Character Physics Tool [RELEASED]

Discussion in 'Assets and Asset Store' started by Partel-Lang, Oct 1, 2015.

  1. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hello everyone!

    I am very proud to present you with PuppetMaster, an advanced character physics tool making it's way towards the Asset Store. Alongside it's kinematic brother Final IK, it is the missing link in professional production quality procedural animation tools available to Unity.

    What can we do with PuppetMaster?

    Create active ragdolls that can follow the character's animation using muscle forces and/or physically pinning the ragdoll bones to their animated targets.


    Simply continue animating your characters after they have fallen/died. In the GIF below, the character's animation (represented by the cyan skeleton) is simply cross-faded between two animation states, based on the ragdoll's height from the ground.


    Determine muscle/pinning properties for each individual muscle or muscle group. In the following sequence, the upper body was released to muscle animation only while the lower body remained pinned to the animation in world space.


    The same logic applied to 2 characters...


    The animated puppet can also be linked to a kinematic Rigidbody using a simple Joint.


    PuppetMaster can be extended with Puppet Behaviours that provide a pattern for developing functionalities that dynamically adjust muscle and pinning weights, strength and other properties or make kinematic adjustments to the target pose. The behaviour used below (BehaviourPuppet.cs) loosens pinning on collision. If the ragdoll bones get too far from their targets, the puppet will loose balance.


    ...this behaviour can also be used on more complex character controllers. Triggering falling/getting up animations is also handled automatically by the BehaviourPuppet.


    The video above in more length and better quality:


    And the full overview video of the entire package:


    For your convenience, PuppetMaster also contains tools for automatic ragdoll generation and editing colliders/joints visually in the Scene View.



    Cheers,
    Pärtel
     
    Last edited: Nov 24, 2015
  2. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Looks like another great tool in the set.
     
    hopeful and Partel-Lang like this.
  3. one_one

    one_one

    Joined:
    May 20, 2013
    Posts:
    621
    Hi Pärtel, that looks great! I especially liked seeing it combined with IK. But where do you see the differences between your product and kavorka's PBC?
     
  4. mensch-mueller

    mensch-mueller

    Joined:
    Nov 25, 2014
    Posts:
    156
    Hi Pärtel,
    This seemed like a nice complement to FinalIK.
    It would be nice if FinalIK users can upgrade to this asset ;) (like RTP users to Uber).

    Wish you a great success and good luck with the remaining 5%!
    Cheers,
    Michael
     
  5. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hey, thanks! :)

    I have not used Kavorka's tool, so I'm not sure if I'm right, but the philosophical difference seems to me that PBC is some kind of a physically or at least semi-physically simulated character controller, whereas PM is more like a low level framework that you can apply to any character controller (your own or the one provided in the package). It has been designed as such to allow for expansion in the future, adding more intelligent behaviours like Stagger, CatchFall, Windmill and so forth.. There is even a template behaviour so you can make your own. :)

    Thanks for the wishes!
    It is not really a complement to FinalIK, actually it could be even thought of the other way around, they are quite similar in weight. Final IK handles the kinematics, PM handles the dynamics so they are both brothers of the same mother of procedural animation. :)
    But I've been thinking of making a "RootMotion Creative Suite" or something that incorporates both.
     
  6. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Tom Jackson, the creator of Surgeon Simulator has been helping me test this thing in their upcoming game Worlds Adrift, here's a quick example.
     
    julianr and WendelinReich like this.
  7. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,202
    Looks fantastic! When your tool creates colliders, are they standard so that I can use them with Unity 5's cloth and skinned cloth?
     
  8. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Yes, they are just standard Unity colliders.
     
  9. Invector

    Invector

    Joined:
    Jun 23, 2015
    Posts:
    966
    Ragdolls are so funny lol

    This is looking amazing! Superb job man.
     
    Partel-Lang likes this.
  10. looki666

    looki666

    Joined:
    Sep 5, 2013
    Posts:
    79
    Can character try to regain balance after its lost based on some conditions ?"
    Or can it try to grab something , when falling ?
     
  11. zalo10

    zalo10

    Joined:
    Dec 5, 2012
    Posts:
    21
    How does it look when you add a keep-upright constraint to the hip bone of an active ragdoll doing a running animation?
     
  12. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    You mean like stagger for a few steps and try to regain balance not fall down?
    This is the most complex behaviour to code, but theoretically it can be done, the framework was designed for stuff like that to be added at some point and I will definitely try in the future to make it happen.

    Grabbing something I think is much easier, can be done with IK adjustments to the target pose or stuff like hugging grab can be done with just animation.

    Bit weird. The feet would keep colliding with the ground as you'd expect, would probably be better to also keep the feet pinned to animation.
     
  13. thedreamer

    thedreamer

    Joined:
    May 13, 2013
    Posts:
    226
    Is it okay to mobile gaming? I would like to know about the mobile performance
     
  14. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    This looks cool! My obvious question is: does this only work for bipeds? I initially assumed it would be biped-specific, but other than the ragdoll-creator i didnt see any biped-specific stuff in the overview video, so now I'm hopefull :)
     
  15. looki666

    looki666

    Joined:
    Sep 5, 2013
    Posts:
    79
  16. tasadar

    tasadar

    Joined:
    Nov 23, 2010
    Posts:
    290
    This looks great Partel.
    I remember building a similar setup some time ago but there were a few problems. First, very fast animations could not be catched up by the physics system so the results looked nothing like the animations. And if an animation results high inertia movements like a butterfly kick, the results were a bit disappointing. Have you tested the system in similar cases?
    Looking forward to try it...
     
  17. keenanwoodall

    keenanwoodall

    Joined:
    May 30, 2014
    Posts:
    597
    This is kind of a silly idea, but do you think you'd consider realeasing an "Early Access" version of the asset that people could buy to test it out early? This looks absolutely fantastic!
     
  18. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Cool. Does this have Grounder like Final IK?
     
  19. zalo10

    zalo10

    Joined:
    Dec 5, 2012
    Posts:
    21
    I was more interested in seeing what would happen if the hip was also un-pinned... The idea of an active ragdoll walking around under its own motive force is really cool.

    We could then start judging different animations for their ability to actually move the character :D

    I made a java applet a little while ago to prove the concept: http://www.openprocessing.org/sketch/84256 (though Java seems to be an antiquated protocol now (I had to use IE to see it), I think you'll find it pretty interesting with respect to Puppet Master).
     
    Last edited: Oct 5, 2015
  20. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    It is OK to have a couple of active puppets. If you can have a ragdoll in your mobile device, then you can think of having an active puppet as having 2 ragdolls or something like that.

    Thanks!
    It works on any creature. The ragdoll creator is specific for bipeds (as of now), but actually it too can be quite helpful for setting up other creatures as long as they have at least 4 limbs. The RagdollEditor works on all creatures as well.

    Hey, thanks for the links, I'll take a look ;)

    It's quite OK to make fast animations when the puppet is pinned. Actually the BehaviourPuppet (which you see acting in the preview video) only blends in mapping when there is a contact, so most of the time you'll have 0 animation accuracy loss.

    It will be released as a Beta if that's what you mean. It still has a long way to evolve so you can consider it "early access" sort of.. :)

    No, but you can easily use the Grounder of Final IK with it.

    Cheers,
    Pärtel
     
  21. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Oh I see. Yes theoretically one could program such a behaviour using PuppetMaster, but it won't be easy. Normal running animation gets you nowhere, you'd need some sort of a "neural network", smart controllers and stuff like that.
    I could not open your app due to Java security reasons even if I added the site to the exception list. Would be interesting to see though.
     
  22. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    So when the character in the game falls/dies it would be switched into PuppetMaster ragdoll? How is this done? Do I just deactivate the Final IK components and switch to PuppetMaster components or something like that?
     
  23. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Final IK works on the animation of the character, PuppetMaster will just make sure the ragdoll follows. When the character falls, you can just blend out the weight of the Grounder and release the pins of the puppet so it will continue playing the animation using it's muscles.
     
    umcherrel and Nadan like this.
  24. zalo10

    zalo10

    Joined:
    Dec 5, 2012
    Posts:
    21
    The keep-upright constraint keeps it from needing to balance, but the lack of "pinning" allows it move around.


    (I drag it around; the mouse is invisible in this one)



    These are a couple examples of mine where the hip joint is kept upright and everything else is "physicalized".

    It would be cool to see this in action on a full 3D biped!
     
  25. WendelinReich

    WendelinReich

    Joined:
    Dec 22, 2011
    Posts:
    228
    Woah, thats amazing! You must have thought a bunch about how to define things like muscle space in a creature-agnostic way then. Will you explain that in your documentation, and how to make the most use of it?

    Not to put to fine a point on it, but this is the second time you out-innovate the Mecanim team...

    Anyway, I'm really looking forward to playing with the PuppetMaster beta. :D

    /Wendi
     
  26. LordBytesworth

    LordBytesworth

    Joined:
    Dec 8, 2012
    Posts:
    6
    I can't wait for this, you're doing amazing work Partel!
     
    Partel-Lang likes this.
  27. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hey, thanks for the videos!

    This is what it looked like when I just locked the angular motion of the pelvis joint in world space.

    Creating physics based locomotion that looks good and works is a lot more complicated in 3D. 2D is basically like a constraint that keeps the character up, it can't fall over around the X axis. While in 2D there are just 3 degrees of freedom, in 3D there are 6 and you'll have to keep them all under control somehow. That is a job for smart controllers, genetic algorithms and neural networks. :)

    Thanks!
    PuppetMaster does not care about who your creature is, it just has a muscle and it's target and it just converts the rotation of the target relative to the rotation of the muscle parent's target to the muscle's rotation relative to it's parent in joint space :). So basically it works on hierarchies, which could just as well be the bone structure of a creature of any kind.
    Actually, in a future version, you will probably be able to share ragdolls between multiple similar characters.
     
    Last edited: Oct 8, 2015
    WendelinReich likes this.
  28. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    UPDATE: Just finished the functional part today, it's canned. :)
    Now moving on to creating the User Manual, video tutorials and other learning materials...
     
  29. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    When ?
    Will there be a beta sale like final ik ?
    Do you have a price for it ?
     
  30. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Yes it will be released as a beta, I hope to be done in a couple of weeks. I don't have a price for it yet..

    Cheers,
    Pärtel
     
  31. SinisterMephisto

    SinisterMephisto

    Joined:
    Feb 18, 2011
    Posts:
    179
    Does it run in editor mode? I want to build a behaviour editor using this.
    In editor mode
     
  32. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hi,
    Not unless you find a way to update PhysX in editor mode.

    Pärtel
     
  33. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    ...but theoretically, one could create something like the Endorphin, if he were to line up a Mecanim AnimatorController and used events and curves to control PuppetMaster for synthesising mocap with physical behaviours and then baked the results to a new animation clip. ;)
     
  34. Elenesski

    Elenesski

    Joined:
    May 19, 2013
    Posts:
    22
    Is PuppetMaster dependent on PhysX? Is PhysX possible on non-nVidida cards?
     
  35. Brainswitch

    Brainswitch

    Joined:
    Apr 24, 2013
    Posts:
    270
    Every Unity program uses PhysX (even if it only loads), and Unity's version of PhysX runs on the CPU - it does not matter what graphics card you have.
     
  36. punchesbears

    punchesbears

    Joined:
    Oct 26, 2015
    Posts:
    4
    Hey Partel, I'm building a physics animation system that uses no traditional keyframe animations at all...only physics. I've had a rough time finding people who have a grasp on this stuff so I may hit you up with some questions sometime. I'm not building a competing asset package or anything like that. I'm just happy to find someone working on similar stuff. Looking great, Keep it up!! Some vids of my engine here if you want to have a look:

    https://twitter.com/punchesbears
     
    LudiKha likes this.
  37. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hey, always good to meet likeminded people,
    That physics based fighting sim looks fun! :) Looks like something we discussed with Zalo10 earlier, muscle animation with the hip's position and rotation constrained?
     
  38. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Just finished the first tutorial video, about creating and editing ragdolls.
     
  39. SinisterMephisto

    SinisterMephisto

    Joined:
    Feb 18, 2011
    Posts:
    179
    That's actually the easy part.
     
  40. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    OK, I have no idea how, but if you can do that, then I'll have to make PM work in editor mode, shouldn't be too difficult.
     
  41. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    One more tutorial
     
  42. randerline

    randerline

    Joined:
    Aug 16, 2010
    Posts:
    10
    Looks great! Any news regarding the release date?
     
  43. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Thanks! yes if all goes well, I'll submit it for review tomorrow :)
     
    cdfru472 and hopeful like this.
  44. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    This should be fun! =) What did you decide for price?
     
  45. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    628
    Looks really interesting!!! Let us all know when its submitted and the price, also will it be released as a BETA product as per Final IK during its development?
     
  46. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    New tutorial :)


    I was thinking the same as Final IK (90 bucks). It's not quite as big as FIK, but more of a niche thing probably.

    Yes, it will be the same as was with Final IK, there is much room for further development.
     
    EvilFox and cdfru472 like this.
  47. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
  48. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    @Partel Lang

    I have a request. Would you be willing to allow FinalIK users to upgrade to PuppetMaster for a slight discount. Sort of a loyalty discount for those of us who have purchased FinalIK already?

    I love your stuff, but I am on a budget like most people.

    Thanks for your time.
     
    recon0303 likes this.
  49. punkouter2019

    punkouter2019

    Joined:
    Jul 28, 2013
    Posts:
    170
    SO how long before someone attempts a one on one fighting game with this ? I like that sumo game.. I forget the name.

    It seems the big missing piece in these tools is the neural network to learn how to balance right? And it seems that also the most complex part ..

    Why don't the euphoria guys ever release a unity asset ?
     
    Last edited: Oct 30, 2015
  50. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    I would, but the publisher backend of the Store does not support that kind of stuff.
    I've also been thinking of making something like "RootMotion Studio" or "RootMotion Creative Suite" that includes all of my work and would be cheaper than getting everything separately, also easier to import.

    I can't deny that it has been a major influence and inspiration. ;)
     
    Lohrion and WendelinReich like this.