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. Fluffy-Tails

    Fluffy-Tails

    Joined:
    Jun 28, 2009
    Posts:
    120
    Exactly what I was looking for, thank you again Partel :3
     
  2. Deyama

    Deyama

    Joined:
    Apr 18, 2014
    Posts:
    6
    Hi, Partel!

    First of all let me say that the PuppetMaster looks super polished! It's easily seen how much effort was put into it. And I would definitely buy it, if not the will to learn everything myself. But anyway, keep up the good work!

    Would you mind giving me a hint about how that "Mapping" is actually implemented?The one that you effect via the "Mapping Weight" slider here. It's not that I'm trying to make a competing asset or anything, I just want to wrap my head around how it could be possibly made for my hobby project.
    I've looked into AnimFollow source by Kavorka and grasped the general idea. As for now I have two identical models inside one root transform both with their meshes and bones, except one of them having an animator component and serving as a target for the second one, which is a ragdoll-puppet with configurable joints. So it's basically: animated character follows his animation, then the ragdolled character tries to follow his movements using joints and forces. I can effect joints and forces weights as a whole or one by one. What bothers me is that I can't turn the ragdolled-puppet on and off, because both of the characters have their respective meshes, and the ragdolled character can effect only his own mesh while his target's mesh is hidden. So if I needed to turn ragdolled character on and off, I would have to switch between displaying one of two meshes, which doesn't feel smooth. While it looks as if you have only one model, which is kind of lerped between following a ragdoll and following an animation via that "Mapping Weight" slider. Am I right? If that's so, could you please tell how is it that your model isn't tied up to neither the animation nor the ragdoll? That would probably alllow me to make my mesh model follow either animation or ragdoll and switch ragdoll on and off. Thank you!
     
  3. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Hi Partel - quick question - how have you been getting along with things working with a network/multiplayer?
     
  4. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hi and thanks!

    Basically, the mesh is on the animated character, the ragdoll duplicate has been completely stripped of any unnecessary gameobjects and components, just the Rigidbodies, Joints and Colliders. After each animation and physics step, the animated character will be blended between it's animated pose and the ragdoll pose based on the "Mapping Weight".

    Hi,
    Some weeks ago I posted a package with the initial version of PM networking for you guys to take a shot at before I'm gonna add it to the core.

    Best,
    Pärtel
     
    lazygunn likes this.
  5. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    @Partel Lang,

    I've been doing some work with puppetmaster and I have a question regarding some of the enable/disable/reset logic.

    So when you call "Reset" this calls DisableColliders (which creates a list of colliders that were already disabled), you use this list when you re-enable to basically restore the state of the colliders.

    The problem is that EnableColliders is a coroutine, so if disablecolliders gets called before the next frame you can never re-enable the colliders. This isn't such a huge problem under normal cases - but if the game object is disabled for whatever reason before the enable coroutine completes, the colliders are again never re-enabled.

    Why is this a coroutine? I hesitate to make changes to this - because running the re-enable next frame seems so deliberate. But the list logic is definitely sketchy, and never being able to reenable the colliders is obviously wrong.
     
  6. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Agreed, I would like to avoid all use of co-routines in my code tbh
     
  7. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    I just want to be able to activate and deactivate game objects with very little worry about stuff breaking. I've only been working with puppetmaster for a few days and seeing this problem is very concerning.

    EDIT: so I added a fix to the problem by setting a state flag that checks if colliders have been re-enabled before allowing a second disable. It doesn't entirely fix the problem, but it's a good enough work around for now.
     
    Last edited: Jun 3, 2016
  8. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hey,

    The enable/disable/reset logic has been already restructured for 0.4 and is much more reliable now. EnableColliders is not a coroutine anymore and there are no lists created in there. I'm gonna submit that soon, but if you're in a hurry, PM your invoice no and I'll send you the package.

    Cheers,
    Pärtel
     
    frosted and hippocoder like this.
  9. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    I can wait a week or so (easier to manage official upgrades). Glad to know you're on this.

    Would it be safe to change the enable colliders to an immediate call in this version (ie: just remove the yield/coroutine)? I would have done this - but it looks like the kind of hack that's really there for a reason. Do you recall the reason for it?
     
  10. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    It's gonna take at least a week to submit and at least a week for them to review so...

    I think the reason was that when you deactivate a ragdoll and reactivate it, Unity will recalculate all joint rest angles. So if the character happens to be in a weird pose when deactivated, reactivating will mess it all up. Thats why I have to make this ugly hack to move the ragdoll to it's initial pose each time before it is activated and then move it back to where it was. I think the coroutine was there to disable the colliders for the time of the ragdoll pose being reset so they wouldn't collide with anything in the resetting process.

    There are a bunch of hacks like that in PuppetMaster, some of them leftovers from prototyping that will be removed, but most of them because I have ran into a brick wall with the Animator-PhysX workflow at some point. :)

    Best,
    Pärtel
     
    frosted likes this.
  11. frosted

    frosted

    Joined:
    Jan 17, 2014
    Posts:
    4,044
    I appreciate the response. I can see how this kind of system would require a fair number of hacks, especially given that it's still in beta and has leftover from prototype. I do, also, understand that game systems almost all have some degree of hack ;)

    I'll PM you my invoice, thanks.
     
  12. Deyama

    Deyama

    Joined:
    Apr 18, 2014
    Posts:
    6
    Thanks for you reply! So the tricky part here is syncing physics updates with the animator ones
     
  13. nubdev

    nubdev

    Joined:
    Mar 30, 2013
    Posts:
    87
    Hi Partel,

    I am having problems with the ragdoll floating until it is unpinned (still floats when losing / lost balance):

    It's an issue that has popped up every now and then but I usually manage to fix it with fixing the layer setup, now it's happening again when attempting opsive integration. Works fine with exception of the floating... do you have any idea what could be influencing this?

    Having the puppet standing while idled has it falling over every few seconds or so.

    Thanks for any assistance


    ---- edit

    after a little more research it seems to be tied to root motion animation and not explicitly a puppet master problem, my bad. Still having problems with it though so if anyone has any tips, would be appreciated.

    --edit

    worked out its two separate issues - the constant falling is due to an improperly setup animation controller, creating a transition from base movement to behaviour puppet has it falling every time there is movement animation playing.. I had copied the wrong elements into the animator.

    second issue with the skinned mesh playing above ground, floating is still happening... currently just offset the collider to adjust but still looking for a solution.
     
    Last edited: Jun 7, 2016
  14. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hi!

    Please PM me, I'll send you the release candidate of PuppetMaster 0.4, I think it is a problem I already fixed.

    Best,
    Pärtel
     
    nubdev likes this.
  15. nubdev

    nubdev

    Joined:
    Mar 30, 2013
    Posts:
    87
    Thanks, will do.
     
  16. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Final-IK 1.4 and PuppetMaster 0.4 submitted for review :)

    Cheers,
    Pärtel
     
  17. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    wuhu. changelog? :)

    i got a quick question.
    i somehow got a problem with the props. with my character it looks like this:



    but in the demo scene everything is fine:

    the prop root is at the same place as the in the demo (Char.contr->Anim.contr>right hand).
    also the connect to rigidbody is the same (my characters ragdoll/puppetmaster bone hierarchy is not flat like the pilot ones
    pm_settings.gif
    but that shouldn't be a problem right?
     
    Alfonso_CJ likes this.
  18. Alfonso_CJ

    Alfonso_CJ

    Joined:
    Nov 19, 2015
    Posts:
    35
    I've got the exact same problem.
     
  19. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hi,
    Could be a number of things. Have you checked for the stuff in the user manual?

    Melee Props:

    Lengthy melee props are a huge challenge to the PuppetMaster. Swinging them rapidly requires a lot of muscle force and solver iterations to fight the inertia and keep the ragdoll chain intact. The longer the chain of Joints linked together, the more inaccurate/unstable the simulation and unfortunatelly those melee props tend to be exactly at the ends of very long Joint chains (pelvis/spine/chest/upper arm/forearm/hand/sword). Besides that, as the props are swinged, they have a lot of linear and angular velocity, a very thin collider and therefore can easily skip the victim when it's collider happens to be at the position between two fixed frames. It usually takes quite a lot of tweaking and some tricks to get the melee props working right. The Prop component has the "Additional Pin" functionality which can be used to add another Muscle to the prop, helping to pin it to the animation.

    • make the collider thicker when hitting to decrease collider skipping.
    • use Continuous/Continuous Dynamic collision detection modes to reduce skipping, this however has a big performance cost.
    • reduce the fixed timestep.
    • use the "Additional Pin" (Prop.cs).
    • adjust the position of the "Additional Pin" and "Additional Pin Target" along the prop.
    • reduce PuppetMaster.pinDistanceFalloff.
    • increase PuppetMaster.muscleSpring and solverIterationCount.
    • disable PuppetMaster.internalCollisions to prevent the big prop collider from colliding with the Puppet.
    • get rid of the hand Muscle to make the joint chain shorter.
     
    Der_Kevin likes this.
  20. hmx_manrad

    hmx_manrad

    Joined:
    Jan 10, 2014
    Posts:
    8
    Hi Partel,

    We've been really enjoying how easy FinalIK and Puppetmaster are to work with, so thanks for making such a great package! Anyways, I'm running into an issue with a setup that is similar to "hanging" demo that comes with Puppetmaster. We have our character being animated by IK and then the arm pinned to a joint that can be pulled around by the player. It normally works fine, but if you pull the character around fast enough, you see an occasional frame where the character renders as if the mapping weight was 0. Meaning, the original spot where the character was placed kinda "flickers" showing the character, and on these frames, the ragdoll isn't visible. It's like occasionally the mapping weight is not being applied. I tried turning off IK to see if that was the culprit and it still happens. Can you think of what might be causing this?

    Thanks for the help!

    Mike
     
  21. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hi!
    What is the update mode on the Animator? Any chance you could send me a repro project?
     
  22. hmx_manrad

    hmx_manrad

    Joined:
    Jan 10, 2014
    Posts:
    8
    ah, this is pointing me in the right direction. Our UpdateMode was "Normal", and I now see that in your example, the UpdateMode is "Animate Physics". I switched over to using that mode, and it looks like this particular issue is fixed! However, there seems to be a bad interaction with the OffsetEffector script, which we use to do posing of the character. That script is crumbling the character if left on, and I suspect it has to do with how it is centering itself on the posed character. I'm looking into that now, but this is progress.
     
  23. hmx_manrad

    hmx_manrad

    Joined:
    Jan 10, 2014
    Posts:
    8
    OK, I fixed OffsetEffector. It needs to reset the localPosition of each effector in a PreRead callback, so it gets the correct pose:

    Code (CSharp):
    1.       private bool _shouldReset = false;
    2.  
    3.         protected override void Start() {
    4.             base.Start();
    5.  
    6.          ik.solver.OnPreRead += OnPreRead;
    7.          Reset();
    8.         }
    9.  
    10.       private void OnPreRead()
    11.       {
    12.          if(_shouldReset)
    13.          {
    14.             DoReset();
    15.             _shouldReset = false;
    16.          }
    17.       }
    18.  
    19.       public void Reset()
    20.       {
    21.          _shouldReset = true; //need to wait until OnPreRead to do this
    22.       }
    23.  
    24.       //reset effector offset to current state of the character
    25.       private void DoReset()
    26.       {
    27.          // Store the default positions of the effectors relative to this GameObject's position
    28.          foreach (EffectorLink e in effectorLinks)
    29.          {
    30.             e.localPosition = transform.InverseTransformPoint(ik.solver.GetEffector(e.effectorType).bone.position);
    31.  
    32.             // If we are using the body effector, make sure it does not change the thigh effectors
    33.             if (e.effectorType == FullBodyBipedEffector.Body) ik.solver.bodyEffector.effectChildNodes = false;
    34.          }
    But now I'm seeing the original flickering issue again. I'll see about whittling down a repro project
     
  24. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Should we be using animate normal or animate physics? I get confused what puppet master actually wants and why?
     
  25. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Yeah, that shouldn't happen. If you could send me a repro that would be perfect, thanks!

    PM should be able to handle both (apart from the bug mentioned above :)), so use whichever you need for other reasons. With Normal the puppet lags a frame behind, since there is no physics step after the animation is applied. Can't reorder that stuff in Unity unfortunately. With AnimatePhysics there is a hack that makes the animator update in FixedUpdate and then the puppet is able to follow in the subsequent physics step. You might notice the puppet follow the animation a bit closer with AnimatePhysics, but you know with that it is not good to do slow motion and stuff like that.
     
  26. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    Is the current version (0.3) working fine with 5.3.5? Or should i avoid upgrading til 0.4 is out?
     
  27. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hi,
    Both 0.3 and 0.4 (which is out already btw) should be working fine with 5.3.5.
     
    Der_Kevin likes this.
  28. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Partel,

    I just upgraded to Puppet Master .4 and Final IK 1.4 and received the following error:
    Assets/Plugins/RootMotion/PuppetMaster/_Integration/Final-IK/Behaviours/Biped/BehaviourBipedBalanceFBBIK.cs(53,38): error CS1061: Type `RootMotion.Dynamics.PuppetMaster' does not contain a definition for `broadcastCollisions' and no extension method `broadcastCollisions' of type `RootMotion.Dynamics.PuppetMaster' could be found (are you missing a using directive or an assembly reference?)

    Here are the steps I took to upgrade:
    1. Backed up my project
    2. Imported Puppet Master .4, received the error (I assumed I needed to also upgrade Final IK and rerun the Final IK integration package.)
    3. Imported Final IK 1.4
    4. Double click on Final-IK.unitypackage contained within Plugins/Rootmotion/PuppetMaster/Integration
    5. Error still exists.
    6. After reviewing the classes, since broadCollisions has been removed from PuppetMaster.cs, I can just comment out line 53 in BehaviourBipedBalanceFBBIK.cs and since that's really only an experimental class associated with the experimental Balance scene, it's really no big deal.

    My guess is the Balance experimental stuff is some legacy stuff still hanging around in the project that you have removed from your master copy.

    I just wanted to let you know since it may occur to others doing the upgrade.

    Allan
     
  29. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hi, thanks for reporting, it is a known issue and a fix has already been submitted to the Store, is pending approval.
    In the meanwhile, just delete the line that causes the error, it is not used anymore.

    Cheers,
    Pärtel
     
  30. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Oh.. the fix has just been accepted so you can re-download :)
     
  31. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    The tripping / falling over video is great. Nice work on this asset.
     
  32. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    Hey,
    Iam currently trying to unpin/ragdoll the arms of my character all the time. I set all props values of the individual muscle settings of the right forearm, upper arm and hand to 0 and the mapping weight also. But now the right arm is more like a baloon. Pretty funny but not what i wanted :D

    I think someone asked the same question already but i can not find it?
     
  33. shawnblais

    shawnblais

    Joined:
    Oct 11, 2012
    Posts:
    324
    Any ideas how I can get rid of the "floppy feet" effect?

    With PuppetMaster:


    without:


    Ideally I could just ignore feet completely, I don't need them to have ragdoll at all and would prefer they just follow the animation properly.

    [Edit] I see that I can "uncheck" feet when creating the ragdoll, which seems to work great... but how to do it after it's already created? Not possible?
     
    Last edited: Jun 23, 2016
  34. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Partel,

    Is it possible to remove Hand colliders once a Puppet Master has been created?

    I ask because when you use the Replace Character Model feature in CharacterMeleeDemo.cs, the ragdoll it creates is of course unedited. The problem is Ragdoll Editor does not allow you delete ragdoll colliders once the Puppet Master has been created. You can manually delete the Ragdoll Hand colliders but since Puppet Master uses a public array to store the Muscle Settings connections, changing the array Size destroys your Puppet Master Muscle settings setup. With Fuxe/Mixamo characters, I have found you always have to remove the ragdoll hand colliders in order to get the melee prop working.

    A really nice addition to Ragdoll Editor would be the ability to rotate Ragdoll Colliders and delete existing ragdoll colliders after you have already created a Puppet Master. The problem I keep running into is with the use of Mixamo or Fuse characters, they all have to have their ragdoll feet colliders rotated to match the feet meshes. Per your Puppet Master Setup video, I realize I can rotate the feet colliders manually but it would be very nice to be able to do this within the Ragdoll Editor along with deleting colliders and other adjustments post Puppet Master creation.

    Thanks
    Allan
     
  35. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    Is this still around? I been wanting to get Puppet Master... I bought Final IK 11 months ago. But I tend to buy stuff on sale, or upgrades only mainly due to budgets like every other indie ..


    Also how well does this work for Android??
     
    Partel-Lang likes this.
  36. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hi!
    I had to remove that, because it was merging the ratings and reviews between the 2 products. It's meant for upgrading the same package. The AS doesn't support stuff like that unfortunately.
    It will be on a sale, but not before it reaches 1.0, the learning materials and ease of use still need much improvement.

    Cheers,
    Pärtel
     
  37. chaneya

    chaneya

    Joined:
    Jan 12, 2010
    Posts:
    416
    Partel,

    Just wondering if you may have missed some of the above questions? I had one about the possibility of removing ragdoll colliders once Puppet Master has been created and it appears someone else had a similar question.

    Thanks
    Allan
     
    Last edited: Jun 29, 2016
  38. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Oh, damn, missed a notification again, sorry for the long wait!

    You can delete an element in the muscles array by right-clicking on it at selecting "Delete Array Element"
    Screen Shot 2016-06-29 at 20.10.25.png

    Can't add collider rotation to RagdollEditor because the colliders can't be rotated, the gameobjects can be rotated. That can be done through the RagdollEditor if you select the collider, click on "Select GameObject" and then just rotate it.

    Hi!
    The same answer as above, delete the muscle in the Muscles array and delete the foot gameobjects from the PuppetMaster hierarchy.

    Hi!

    You should set "Pin Weight" and "Muscle Weight" to 0, but not the "Mapping Weight".

    Cheers,
    Pärtel
     
  39. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    Eh??? Tom does it for RTP and Uber.. Also the 2nd question about Android please? , since I develop for Android, otherwise for PC I rarely use Unity.... So Android info is important to me. Thanks!
     
  40. vixson

    vixson

    Joined:
    Jun 19, 2016
    Posts:
    2
    Assets/Plugins/RootMotion/PuppetMaster/Scripts/Behaviours/BehaviourPuppetDamage.cs(55,129): error CS1061: Type `UnityEngine.Collision' does not contain a definition for `impulse' and no extension method `impulse' of type `UnityEngine.Collision' could be found (are you missing a using directive or an assembly reference?)
    please help i can't use this puppet tool this the error am getting.
     
  41. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    That's weird, I remember asking Unity support about this upgrade pricing merging reviews and ratings thing, they told me that it is not meant for upgrades between different packages, just from v1 to v2 and that I should remove it.

    About Android, yes it works the same as on desktop. It might be heavy for some mobile devices though performance-wise. Depends on what you are planning to do.

    Hi!

    The minimum required Unity version for PM is 5.2, looks like you are running an earlier version. If you absolutely have to use that, you could try replacing all instances of Collision.impulse with Collision.relativeVelocity * someCoeficient.
     
  42. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    ya not sure I just know Tom does it with RTP and Uber and has for awhile. But that is fine, I think its worth the money anyways. ... But my concern is that it may not be great for Android... I would like more info .. So for example, I plan have melee in our game, and Archery.. We would like to use kinda like your melee demo.
     
  43. benjamd

    benjamd

    Joined:
    Oct 2, 2012
    Posts:
    11
    Hey Partel,

    Thanks for the great asset. Got a couple of questions.

    I'm trying to setup a ragdoll that can be picked up, moved around and thrown about by another entity. To do the pickup I'm attaching a Fixed Joint to the bone that was collided with, and setting the puppet master pin weight down to 0 as in the hanging example. However, two things are going on that I can't quite figure out how to work around.

    1) The animator is still animating obviously, but the pose its in right now is not very appropriate for a 'being thrown around' animation, so I lower the muscle weight on the hierarchy of bones from the picked one down to the hips to get him to behave more ragdoll like. This works mostly, but it doesn't quite give the right movement I would like. I assume FinalIK would let me do something more realistic? How would I go about that?

    2) When I release the attached joint, the character jumps straight back to its original position. I've tried setting the velocity and rotation of the rigidbody that was picked, but obviously this is the ragdoll rigidbody which is being driven by puppetmaster. So how do I move the main character to the position and orientation of the ragdoll in its unpinned state and then impart forces upon it before restoring the pinned state?
     
  44. vixson

    vixson

    Joined:
    Jun 19, 2016
    Posts:
    2
    Thanks Lang, It stopped showing the error, but i need to still update to unity 5.2.2 for the PM to work properly.
     
  45. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Thank goodness we're back to the old forums.
    If anyone had their question unanswered in this mess or PMs unresponded, please just ask again.

    Best,
    Pärtel
     
    hippocoder likes this.
  46. Fera_KM

    Fera_KM

    Joined:
    Nov 7, 2013
    Posts:
    307
    Hi Pärtel,

    I'm very happy with final ik, works pretty much as I want it to and I'm very happy with it.
    However, puppetmaster needs some TLC to get to act properly, and I think I need to devote some serious time into studying how to set it up. I've put a couple of days into it now, but without getting the result I'm looking forward to.

    Do you have any tips working with lower timestep (e.g. 0.001)?
     
  47. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hi!
    What kind of a solution are you looking to set up?
    I never tried a physics time step 20 times lower than the default (did you mean 0.01?), but for example if you open the "Basic" scene and set fixed time step to 0.001, you'll have to increase PM "Muscle Spring" as time step has an effect on how accurately joint motors are solved in Unity. Also, you'll probably want to disable "Angular Limits" and "Internal Collisions" depending on the animation you are playing, because those things will be very accurately calculated too and your limits/colliders might not support the full range of motion of the animation clip.
    Anyway, if you could tell me more specifically what you are trying to achieve, I'll put something together for you to get you going.
     
  48. Fera_KM

    Fera_KM

    Joined:
    Nov 7, 2013
    Posts:
    307
    Hi,

    I spent one last evening working with it, and kind of got the result I'm looking for, or closer to it.
    My current timestep is 0.008, putting it lower couses the ragdoll to jitter a lot, I'm guessing due to the fact that the muscles are updated so frequently. And also the collision force, with puppetbehaviour seem to increase significantly with low timestep.

    I might have to go lower with the timestep, than what I currently have, due to other collisions that will happen realtime.
    (ref: youtube)

    I want to say that I am currently growing very fond of the plugin, Puppetmaster!

    But for a programming idiot like myself, I'm trying to wrap my head around how the different parameters affect simulation, and how timestep affects into this.
    One thing I noticed is that the puppetbehaviour script (which I regard as almost bread'n butter for the plugin), have some very strange values as default (when don't grab it from the prefab).

    I'm also not sure how to change the collision resistance value from a float to a curve, like in the prefab.
    Actually, if I may, I have a request if you are planning to work more on this. To put collision resistance defaulted as a curve in the script but add inn a collision resistance multiplier as a slider, so it is easier to tweak the values.
     
  49. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,548
    Hi!

    Why do you need that low timestep at all, may I ask? It must be devastating for the performance.
    If its about the bat skipping the ball, you could just use Continuous Dynamic/Continuous collision detection modes on them respectively.

    The easiest way to understand the many parameters is to read their tooltips. I am planning to make custom basic and advanced editor modes for the behaviours at some point when they have matured a bit more.
    The intended way of adding a behaviour is to duplicate and drag for now, but a Reset To Defaults button will be added in the next versions.

    You can change collision resistance to a curve if you click on the little "Float" thing on the right of the "Collision Resistance":
    Screen Shot 2016-07-13 at 15.02.04.png


    Screen Shot 2016-07-13 at 15.00.54.png

    Cheers,
    Pärtel
     
  50. Fera_KM

    Fera_KM

    Joined:
    Nov 7, 2013
    Posts:
    307
    Hi Partel!

    Thanks for response!
    The reason I had to go witch such a low number in timestep was because I kept "hitting" with the club through the ball, even with continuous collision, and since the clubhead don't have much time to do prediction, since it is controlled by the mouse movement.

    I am actually looking forward to continue working on the behaviourpuppet, thanks for the insight with the float/curve.
    If I can get my head around this, I want to make a ,setting up puppet master in 5 minutes tutorial, for dummies (like myself).
    It's probably not easy to get into that position yourself, when you are very into it.
    One of the things I find is hard is to figure out which settings to start out tweaking to get the numbers right, and which settings should be tweaked last.