1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. We’re giving 2017.1 beta testers a chance to win t-shirts and a Nintendo Switch. Read more on the blog.
    Dismiss Notice
  4. We want to know how you learned Unity! Help us by taking this quick survey and have a chance at a $25 gift card
    Dismiss Notice
  5. Unity 5.6 is now released.
    Dismiss Notice
  6. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice

PuppetMaster - Advanced Character Physics Tool [RELEASED]

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

  1. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    497
    Howdy Folks!

    I was in the private Beta testing Group for Puppetmaster and i have to tell you: buy it! even 90$ is way to less. If you want something like GTA, Gangbeasts and the Eurphoria stuff you are on the right place. Its also well integrated into FinalIK so you can do some realy awesome looking smooth Animations.

    here are some samples of what i did during the beta, hope thats okay Pärtel if i show that here?
    [​IMG]
    [​IMG]
    [​IMG]
     
    Mikael-H, Kona, -chris and 2 others like this.
  2. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    497
    I am not a vendor myself, so I don't know first hand. However, I have purchased stuff from other vendors that have done this.

    For example, if you own RTP, you get an "upgrade" discounted price for Uber (by the same vendor). And vice versa. So, if you would, could you please check with the Asset Store staff and find out how others do it?

    Thanks. It would be greatly appreciated.
     
  3. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,392
    Hey, thanks for sharing, that games looks like its gonna be mad fun! :D

    Really? I wasn't even aware of that, thanks I'll check it out for sure..

    Pärtel
     
    Dustin-Horne likes this.
  4. punkouter2

    punkouter2

    Joined:
    Jul 28, 2013
    Posts:
    162
    Basically the missing piece is the ability to create motions that are not based on canned animations right? And so far no one has done this since I suppose you need to know a lot of math or something ? I am looking forward to the day where all biped motions are algorithms
     
  5. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,392
    It's not exactly how it works, Euphoria also only blends in physics temporarily in very specific scenarios to solve a transition say between getting hit and landing on the ground. It does so by employing procedural behaviours like stagger, balance, windmill, drunk walk, basically the same way as PuppetMaster. PM just doesn't have that large variety of behaviours (yet). Anyway, it's always mocap - short physics simulation - back to mocap. We could create a physically based locomotion algorithm, but it would be terrible to control. I'm quite sure the drunk walk effect in GTA/Red Dead was developed accidentally while trying to create normal locomotion. :) But what a cool feature it made.
    Good game controls are sharp and responsive, not wobbly and slow that is realistic physical motion. Try to run as fast as you can, then turn around and continue with the same speed in just a millisecond. Game characters we are used to have supernatural power over their mass and inertia.
     
  6. punkouter2

    punkouter2

    Joined:
    Jul 28, 2013
    Posts:
    162
    So you are saying Euphoria uses procedural animations as needed but not intended for using 100% of the time since they cannot have every movement you would want (Dance the polka, Throw round house kick, etc.) ..

    And you are doing the same in that you start with the most basic procedural behaviors like just balancing and the potential is there to add more (walking, running etc.) But what I see from your tutorial your procedural balancing is not based on the ragdoll being conscious of how to balance its own joints but just on a simple threshold of attempting to be pinned to the current animation . ? I assume euphoria was more complex in that way. .maybe I'm wrong..

    But that seems to be the ultimate ability to have the biped be more self aware on what it means to perform procedural animations

    but for now what we can do is fake it enough so it seems that way..

    am I on track now ?
     
  7. punkouter2

    punkouter2

    Joined:
    Jul 28, 2013
    Posts:
    162
    I hate game controls that are sharp for the sake of being sharp if that is not realistic. That is way I always hated games like quake III.. too quick for me.. My dream is 10 years from now there will be something like a boxing game that is pure code and not animations. So far what you have is the closest thing in reach of hobby developers in 2015 from what I can tell (And maybe PBC asset)
     
  8. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,392
    Yes, correct but the thing is BehaviourPuppet (the behaviour that manages the collision and getting up stuff) is just a behaviour that you can choose to use or not to use. PuppetMaster in itself does just 2 things - animates the joints of the ragdoll and optionally also pins them to their targets. The behaviours use those functionalities to build bigger things. I have also experimented with behaviours that are conscious of how to balance their own joints without any extra forces, like this balance behaviour (that requires having Final IK, uses full body IK to adjust the target pose). But that stuff is still a subject of development. :)

    Yes, once we have that technology, we can go ahead and create real boxing robots that fight each other. It requires some kind of a learning process, so it doesn't really matter if the algorithm uses virtual or mechanical joints. :)

    Pärtel
     
  9. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,392
  10. punkouter2

    punkouter2

    Joined:
    Jul 28, 2013
    Posts:
    162
    1. I see it does balance. So how is this done then ? How do you determine the strength and direction to pull the joints in order to maintain balance? It is good you are working on these sort of things since outside of this I can't find much at all.. I feel like it is definitely the future of animation but for whatever reason there is not a lot of talk about it. So is a 'balance' behavior an example of one of many possible ones you can add to puppet master in the future?

    2. Once a biped can balance with real physics then it translates easily to the real world of robotics and I suppose there is this type of research but it is not public.

    I would think fighting games would be the prime game genre to show of this but I have only seen gang beasts
     
  11. punkouter2

    punkouter2

    Joined:
    Jul 28, 2013
    Posts:
    162
    read some of the docs..

    You have two behaviors so far it seems.. How does the BehaviorPuppet which puts the player back into standing position balance the player? Is it all physics (the hard way) or just an animation ?
     
  12. looki666

    looki666

    Joined:
    Sep 5, 2013
    Posts:
    69
    Next step would be : Dynamic Balance , Stagger , Catch fall .....etc :)?
     
  13. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,392
    1. Yes, basically the behaviour calculates the center of mass and the center of pressure from which it can find the balance vector. It will then compensate using full body IK, for example if he starts falling back I just move the body/shoulder effectors forward and rotate the feet a bit.

    2. In robotics there has been a lot more research into it, for example the work of Boston Dynamics, but yes, it's mostly not public and not too functional yet.

    It's normally just animation, but if there is a collision, BehaviourPuppet will blend in mapping and loosen the pins that were in contact (and pins adjacent to it). So if the collision was strong enough and forced the puppet too far from it's animated target, then BehaviourPuppet will switch to BehaviourFall. BehaviourFall takes care of the unbalanced puppet. If it stops flying/rolling, it will switch back to BehaviourPuppet and get up from the ground.

    Yes, I will probably start with BehaviourCatchFall. Something that would make the character try to turn towards the approaching surface and use his hands to protect from impact. That is probably fairly simple, but of course I can't guarantee I will succeed in all of that right away.
     
  14. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,392
    I made a special upgrade price for Final IK licensees, so if you think you'll need both, get Final IK first, then you can grab PM for 75 bucks. I can't make it the other way around yet, it requires for the first asset to be at least a year old.
     
  15. Viktor88

    Viktor88

    Joined:
    Apr 26, 2014
    Posts:
    3
    This tool is awesome, good job.
    I am using the Final IK Beta 0.5 Version, is this Version compatible with PuppetMaster?
     
  16. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    497
    Thank you. I've already started saving my allowance.
     
  17. punkouter2

    punkouter2

    Joined:
    Jul 28, 2013
    Posts:
    162
    Would the next level be having the biped be self learning and train itself through success and failure how to achieve things walk like here yes?



    And I assume this is mathematically 50 times more complex than what you do now.. ?
     
  18. Pheonise

    Pheonise

    Joined:
    Nov 15, 2012
    Posts:
    3
    My wallet is pressed against the screen, waiting for it to be approved in the Asset Store ;)

    I tried to emulate your original video of this from a year ago (and many times since), but never got it anywhere as good as it was back then. Seeing it now, I can't wait to add it to my arsenal and try it out with FinalIK!
     
  19. SinisterMephisto

    SinisterMephisto

    Joined:
    Feb 18, 2011
    Posts:
    175
    Is there anyway to get around pinning the character? I would like to use mostly force to keep them up right or we will end up with FIFA styled comedy
     
  20. RatherGood

    RatherGood

    Joined:
    Oct 12, 2014
    Posts:
    14
    Ahh! This is awesome. I have been working on my own version for a while when i found this. I'm always late to the party :(.

    My character controller in the works.


    My rag-doll has a rigidbody for almost every bone. Will your ragdoll system accommodate custom ragdoll configuration?
     
  21. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,392
    No, 0.5 doesn't support the latest Unity, but PM requires at least Unity 5.2.2. Before that there was no collision.impulse and there were a lot of Animator bugs in 5.1.x that have been fixed now.

    Yes I've seen simulations like that. A major problem with them has been (so far) that you can't really use it in games (unless you're making an advanced QWOP game). I mean they can walk, but changing direction, stopping, jumping and all that, I haven't seen any of them perform that yet. Thats why simulations like that are mostly used to solve transitions.

    Hi!
    Yes, you don't need to use pinning at all. You can design your own custom "forces" or constraints to keep the character up... I'm not sure what you meant by forces though.

    Hey that looks cool, skeletons are the perfect candidate for games like that.. so fun to dismember the bones. :)
    That reminds me of the history of PuppetMaster, it started with making a little skeleton-killing game back in 2011.
    Unfortunately that game was never finished because I wanted to improve the system, which led to making Final-IK and the PuppetMaster you see today being a second rewrite of the whole thing. :)

    Anyway, you don't need to have a Rigidbody for each bone, your ragdoll can be as low-res as you want. Actually you can even use a ragdoll of another character with different bone orientations, as long as the bone positions match.
     
    RatherGood likes this.
  22. punkouter2

    punkouter2

    Joined:
    Jul 28, 2013
    Posts:
    162
    I assume you could use models in games once they are trained in the same way the Kinect was trained to understand where the limbs on a person are located..

    I think what you have now is good enough to seem to be true AI.. In my case I want a simple boxing game and I want the biped to attempt to keep balance after being hit.. I do not want to decide myself if the biped should fall but instead I want the forces applied to determine that.. and as I understand that can be done with what you made..
     
  23. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    489
    so it can be any variable that determines which anim is on, on Animator (plus into ragdoll physics)? can be z-height of root, distance of obstacle etc?
    on collision by bodyParts, on collision by physicsMat... (I'd like that)
    how is that anim-editor look

    plus one idea> increase mass of bodyParts
     
  24. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,392
    For now it can be faked with BehaviourPuppet. The true balance behaviour is too raw for this kind of stuff, it's still in the "Experimental" folder (also requires Final-IK).

    You are completely to free to use any kind of AnimatorController. PuppetMaster doesn't care about the animation that is playing, it just follows the pose each frame.

    If you want to use BehaviourPuppet, you can register to the BehaviourPuppet.OnCollisionImpulse delegate to get a call each time there is a collision. You can use it to trigger animations in the Animator.
    BehaviourPuppet requires a "get up prone" and "get up supine" animation in the controller, you can use your own or the ones provided with the package.
    BehaviourFall requires an AnimatorState blend tree that blends between 2 animations (writhe and protective), again you can use your own or the ones in the package. You can just copy that blend tree to somewhere in your own AnimatorController.

    Cheers,
    Pärtel
     
  25. punkouter2

    punkouter2

    Joined:
    Jul 28, 2013
    Posts:
    162
    So exactly what functionality requires FinalIK ?
     
  26. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    489
    and this OnCollisionImpulse can identify collider tag or collider.gameObject.transform?

    so this is for if 'hit by a grenade, jump', 'if colliding w wall*, go reach for grip' etc
    *would need relative velocity or ? for condition

    how can you set the physics/musles rate in update?
    is it unpinnedMuscleWeightMlp float? muscle[1-13] (I'm using rig with spine2 and spine3, is that ok?)
    muscle[0].unpinnedMuscleWeightMlp -= 0.01f would decrease animation/physics?

    can OnCollisionImpulse be set to true/false or how does it work (Animator parameter?)
    it's only root motion if want to use animation movement, is it affected by physics too (do explosion force work on puppet) or force vectors should be counted? ok this seems like is answered: rigidbody forces affect ragdoll. so this mostly defined in mapping weight of muscles?
    there should be a trigger that notifyes BehaviourPuppet(?) if obstacle closing in. but that needs to based on tags (different reaction if rock or water, or if enemy etc)
     
    Last edited: Nov 3, 2015
  27. Viktor88

    Viktor88

    Joined:
    Apr 26, 2014
    Posts:
    3
    Can you estimate when PuppetMaster will be released at the AssetStore?
     
  28. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    333
    Partel,

    I look forward to buying this when it comes out. :)

    I've watched all of your videos and read the manual.

    I have a few questions:
    1. You mentioned BehaviourPuppet.OnCollisionImpulse delegate to get information from the ragdoll about collisions. What information will that return and how does it compare to an OnCollisionEnter (Collision collision)?
    2. If the Ragdoll can communicate collision information, what is the purpose for a collider on the standard Unity character controller that you use in your tutorial videos? Having a capsule collider on the ragdoll would seem redundant if the ragdoll can handle collision communication.
    3. You mentioned that FinalIKs Grounder can be used for footik. And that FinalIK works with the animations and PuppetMaster just follows the animation. If the ragdoll can collide and detect the ground, why would you need finalik Grounder for footik? Is there some additional functionality by using raycasts from the feet vs detecting the collision with the ragdoll colliders and having the muscle constraints handle the reaction? (Is it because a raycast can be used to predict foot placement before the feet hit the ground processing IK vs a collision with the ground that can only react? )

    Thanks
    Allan
     
  29. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    3,578
    Probably within about 2 weeks from the submission time. It's already been about one week, so I'd expect it to hit the store any time within the next week.

    (Two recent submissions I'm aware of, one took the full two weeks exactly, and the other was in the store the following day. There's just no telling in advance whether the submission will get the fast track or the slow boat.)
     
  30. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,392
    Hi, sorry for the delay,

    That balancing demo is the only thing requiring Final IK as for now.
    Also you won't be able to apply IK modifications on top of the simulated pose without Final IK, only before PuppetMaster reads.

    Yes, OnCollisionImpulse sends a MuscleCollision, which is a struct wrapping Collision among some other things, so you get all the info you need regarding the collision.

    You can change muscle props by for example
    Code (CSharp):
    1. puppetMaster.muscles[index].props.muscleWeight = something;
    or
    Code (CSharp):
    1. puppetMaster.muscles[index].props.pinWeight = something;
    There is also a higher level API, look for SetMuscleWeights(...) and SetMuscleWeightsRecursive(...).

    You can disable listening to collision events by
    Code (CSharp):
    1. puppetMaster.broadcastCollisions = false;
    BehaviourPuppet doesn't detect yet any incoming collisions. But you can do some basic raycasting yourself and just use the animator to play some kind of protective animation when about to smash into something.

    No idea, it's usually 1-2 weeks. 1 is over, but don't expect anything during the weekends.

    Hi, to answer your questions...

    1. OnCollisionImpulse sends a MuscleCollision, which is a struct wrapping Collision among some other things, so you get all the info you need regarding the collision.

    2. To ensure smooth and stable motion over the ground surface. Using ragdoll colliders only might give you unpredictable results, they will also more easily penetrate colliders because they are small, but I never actually tried it yet, might be interesting :)

    3. Without the grounder, when the Puppet is pinned, the target position of the foot ends up lower than a step in front of the character, so PuppetMaster would try to force the foot through the ground by the pinning force. If you are not using any pinning, then Grounder is not necessary.

    Cheers,
    Pärtel
     
    cdfru472 likes this.
  31. Greg-Bassett

    Greg-Bassett

    Joined:
    Jul 28, 2009
    Posts:
    552
    Excellent news! Thanks Partel, I will be buying PM as soon as its approved into the Asset Store! ;)
     
  32. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    260
    Hi!

    It does not seem right that I can only benefit from the offer only if I have the asset Final_IK from a year ago.
    I bought it about two months ago and I am very interested in your new PM tool, but I think a deal, something that the conditioning is discriminatory having Final IK from a year ago.

    I understand you have your reasons for doing so but, Could you give me any solution to this?

    I apologize for my clumsy English!

    Best regards
     
  33. treshold

    treshold

    Joined:
    Nov 9, 2013
    Posts:
    164
    I think you misunderstood what Partel was saying. IF you buy Puppetmaster first and you dont have FinalIk, then you cant get upgrade pricing for FinalIk. I have bought FinalIk couple of months ago and can't wait Puppetmaster to be available.
     
  34. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    What Partel means is that THE ASSET (FinalIK or PuppetMaster) has to be available on the store for more than a year before he can give that deal. So he can offer the 75 deal only if you purchase FinalIK first because it has been on the store for more than a year. It does not matter how long YOU have owned FinalIK, if you buy it first you can get PuppetMaster for 75.
     
  35. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    260
    It's posible. Since I not quite understand the English ...

    I hope that clarifies my doubts.
     
  36. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    260
    ahhh !!!!!!
    Perfect, now if it's clear !!! thanks for the help.
    By the way on what date it will be in the AssetStore? I've been reading up and gave the feeling that was already to buy it, but I've got now is not yet available ...
    Regards
     
  37. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    It's been "waiting to be approved" by Unity for a little over a week now. Most likely it will show up in the store this week sometime. Can't wait!

    Nobody knows how long the Unity gods will take to bless an asset. We all just wait and pray.
     
  38. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,392
    I'll go and sacrifice a virgin
     
    Dbone likes this.
  39. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,392
    No no, the asset has to at least a year old, it is a rule of the Store. Your licence can be from yesterday. :)
     
  40. sashahush

    sashahush

    Joined:
    Sep 5, 2012
    Posts:
    73
    This looks stunning! I can't wait, how much longer do i have to wait and how many more virgins do i have to sacrifice?
     
    Partel-Lang likes this.
  41. HiThatGirl

    HiThatGirl

    Joined:
    Nov 12, 2014
    Posts:
    19
    Question 1:This Plugin can together use with final ik Version1.1 ?

    Question 2: This Plugin for small objects can has good physical collisions Support? such as sacle (0.05,0.05,0.05) Cube

    In the Unity, a small object if use physical collision can be Pierce through
     
  42. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,392
    1. It will work with Final IK version 1.2 that was submitted to the Store at the same time as PuppetMaster and still pending review.

    2. This plugin uses Unity physics (PhysX), so the collisions work exactly the same way as they always have. Regarding collisions you will have to encounter the same problems as with normal ragdolls.
     
  43. Sarper-Soher

    Sarper-Soher

    Joined:
    Mar 10, 2009
    Posts:
    793
    Looks amazing, about a year ago I've sent you an e-mail asking for this feature, this will be an instant-buy for me.

    One question, would there be any problems using FinalIK with Puppetmaster in a networked game? And how much data do I have to syncronize to make sure all the clients see the exact same simulation?
     
    Partel-Lang likes this.
  44. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    345
    This looks great. Going to pick this up the moment it's on the asset store! :)
     
    Partel-Lang likes this.
  45. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,392
    It took some time, didn't it. :) I didn't expect to be that busy with Final IK.

    I'm not a big expert on networked physics, perhaps it would be easier to just sync bone localRotations while the character is in ragdoll mode. That would be about 16 Eulers per character, but physics in Unity is not deterministic, you can't expect to have the exact same results everywhere even if you feed in the exact same params. It would be like the butterfly effect.

    Cheers,
    Pärtel
     
    Sarper-Soher likes this.
  46. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    It's gonna show up on the asset store today, I can feel it...
     
    Partel-Lang and Greg-Bassett like this.
  47. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,392
    Final IK 1.2, which I submitted at the same time, was accepted yesterday.
     
    sashahush likes this.
  48. sashahush

    sashahush

    Joined:
    Sep 5, 2012
    Posts:
    73
    Waiting waiting!
     
  49. Elenesski

    Elenesski

    Joined:
    May 19, 2013
    Posts:
    21
    Insto Buy from me too ... glad I get a discount but would pay full price for it regardless.
     
  50. RickyX

    RickyX

    Joined:
    Jan 16, 2013
    Posts:
    280
    Is it on asset store yet ? How do we get it ? I probbably just missed something you wrote, i'm in a hurry.