Search Unity

  1. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  2. Unity 2017.2 is now released.
    Dismiss Notice
  3. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  6. Unity 2017.3 beta is now available for download.
    Dismiss Notice

PuppetMaster - Advanced Character Physics Tool [RELEASED]

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

  1. mkgm

    mkgm

    Joined:
    Apr 10, 2015
    Posts:
    134
    Hi Partel, I'm working with FINAL IK + RAGDOLL WORHSOP 3 and the combination are very good visually speaking. But with 20+ humanoids in the scene, the CPU (computer PC Intel core i7) gets 90% bussy.
    How many characters (FINAL IK + PM) can I have in my scene before my CPU gets super bussy.
    PD: I'm sorry for my bad english.

    Thanks for your time.
     
  2. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    351
    I was using ragdoll workshop too and with 4 characters on the screen it was taking something like 60% of the frame time, whereas using puppetmaster now it only takes <10%. Huge boost, for me at least.
     
    Partel-Lang and hopeful like this.
  3. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    Hi!

    You can quite easily make CharacterThirdPerson use the raycasting info from the Grounder.
    Go to line 336, where you'll find
    Code (CSharp):
    1. hit = GetSpherecastHit();
    and change it to
    Code (CSharp):
    1. hit = grounder.solver.rootHit;
    Of course you'll also need a reference to the Grounder. It used to be like that, but I changed it because I wanted the CharacterThirdPerson to be usable also without Final IK, which is why it now sits in the Shared Demo Assets folder.

    PuppetMaster does not know if the puppet is grounded, neither does BehaviourPuppet (it just checks for the velocity to know when to get up).

    Hi!

    You'll also have to scale some values in the BehaviourPuppet, just scale those by 10:

    Knock Out Distance, Max Get Up Velocity

    Cheers,
    Pärtel
     
  4. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    Hi!
    I have not tried Ragdoll Workshop, but it really depends on what kind of IK you are solving on them and how intensive is the simulation and how many collisions you have each frame. I've been testing PuppetMaster, trying to keep it afloat with 20 zombies piling on top of each other (on a MacBook Pro), that is the high stress scenario.

    Here's some more info on the performance and tips for improving it.

    Cheers,
    Pärtel
     
    twobob likes this.
  5. EllFromHell

    EllFromHell

    Joined:
    Oct 17, 2015
    Posts:
    15
    Hi Partel,

    Re the custom mesh colliders, I'll give it a go and let you know. :)

    I am very keen to try and push accurate physical character interaction with the environment in my projects. At the moment I am particularly interested in how hands interact with the world objects.

    Using Final IK and Hand Poser with the 'pick-up' option to associate the target object with the hand parent I am getting very convincing looking results. I have yet to try the prop approach in PuppetMaster, but I wanted to ask you how difficult you think it would be to add full hand support (instead of a single collider for the hands) that integrates with PuppetMaster?

    Have a look at this as an example:
    https://www.assetstore.unity3d.com/en/#!/content/21105

    My thinking is to still use animations / Final IK for controlling most of the hand interactions, but instead of it being purely a 'smoke and mirrors' thing, I want to have the hands physically interact with the object.

    For example, if I wanted to pick up a prop then I could theoretically do so without 'pretending' to pick it up but actually pick it up (or have it slip out of the hands). With PuppetMaster's muscle and pin strengths I could potentially get some really wicked results when I have the prop actually physically interacting with the character hands.

    Or am I dwelling into the realm of fantasy here. :)
     
  6. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    It could work, I have not tried PuppetMaster down to the detail of fingers yet, but I can't see why it shouldn't. You can choose to have the fingers pinned or use only the muscles. I can imagine it will be quite heavy on the performance though, 30 extra Rigidbodies per character, so it's like having 2 more active characters. You might also need to up the solver iterations because those joint chains are getting quite long with the fingers.

    Cheers,
    Pärtel
     
  7. keenanwoodall

    keenanwoodall

    Joined:
    May 30, 2014
    Posts:
    485
    I'm SO EXCITED!!
     
    Partel-Lang likes this.
  8. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    350
    Partel,

    I'd like to make a minor recommendation regarding both FinalIK and Puppet Master. My recommendation is that you consider using the newer Third Person Character Controller from the Standard Assets package for Unity 5 instead of the current controller you provide in your demos. If you have a chance and have not seen the newer controller, take a look at it and just give it some thought.

    As I recall, the character controller you currently use in your demos is a modified version of the Unity Standard Assets Third Person Controller released sometime in the Unity 4 timeframe.

    Here is my thinking:
    - In my last game "Balancing Act" I used FinalIK and a highly modified version of the character controller that you included with FinalIK. I spent far more time and effort trying to wrap my head around that fairly complex character controller and modify it to my use than actually understanding and using FinalIK.

    - The newer Unity 5 Standard Assets Third Person Character Controller is much simpler than the current one you use, yet accomplishes just about the same thing. It has only 2 classes, ThirdPersonCharacter.cs that handles all movement and animation and ThirdPersonUserControl.cs that handles input. That's it. Simple and elegant. They removed all of the needless inheritance that just makes it more complicated for a beginner. I understand that they thought it would be clever to provide a controller that has base classes for extendability but the reality is most player controllers are unique vs. controllers crafted for NPCs, enemies etc. So you don't need that inheritance especially when the purpose is to provide a tutorial for beginner or intermediate developers

    - In addition to eliminating an unnecessarily complex class structure, they also simplified the Gameobject structure so now the controller class, animator, rigidbody and collider all reside on the same Game object. Again this removes several orders of magnitude of unnecessary complexity. The older controller uses hacked connections between local variables and public structs to pass redundant variables from the animator class to the controller class. It's a complete mess. And if you attempt to apply root motion in OnAnimatorMove because that method sits where the animator is, you end up translating the animator gameobject instead of the controller object. I've noticed that the more advanced Third Person Controllers being offered on Asset store all use this more simplified Gameobject structure. I could go on about the overly complex GroundCheck method vs. the newer simple and elegant GroundCheckStatus method, where in the older one they use a funky TIme.time timer to determine your jump time but I'll stop there.

    - One of the things that makes FinalIK and Puppet Master so brilliant is that you focus and isolate those products from input, camera control and animation and you provide tons of scenes showing off different features. That isolation makes them much easier to understand and implement. With that said, customers will naturally be drawn to the demos Puppet Extended and grounded because those demos do a great job of showing off the awesome features of your products. And this is where a less advanced developer may just throw up their hands in frustration because the controller code is so complex when it probably doesn't need to be.

    I realize it's a lot of work, but simplifying that controller code will just make your products better because the demos that show them off will be easier to understand.

    Thanks
    Allan
     
  9. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    Hey, big thanks for the feedback, it is most appreciated!

    Yes, I think it's a great idea. Although I deliberately removed all Standard Assets from my packages (maybe in Final IK 0.4) because when people had it imported, it resulted in lots of conflicts between the assets and a big mess that was impossible to resolve. I even promised to never ever use them again :)

    But, I think a better solution would be to make a package of some demos that could be imported to a project that already has FinalIK/PM and the Standard Assets inside.

    Cheers,
    Pärtel
     
    twobob and hopeful like this.
  10. angelodelvecchio

    angelodelvecchio

    Joined:
    Nov 15, 2012
    Posts:
    170
    hi partel ! how are you ?

    my friend, i use Character Controller with the old charactermotor script wich works perfectly, is possible to mix and use puppet master ?

    Many thanks
     
  11. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    350
    Partel,

    I'm a little confused about collisions and the only time your docs really address it is in regards to behaviors and the physics layers setup in Puppet Master.

    I was in the process of setting up code to scale my capsule collider based upon different animations when it occurred to me that I have ragdoll colliders so why do I even need the capsule collider. Why not just deactivate it when my character is not OnGround? Correct me if I'm wrong but since the ragdoll has colliders that detect collisions, the capsule collider is now only needed to keep the character on the ground during isOnGround motion.

    I noticed in the Puppet Extended scene, you use a walkable layer for ground and collision layers for every object in the scene including the walls. As a result every object adheres to the Collision Threshold setting. I can imagine a number of scenarios where I would want the ragdoll to collide with objects yet either not be associated with the collision threshold setting or have an infinite value in that setting. If I have the character climb a wall or a tree and I have disabled the capsule collider, can I use the ragdoll colliders to prevent penetration of those objects without sending a message for collision threshold?

    So I guess my questions are:
    - What is the purpose of the character controller capsule collider other than just keeping the character above ground?
    - How do I allow the ragdoll to collide with objects and not activate the collision threshold or use an infinite collision threshold? Since there are no definable layers for this on Puppet Master, how does one set this up?
    - I understand that through physics layers you make sure ragdoll colliders do not collide with the character capsule collider. And you set Collision Layers to not collide with the capsule collider but instead collide with the ragdoll colliders thus using the Collision Threshold to fire off a fall. As a test I made a wall for my character to climb. I want the ragdoll to collide with this wall since that will appear more accurate than using the capsule collider. So I set the wall layer to not collide with my capsule collider. But I don't want my wall to fire a collision based upon the collision threshold setting. I just want the ragdoll to collide with the wall.

    Thanks
    Allan
     
  12. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    Hi,
    Yes, the PuppetMaster does not really care about which character controller you use, as long as the ragdoll colliders don't collide with it.

    Hi, Allan,

    - Other than just keeping the character above ground, the character controller capsule is used to make sure you dont attempt to run through some walls. For example in the "Puppet Extended" demo, there are blue and green objects. The blue ones are on a layer that ignore the character controller, so you can freely crash into them with the puppet. The green ones collide with the capsule you can't run through them. Otherwise in a game I imagine if you were easily unbalanced every time you hit a wall it would be quite annoying. So you can disable the character controller while jumping if you will and it would probably be a good idea as well.

    - The collision threshold is now only used by the BehaviourPuppet. It is the minimum square magnitude of collision impulse below which collisions will not be ignored, but they will not be processed by BehaviourPuppet. Meaning, the objects will still collide, but no damage will be applied to the puppet, it will not be unpinned by too weak collisions. So basically the "infinite" value for collision threshold is 0.

    - If you don't want the wall to unpin the puppet, make sure it is not included in the "Collision Layers" of the PuppetMaster. If you want the puppet to be unpinned by it while not climbing, you can just change the Collision Layers based on whether he is climbing or not via script.

    Cheers,
    Pärtel
     
  13. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    19,820
    I was wondering if there's a way to fade out (LOD) both Final IK and PM, as I have considerable number of characters and need to begin removing intensive calculation really quite close (only have a 1ms budget left on consoles and they've both ripped through that limit) :)
     
    twobob likes this.
  14. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    350
    Partel,

    So what you are saying is there is only one Collision Threshold setting for the entire scene because it's a setting in Puppet Master and right now only BehaviourPuppet is using that threshold value? I would think it would be more versatile if you could have different threshold values for different layers so you could have some objects in the scene which cause the character to fall and others that do not but still collide with the ragdoll. The problem I'm finding is if I don't put the object's layer into the Collision Layers setting in Puppet Master, then the ragdoll completely ignores those objects, as long as I'm using BehaviourPuppet and BehaviourFall.

    Let me give you another use case. I setup a scene with loose debris all over the ground, smaller rocks that I want my character to trip over while he's running, some static, some loose. I want the ragdoll to collide with the debris and approximate the physics of that as much as possible. I don't want my capsule collider to collide with the debris because it looks terrible (the capsule collider will just skip over the rocks (static) or push them around (non-static)). So I make sure in layers, Player capsule collider ignores debris, ragdoll collides with debris. The only purpose of the capsule collider is to keep the player on the ground. Now in this same scene, I want to be able to use the PuppetMaster threshold setting so some other scene objects will knock over the character, like really large rocks. If my player smacks into a really big rock, I want him to fall over. How would I set this up? As far as I can tell, the ragdoll completely ignores any layer that is not in the collision layer in Puppet Master if I am using BehaviourPuppet and BehaviourFall. But if I place debris in collision layers, then the small debris makes him fall over just like the huge rocks. I'm also using GrounderFBBIK so he will IK against the debris. If I could have a layer with a threshold setting of 0 and a layer with a threshold setting of .1 in Puppet Master, this would be easy to setup.

    Thanks
    Allan
     
  15. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    Hi!
    With Final IK it is quite easy, depends on the components you use, but for example, in case of FBBIK, just reduce iteration count down to 0 in which case full body IK will not be solved, it will just solve the limbs like BipedIK.
    The quality of the Grounder can be set to "Fastest", or actually the just disable it entirely.
    AimIK and others also have the max iterations value, or switch to a component with less bones assigned.

    With the PuppetMaster it is not so easy, basically you can just blend between 3 modes, Active, Kinematic and Disabled. So at this time the only effective LOD solution I see is to switch distant characters to Disabled mode.
    Also you can clamp down solver iterations and do all the other stuff described here.

    Actually, because of the PuppetMaster rig being independent of the animated target character, theoretically we could have more than 1 PuppetMasters there, for example one with 16 Rigidbodies, the other with just 8 and then switch between them. BehaviourPuppet doesn't support that yet, I'll have to look into it.

    The threshold value is not really good for that purpose. I mean it's an optimization, if you set it to a high value, then try to move the ragdoll smoothly into the colliding surface, it will behave erratically because it only registers collisions with the minimum impulse.
    What I should do instead, is add layer based collision resistance multipliers to the BehaviourPuppet. That should do the trick. Hold on I'll send you a patch... :)

    About debris, what really helps with it is the Grounder component from FinalIK ;) If you add the debris layers to it it will try it's best not to trip on it like we normally would.
     
    hippocoder likes this.
  16. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    @chaneya Here you go, import this patch. You can find the multipliers in the BehaviourPuppet.

    Pärtel
     
  17. Filhanteraren

    Filhanteraren

    Joined:
    May 14, 2014
    Posts:
    30
    Is there a way to make the puppet rotate with animations. Say the ragdoll puppet is on it´s back on the ground, then I would like to flip it over on the stomach. I tried with a simple turn around animation but the rotation from the animation doesn't seem to effect the puppet. Maybe this won´t work with pm but I thought I check first.
     
  18. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    350
    Partel,

    Thanks. The patch works really well! Sorry I misunderstood the meaning of collision threshold. I hope you'll include this in a future update.

    For anyone else following my line of reasoning, with the above patch you can have the ragdoll react differently to objects based upon the layers assigned to those objects. For example, you can have a large rock that will knock the player over and smaller rocks that the ragdoll will still collide with but they will not knock him over. This allows you to, for lack of a better way to put it, somewhat "buffer" the Collision Threshold value from Puppet Master on specified layers.

    The patch adds a Collision Resistance Multipliers array to the Behavior Puppet component. Set the size of the array, select your layer, set a multiplier value. I set the debris layer multiplier to 10, and when the ragdoll hits debris, he bounces around but does not fall. But when he hits items with layer default (large rocks), he falls. Both debris and default layers are assigned as collision layers in Puppet Master so the ragdoll knows to collide with them. I have debris and default layers ignored by the player layer in the physics matrix so the capsule collider is ignored.

    Allan
     
    Partel-Lang likes this.
  19. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    If the puppet is completely unpinned, the only way to rotate him would be to make an animation that is actually physically capable of turning him around. It will be a lot of tweaking back and forth in Unity and the 3D app, but it's possible. You could also use IK for this, make one of his arms move back and the foot on the same side move forward, that should shift the weight I imagine. Also you can cheat a bit by linking the pelvis to an invisible kinematic Rigidbody with a Joint and then turning that Rigidbody around.

    Hey, thanks for the explanation for others. It is already in the WIP next version.

    On a side note, I've been working on making puppet setup much easier with your own custom character rigs and for example the Standard Assets rig. It will be just a couple of clicks in most cases. :)

    Cheers,
    Pärtel
     
  20. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    Hey all,

    PuppetMaster 0.2 has been submitted for review. :)
    It doesn't have any shiny new features, just bug fixes and improvements to usability, simplicity.
    I'll post some new tutorials when it is accepted, the interface changed a bit here and there.

    Regards,
    Pärtel
     
    montyfi likes this.
  21. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I was too enamoured not to get this in the end after the rather exciting beta - would the above simplifications technically work with any old character controller? Opsives is remaining my holy grail with this and finalik hooked up
     
  22. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    Yes, I hear it worked well before so it will definitely work after 0.2.
    I'll make a tutorial about setting things up with all kinds of controllers when 0.2 becomes available. :)

    Cheers,
    Pärtel
     
  23. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Is there an approximate date for 0.2? Consider me the annoying child going 'are we there yet?'
     
  24. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    :) It's submitted, depends on how busy the reviewers are at the Store..
     
  25. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    If it plays well with opsives controllers abilities without too much hassle youre making my day, cheers!
     
  26. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    I think the same for Motion Controller too...
     
  27. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    Sure why not, I'll put that down in my list. Already working with Justin from Opsive...
     
  28. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    Thanks Partel, Since he has come out with a new Motion Controller that doesn't use the capsule anymore I'm excited to see how you can tie in your rigidbody colliders along with his AC colliders or vis versa
     
    hopeful likes this.
  29. EllFromHell

    EllFromHell

    Joined:
    Oct 17, 2015
    Posts:
    15
    Hi Pärtel,

    With the 0.2 update, is it still necessary to install the bridge package between Final IK and PuppetMaster?

    When I import it I get the following error:
    Assets/Plugins/RootMotion/PuppetMaster/FinalIK Bridge/Behaviours/Biped/BehaviourBipedBalanceFBBIK.cs(36,38): error CS1501: No overload for method `Initiate' takes `1' arguments

    Thanks,
    Albert
     
  30. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    0.2 is up, that was fast :D
    Also, here is the first integration tutorial, about the Standard Assets:


    Just updated the bridge, delete and reimport from here.
     
    hopeful, puzzlekings and EvilFox like this.
  31. EllFromHell

    EllFromHell

    Joined:
    Oct 17, 2015
    Posts:
    15
    Great thanks!
     
    Partel-Lang likes this.
  32. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    334
    Thanks - excellent tutorial :)
     
    Partel-Lang likes this.
  33. Ivy-SM

    Ivy-SM

    Joined:
    Apr 18, 2013
    Posts:
    10
    Can you make a tutorial about runtime integration with an UMA character (like you had one for FinalIK). It would be very useful :)
     
  34. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    Hey, it's quite tricky to set it up with UMA at this time. Requires some coding, so I'll make a package for that definitely.

    Pärtel
     
    hopeful likes this.
  35. Ivy-SM

    Ivy-SM

    Joined:
    Apr 18, 2013
    Posts:
    10
    Thank you!
     
  36. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    Here's the first version of the PuppetMaster UMA2 bridge.

    Just play the scene and assign an avatar to the "Build UMA Puppet".
    That just sets up PM with the UMA character. It doesn't update it when you change the proportions, so for now, use it when the avatar is ready. It also doesn't have an option add the BehaviourPuppet/Fall yet.

    Cheers,
    Pärtel
     
    Last edited: Dec 14, 2015
    hopeful likes this.
  37. Alkanor

    Alkanor

    Joined:
    Jan 23, 2015
    Posts:
    7
    Hello Pärtel!

    Congrats for your job it's pretty amazing :)

    Today I haven't neither Final IK nor Puppet Master, but I'm wondering if I'll buy one of these, maybe the two...
    I read that you have removed the discount on the Asset Store and I understand the reason but can you propose another offer for people who buy the both Final IK & PM ? I have a small student budget and I surely not be able to spend 180 bucks...

    Thank you & sorry for my poor english!
     
  38. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    19,820
    Well I bought both and I don't think they're expensive, but cheap because these are not S***ty products like 90% of the asset store, but top quality...
     
    Dbone and nxrighthere like this.
  39. Alkanor

    Alkanor

    Joined:
    Jan 23, 2015
    Posts:
    7
    Certainly but this remains a big expense for people on a budget :)
    I read all the documentation and I'm really interrested, I do not ask to receive a big discount but I just wanna know what Pärtel plans to replace the previous discount that he had to remove because of the Asset Store limitations.
     
  40. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    19,820
    But you say that you don't have Final IK and the discount was for final ik users...
     
  41. Alkanor

    Alkanor

    Joined:
    Jan 23, 2015
    Posts:
    7
    If Pärtel applies a discount I certainly will buy the both, I don't ask about a discount on one of them :)
    I read that he expects to propose a kit that contain Final IK and Puppet Master, it will be perfect for me!

    Anyway, waiting for an answer from Pärtel ^^
     
  42. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    19,820
    Hi,

    I don't seem to be able to make a puppet actually ragdoll fully, it seems to still retain some ghost of the original animations, I would like to (on occasion) just make parts totally floppy... what is the correct method to do this? Unpinning doesn't work right, it just makes it weaker.
     
  43. designico

    designico

    Joined:
    Apr 2, 2013
    Posts:
    8
    Hey is it also made for non-biped creatures? Spiders, Bugs, Monsters?
     
  44. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    Hey,

    I was planning at some point to make something like a "RootMotion Creative Suite" that would include all my assets and would be cheaper than the combined price. I'll have to check with Unity to see it it's possible upgrade-wise, to make upgrades to one package from multiple other packages and stuff like that... it will not be too soon though.

    Hi, just weigh down the Muscle Weight. Usually it's not good to have 0, but something very close to it like 0.05f.
    Also disable the Animator and "Update Joint Anchors" and enable "Internal Collisions" and/or "Angular Limits".

    Hi, yes it can be used with any creature that has a hierarchical bone structure. The ragdoll creation tool is for bipeds only, but can be useful for other 4-limbed creatures. Scene View ragdoll editing tools can be used on anything.

    Cheers,
    Pärtel
     
  45. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    19,820
    Hello! A few more questions please:

    1. I use forces with my own rigidbody character controller. I would love to be able to apply these forces directly to the puppetmaster ragdoll, but I understand this would be futile, since it will strive to match the animation controller position instead, and I have no point of reference to move the animation controller to a position between the feet or similar. For a number of reasons, I don't want to use built in Character Controller.

    When I apply forces, these forces get correctly cancelled out and it feels very playable, which is why I want to stick with that method as opposed to having an authoritative character controller that's fairly dumb in response to environment and dynamic things.

    2. What is the point of "groups" like arms, hips etc? is it possible to selectively set things by group?

    Thanks :)
     
    Last edited: Dec 17, 2015
  46. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    Hey,

    1. If the ragdoll is pinned, it will follow the animation controller, so the only way to use forces is to use them on the animation controller. You can set up layer collisions so that some layers you want to act as impenetrable walls collide with the character controller and some other layers collide only with the ragdoll.
    You can apply forces directly to the ragdoll, but it would have to be completely unpinned and acting only with it's muscles. Actually I have an idea, if you added joints that keep the puppet upright, it might kind of work. Add kinematic Rigidbodies to some of your animated character's bones, like pelvis and maybe spine. Then add ConfigurableJoints that link them to the respective bones in the ragdoll. Leave X, Y, Z motion Free, but lock Angular X, Y and Z Motion.
    Then unpin the puppet. So the idea is that the ragdoll is positionally free, but rotationally locked/limited.

    2. Muscle groups are used by the Behaviours, for example in BehaviourPuppet you can define "Group Overrides", specify different settings for the legs, arms and such. Also in the PuppetMasterMuscleAPI.cs script there are some functions that you can use to set muscle weights per group.

    Cheers,
    Pärtel
     
    hippocoder likes this.
  47. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    Hi Partel,

    I've been trying to get Puppetmaster to work cleanly with Opsive's Third Person Controller but haven't had too much luck yet. Rather than endlessly tinker on it I was wondering if you're going to release a video about how to integrate them. I have other projects that need all my tinkering time currently.
    I'm sure it's probably just little things that I'm missing since Lazygunn seemed to have figured it out.

    If you are going to put out a video...will it be soon? :)
     
  48. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    1,460
    Hey, Yes it will be soon.. I've been in contact with Opsive's developer and he is about to release a new version soon, I want to make sure it will work with the latest. I can probably make the tutorial live by monday..

    Pärtel
     
    Dbone likes this.
  49. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    19,820
    Thanks, Pärtel!

    How is the best way to adjust the pin weight of a group of muscles? I'm not sure how to use the API here. Do I get a reference to it from PuppetMaster script somehow? Thanks!
     
  50. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Hey, sorry for being a little misleading - i got the basic movement transitioning to and from a puppet but the abilities were beyond me - yod get stuck in some very odd animation states if you ragdolled during an ability
     
    Dbone likes this.