Search Unity

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,554
    Hey,
    What do you have assigned for "Target Root" in PuppetMaster? It should be the character controller gameobject that has the nav mesh agent and the animator and all that. The root transform of the entire rig should not have those components, consider that as just a folder for the dual rig. The reason why you should not move that is because the PuppetMaster is parented to it and the ragdoll needs to be driven by physical forces alone and not inherit any motion from the character controller.

    Hey,
    The blue ball should be parented to the animated character hierarchy, not the ragdoll, as that's what you'll see when PuppetMaster is done writing. It could be coming from AimIK, it is a heuristic solver, so it's never 100% accurate and minor inaccuracies could look like that when seen through the scope I guess.

    Hey,
    I wonder why the legs behave like that when you switch, it's probably related to the explosion. Any chance you could send me a link to a repro project to support@root-motion.com?

    Yeah, sorry, It's not a pricing model I specifically designed, it's just Unity promoting their subscription. PuppetMaster is on a sale quite frequently though, I join a sale every chance I get.

    Cheers,
    Pärtel
     
  2. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    I'll check that when I'm home, but I think it's the top-most parent which then contain the Behaviour, One of my own component (a UI Damage Canvas to show the damage numbers), the ragdoll (Puppetmaster) and then the root which has all the Animator and Motion controller and all. This Root has the regular bones

    I used the PuppetMaster regular wizard to create that.

    -CharacterRoot (nothing on it)
    --DamageCanvas
    --Behaviour
    ---Puppet
    ---Fall
    --PuppetMaster
    ---All The ragdolls
    --Root (containing animator, Ootii Motion controller and all)
    ---Children bones

    Should it be different? Because the one that is the issue that stay in-place is just the Behaviour even my DamageCanvas UI moves properly with the character
     
  3. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Ok so, after Puppet Master wizard my hierarchy looks like that:

    upload_2018-7-9_20-19-44.png

    The target root references the proper object:

    upload_2018-7-9_20-20-37.png

    I moved the "Behaviours" under "Character_Medusa_01" and it moves properly with the character now (even though the Gizmo stays in-place, but I guess that's not a big deal, right?)

    Is it ok to do like so? Or should the Behaviour parent be at the top-most root parent for some reasons?

    thanks for your support
     
  4. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    I wonder what is reading the position of the "Behaviours". The behaviours themselves never do that, they always use puppetMaster.targetRoot for character position. PuppetMaster itself also doesn't care where that gameobject is.
    The hierarchical position matters only as much as PuppetMaster needs to be able to find the behaviours and it does it like so:
    Code (CSharp):
    1.  
    2.             behaviours = transform.GetComponentsInChildren<BehaviourBase>();
    3.             if (behaviours.Length == 0 && transform.parent != null) behaviours = transform.parent.GetComponentsInChildren<BehaviourBase>();
     
  5. Deleted User

    Deleted User

    Guest

    Thanks, i will try to create a new instance of the weapon and filter out the bugs with some mathf and maximal traveling per frame to have the weapon separate following the real prop when the player aim in first person.
     
  6. Deleted User

    Deleted User

    Guest

    Will Puppet Master and / or Final IK use the new Unity Job System for high performed code?
     
  7. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
  8. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    Partel, in this video



    I am using Final IK to get the tripod puts its feets over groung, but I cannot get it works properly

    I have managed well this small aliens and soldiers (as you can observe in video), but not with Tripods. What can I be doing bad? I am using a mesh variation of 3DMAESEN Tripod
     
  9. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Already working on creating AnimationJob versions of my IK solvers. They will have to be built from scratch though so it will take time. About PuppetMaster, there's not much that can be done with Jobs at the moment, but Unity is working on some solutions that might make it possible to implement it.

    Hey, thanks for sharing the new video, looking cool! :)
    Which solver are you using for those tripod legs? Have you verified that the IK targets are in the right places, where they are supposed to be? Have you tried to increase max iterations?

    Best,
    Pärtel
     
    Deleted User and hopeful like this.
  10. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    Thanks for your quick response Partel. I am using Grounder IK and yes, the ik targets is supposed to be in right place. Any suggestion?:





     
  11. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Does it work if you set "Quality" to "Fastest" in GrounderIK?
    If you could send me that fbx and a walking animation to support@root-motion.com, I'd take a look.

    Best,
    Pärtel
     
  12. Soulghai

    Soulghai

    Joined:
    Mar 24, 2016
    Posts:
    15
    Hello Partel!
    I saw your Bomb demo in Final-IK. But it's not exactly what I want.

    I'm trying to do this
    _puppetMaster.state = PuppetMaster.State.Dead;
    r.velocity = (direction.normalized + Vector3.up * upForce) * explosionForce * forceMlp;

    Puppet dropped but force didn't apply. I'm newbie )
    Can you help me?
     
  13. Deleted User

    Deleted User

    Guest

    Velocity on the muscles gets applied when you kill your puppet.
    Because of this reason i made this Function which i put in the PuppetMasterStates.cs

    I have need this to move the muscles rigidbody directly after the kill, so i created KillImmediately to kill the puppet this way.

    Code (csharp):
    1.  
    2.         /// <summary>
    3.         /// Kill the puppet Immediately
    4.         /// </summary>
    5.         public void KillImmediately()
    6.         {
    7.             //state = State.Dead;
    8.             activeState = State.Dead;
    9.  
    10.             mode = Mode.Active;
    11.  
    12.             if ( stateSettings.enableAngularLimitsOnKill )
    13.             {
    14.                 if ( !angularLimits )
    15.                 {
    16.                     angularLimits = true;
    17.                     angularLimitsEnabledOnKill = true;
    18.                 }
    19.             }
    20.  
    21.             if ( stateSettings.enableInternalCollisionsOnKill )
    22.             {
    23.                 if ( !internalCollisions )
    24.                 {
    25.                     internalCollisions = true;
    26.                     internalCollisionsEnabledOnKill = true;
    27.                 }
    28.             }
    29.  
    30.             // Set pin weight to 0 to play with joint target rotations only
    31.             foreach ( Muscle m in muscles )
    32.             {
    33.                 m.state.pinWeightMlp = 0f;
    34.                 m.state.muscleDamperAdd = stateSettings.deadMuscleDamper;
    35.  
    36.                 m.rigidbody.velocity = m.mappedVelocity;
    37.                 m.rigidbody.angularVelocity = m.mappedAngularVelocity;
    38.             }
    39.  
    40.             foreach ( Muscle m in muscles ) m.state.muscleWeightMlp = stateSettings.deadMuscleWeight;
    41.             // Disable the Animator
    42.             SetAnimationEnabled( false );
    43.             foreach ( BehaviourBase behaviour in behaviours ) behaviour.KillStart();
    44.             foreach ( BehaviourBase behaviour in behaviours ) behaviour.KillEnd();
    45.             if ( OnDeath != null ) OnDeath();
    46.             lastState = State.Dead;
    47.             state = State.Dead;
    48.         }
    49.  
     
  14. Soulghai

    Soulghai

    Joined:
    Mar 24, 2016
    Posts:
    15
    Thank you, Useless-Media.
    Character dying immediately. But then he lies absolutely calmly =)
    I can't push the puppet up
     
  15. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    You'll have to set the velocity of the muscles, not the character rigidbody:
    Code (CSharp):
    1. foreach (Muscle m in puppetMaster.muscles)
    2.             {
    3.                 m.rigidbody.AddExplosionForce(force, position, radius);
    4. }
    Hey,
    Maybe the PuppetMaster is parented to that character controller? The PM dual rig hierarchy should look like this:
    1) Root (nothing on it, just a folder for the rig)
    2)Character Controller (the character controller and the animated character model)
    2)PuppetMaster

    If PuppetMaster is a child of the Character Controller, it will inherit velocities from it, which it should not do and that might cause the problems you are seeing.
     
  16. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    There will always be a bit of lagging behind as the rigidbodies need to be accelerated physically. Setting the Animator to AnimatePhysics helps somewhat as otherwise the ragdoll always lags 1 frame behind due to the limitations of Unity's internal update order of event functions. But it really shouln'd be noticable. If the head acts like its on a spring, you'll probably have to increase "Muscle Spring". Could you make a video of what you are seeing please and send to support@root-motion.com if you prefer to keep it private. Then I can see whether the lag you are described is within "normal range" or not.
    Btw, if you set the "Normal Mode" in BehaviourPuppet to "Unmapped", the mapping will be disabled until there is a collision and blended back out again once the collision has been processed so you'll get to keep 100% animation accuracy most of the time. "Kinematic" mode does pretty much the same, but switches PM to "Kinematic" too when there's no collision.
    Yes, in Kinematic mode the rigidbodies are moved to their targets by rb.MovePosition/MoveRotation, but mapping is disabled so you should never see the "ragdoll version" of the character pose in game anyway.

    Best,
    Pärtel
     
  17. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    143
    Hi I am trying to use your amazing software with Opsive third person controller but I have no luck.
    In particular, following your tutorial on youtube I arrive at the point where my character start to jitter terribly.
    I use Unity 2018.2.

    If you need I can post a video of it.

    Do you have any suggestions? I have no idea how to overcome the problem.

    Many thanks,

    Dom
     
  18. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    I've recently updated the integration package to Opsive's Motion Controller v2.73, please try that.

    Best,
    Pärtel
     
  19. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    143
    H
    Hi thanks but when I import the package I get the following errors:

    error.png

    Any Ideas? I tried even with a fresh project
     
  20. aspire9

    aspire9

    Joined:
    Aug 8, 2013
    Posts:
    45
    I think you're confusing Opsive's Third Person Controller (the one micuccio asked for) with Ootii's Motion Controller (the integration package you linked to).
    I'm also interested in a updated integration package for Opsive's Third Person Controller.
     
  21. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Oh, I'm so sorry, I misread.
    Anyway, I just created an integration package for Opsive as the tutorial seems outdated due to their updates.

    Please play the scene (read the README! comments before you do) and also read the Instructions.txt to learn how to set it up on your own.

    Best,
    Pärtel
     
    Arganth and aspire9 like this.
  22. Chris45215

    Chris45215

    Joined:
    Jan 30, 2016
    Posts:
    16
    Partel, this is a great asset and a huge help for my swordfight simulation with the Oculus Rift, but I'm running into a few challenges that I could use a hand with. I put together a quick video to show them at
    (the video is set as unlisted, but should be watchable from the link).

    The first problem is at 9 seconds rather than 10. I can't find any collidable object that could be deflecting the hand like that. The character model is the AdamKnight asset from the Unity store, but it uses animations I put together in Maya (I'm not a good animator, but I needed specific moves that I can't find elsewhere). The only thing I can think of is that I had to import the Maya rig/prefab with animation type Generic rather than Humanoid, due to some gimbal lock issues - but I used that character on the left to create the PuppetMaster version on the right and they follow the same routines. And because I'm a bad animator, when running in Scene view the 'bones' for the sword do stick out to the right, but nothing connects to those bones - the sword's colliders are children of the RightHand - and those bones don't intersect with anything.

    For the second problem, I'd be happy to change the masses to more realistic amounts, once I figure out how to get the mapping, pinning, and muscle weights just right. I'd love to make the deflection apply through the arm more realistically, but just haven't gotten around to it yet (and I'll affix the left hand to the sword properly when I do that).

    Any advice you can provide would be a great help, thanks! I can send a project file if that would help, but there's a lot of assets bloating the project so it would take a while for me to upload.
     
  23. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey, thanks for taking the time to make that video!

    1) Do you have "Angular Limits" or "Internal Collisions" enabled in PM? Could be that either the limits don't allow for enough freedom of rotation (need to be loosened up) or the hand/sword colliders with some other collider of the puppet.

    2) Vibrations when colliding. The pinning forces are trying to reach a pose that is blocked by the collisions, so after a certain point the conflicting forces get very strong and the physics gets wacky. Either force has to yield. If it can't be the collisions, it has to be the pin forces, so you'll have to reduce the pin weights on the hands on collision. If you are using BehaviourPuppet, that can be done in it's "Group Overrides". If you have a group for (can make one) for Prop and Hand muscle groups, you can lower Collision Resistance for that group of muscles.
    Also reducing friction of the PhysicMaterial used by the swords will help.

    3) Colliders passing through each other. Have you tried using the Continuours and ContinuousDynamic collision detection modes for the swords? Set the player's sword to ContinuousDynamic and the knights sword to Continuous.
    You can also adjust collider size dynamically by it's angularVelocity.magnitude. If it's slow, use the right size, if it moves fast, scale the collider up.

    Best,
    Pärtel
     
  24. westryder907

    westryder907

    Joined:
    Dec 28, 2016
    Posts:
    61
    I've got PuppetMaster working in Unity 5.x / 2017 but in Unity 2018.2.2f I can get the Ragdoll and PuppetMaster created but when following your tutorial [PuppetMaster Tutorials - Integration Part 2 (Opsive)] on Youtube I can't get past the part (6:15 in the video) where you add the namespace "using RootMotion.Dynamics".

    Am I completely missing something now or is PM not quite ready for Unity 2018.2x? Assistance would be greatly appreciated! Thank you very much! :)
     
  25. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Did you mean the scripts won't compile if you add using RootMotion.Dynamics?
    Also, I have just recently made an Opsive integration package, as that tutorial is out of date due to their updates.

    Best,
    Pärtel
     
  26. westryder907

    westryder907

    Joined:
    Dec 28, 2016
    Posts:
    61
    VisualStudio doesn't even recognize "using RootMotions.Dynamics" as being valid, it gets underlined in red as if it were an invalid line of code.

    I've attached an image showing the direct issue here. Untitled-3.png

    I am not using Opsive TPC for this and Opsive TPC isn't even imported into this project, I was wanting to get the falling behavior working on my AI enemies. This is just a standard rigged FBX model I'm using. Though I don't see how that should cause any issue.

    ***** UPDATE *****
    I solved this by restarting Visual Studio Community 2017.
     
    Last edited: Aug 18, 2018
  27. Chris45215

    Chris45215

    Joined:
    Jan 30, 2016
    Posts:
    16
    Partel, thanks, the changes helped a lot and now the physics works like a charm (and I had made the rookie error of putting some physics objects on Oculus prefabs that used Update() rather than FixedUpdate(), which created extra jitter on its own).

    I also updated my assets so it uses the PuppetMaster prop system, and I'm trying to add the connection for the knight's left hand to the hilt of the sword. What's official way to do this? Based on the Prop system's documentation, I think I'd need to put two Configurable Joints onto the sword prop, but I don't know a way to tell each hand's Prop Root to connect to the correct Configurable Joint - as both the joints are on the same GameObject - unless I explicitly set that on the prop. I think the documentation leaves that value blank, so I want to double-check just in case. When I do that, the result looks pretty good. Should I add another child with the Prop Root component to the left hand? The animations were made for the 2-handedness of the weapon, so I think the result with PuppetMaster will look very nice and clean as long as I don't push the enemy too far. In fact, it'll probably hide some of my animation errors.

    Thanks again!
     
    Last edited: Aug 18, 2018
  28. igoraleftinovich

    igoraleftinovich

    Joined:
    Feb 11, 2017
    Posts:
    17
    Hi! I have updated to Unity 2018.2.4 and grounder components become broken. The project compiles without errors but unity does not see grounder components. I have updated to the latest final ik version but still have the same issue. How to fix it?
     
  29. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Good afternoon @Partel-Lang

    What is the recommended way to set up characters so that the unpinned ragdoll doesn't get stuck in place like this? I was using the Stagger / Puppet demo character to test it. The car hits him, the actual skeleton got stuck to the front of the car and was pushed away but the ragdoll stays in place for the most part and while it tumbles over the car, it does it while being stuck. Any recommendations? Essentially I would like it so that when hit by a car or something big, the ragdoll can go full ragdoll and just fly backwards but if they get say, hit with a weapon of some kind or punched, it will still do the staggering motion.


     
    Last edited: Aug 21, 2018
    hopeful likes this.
  30. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    Heh! The visual there reminds me of old time cartoons where when the character died, the soul would separate.
     
  31. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    The props can be attached to a single Prop Root. It's because it is not possible for an object to have multiple parents. If you need to connect the other hand, you should do it with a Joint of some kind, I mean just add a FixedJoint or some other type of joint that connects the left hand rigidbody to the prop rigidbody.

    Hey,
    Just tested in Unity2018.2.4. The demo character controller is broken in 2018.x (will be fixed in the next version, for now you can set Animator's Update Mode to "Animate Physics" to make it work), but the Grounder itself looks alright, I don't see any problems with it here. What exactly did you mean by "Unity does not see grounder components"? Could you give me a screenshot or something please?

    Hey,
    When the Stagger behaviour activates, it sets all pin weights to 0, so there is nothing in PuppetMaster, that keeps the ragdoll in place. It might be foot of the ragdoll getting stuck beneath the car and the rest of him on top of it, so it breaks the ragdoll as the joints try to pull it back together. If the car has a complex mesh collider, that is more likely to happen. Does it change anything if you increase "Solver Iteration Count" in PM? What happens if you try to push it with a big cube with a box collider with a rigidbody instead of that car?

    Best,
    Pärtel
     
  32. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Thanks for the reply, I added something of a "grill guard" to the front of the car and put it at a slight angle and then made it go through the floor so that the feet don't get stuck under the car and made it a kinematic rigid body and that helped a ton. Its working out pretty well now. Every now and then it freaks out and the arms and legs flail about and he gets kind of stuck to the front, but other than that it's close to how I want.

    Thanks!
    -MH
     
  33. VP_no1

    VP_no1

    Joined:
    May 12, 2018
    Posts:
    132
    @Partel-Lang
    I studied for like 4 days (of course not every hour) almost all what you wrote and the videos. I also played with a lot of demos. After reading more some things but some have not :) (i still have some demos to study in FBBBIK folder :) )
    It would give me a lot of confidence to answer some questions please. Here it goes.

    1. Because I am not good at animation and I am much better in math and physics, I dont want to use any existing animator because they all rely on animations.
    So, I would like to make everything procedural. I read it can be done for movement. What would be a simple guide to follow to do this ? The only way I can understand it for now is to have multiple poses saved to my character and then make the transitions among them with final IK. The poses should be saved in Locomotion state like simple animation Locomotion controller ? Any loop needed ? Or just insert a method in the player controller that does the transition bewtween poses with final IK classes used ?Throw me a bone please :) How will it handle slopes ?
    1.1 For the Jumping I need to have a different state in the animator with that pose ? How do I make the Ik transition so I have a simulated animation ? How will it handle the surface to jump on ?
    1.2 For hitting with legs/hands I must make Limb IK for each member I think. Should I then have a pose for each final placement and have a procedural blend to it ? I am in the same spot as above, what are the things I have to work on so it will work ?
    1.3. If I want to jump on a wall and stick to it and then climb it or move sideways on its edge wich demo is the most apropriate to study / what would be a good aproach to this ?
    2. Regarding props:
    2.1 I understand the usage and hierarachy of those and that I should have only one active / or none if I use bare hands and build my own inventory to keep my weapons if I want to manipulate them more. I understand they can be easily switched through code, yet my question comes regarding animation again :
    2.2 If I have a bow it is different than the recoil example (where I should just add some bullets to be fired as script). So:
    2.2.a In case of a shooting bullets weapon, can those bullets be connected with the weapon and get some IK "features" ? :)
    2.2.b In case of a bow, what would be the appropriate usage of IK ? Use Limb IK on hands and CCD on bow and string?
    3. Regarding interactions:
    3.1 When hitting a colider with the puppet you created the Behaviour Puppet. If I want to manipulate how it behaves with different objects, I should work on the mass of my character and those objects or I must set up something else in order to have different behaviours besides falling ? My logic says that is neough playing with the objects' behaviours ...
    3.2 Similar question to 1.3 regarding moving on a wall edge in the climb pose.
    3.3 I have some more questions here but I will study more the demos and read again the IK documentation with objects interactions

    Thank you!
     
  34. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Have any other behaviors been added or created by users or anything minus "Fall", "Puppet", "Stagger"?
     
  35. Partel-Lang

    Partel-Lang

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

    1. Here's a GDC talk that shows a system similar to what you were describing. I suspect it would be easier to just learn to animate instead of building all that though. :)
    As for Final IK, you could for example use FullBodyBipedIK to pose it and move it by moving the IK targets and store those IK poses and then interpolate between some poses, but that's basically like animating a character in a 3D app. Haven't tried it, it's not exactly what FIK was designed for.

    Concerning all those other questions about jumping and hitting, that all depends on how you want to build up your controller without any animations and I don't really have any idea how you intend to do that so I don't know how to answer, sorry.

    1.3 This is also normally done with animation that is designed for predefined climbing blocks, I mean the climbable surfaces are usually standardized and animations created for them. That's the best way to approach it unless you want to spend a decade creating something like the free climbing system in Assassin's Creed. I don't have any climbing demos in the package at this point.

    2.2.a and b. Normally bow aiming with IK is done with AimIK. You set the hand that holds the bow as "Aim Transform" and assign some spine bones as "Bones" of AimIK, that's it. If the aiming is done on the spine level, there's no IK other than that required. If you use the bow holding arm bones in the aiming, you'll have to use LimbIK on top of AimIK to put the other hand back to where it was relative to the bow hand in the animation.

    3.1 Yes, you can adjust the mass of the different objects and you can use the "Collision Resistance Multipliers" in BehaviourPuppet to adjust collision resistance for specific layers.

    3.2. Somebody did this with PuppetMaster. I believe it was done by playing a climbing animation with muscle force, and having just the hands pinned to it.

    Hey,
    Not that I know of. What kind of a behaviour would you need?

    Best,
    Pärtel
     
  36. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hi all!

    I've been working on a Q&A site that would make it easier for you guys to find answers about Final IK and PuppetMaster. It doesn't have many questions/answers yet, but I have started to fill it in with some FAQ stuff and hopefully you'll find it a better place than this forum to get your answers too.

    So here it is. :)

    Cheers,
    Pärtel
     
  37. VP_no1

    VP_no1

    Joined:
    May 12, 2018
    Posts:
    132
    @Partel-Lang
    The ideea came exactly after watching this but I am not yet able to do it all alone.
    I will just take some Mixamo, build a controller and use code to make it work.
    Then I will apply IK to tweak the motions + your info above.
    Is it correct way of using Final IK :) ?
     
  38. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Yes, that's the way to go.
    The keyframing system in that video is basically exactly like Mecanim interpolating between keyframes in Unity. If you want to make your animations just 3 keyframes long, the result will look the same. Animations are just curves, they can be evaluated at any time and frequency, no matter how many keyframes you have. I think they had to roll their own animation system like that in Wolfire just because they had a custom built engine that didn't have something like the Animator.

    Best,
    Pärtel
     
  39. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    I am not very imaginative, so honestly, I am not really sure. It could very well be that I don't need any, I just like to try out new things, lol. I am not exactly sure what would constitute a behavior over what would end up being just an animation with a specific IK goal or anything. I was mostly just wondering if anyone had possibly come up with anything.
     
  40. JohnDumplingDesign

    JohnDumplingDesign

    Joined:
    Jun 14, 2018
    Posts:
    1
    @Partel-Lang Hi Partel, I'm hoping you can answer me this quick question.

    I'm adding a force to the rigidbody of a puppet, i.e to launch the puppet in a direction, at the same time I'm setting the state to dead so it'll release the puppet and actually launch it through the air etc but if I then set it back to alive the puppet snaps back to its original position prelaunch instead of getting up at its new position, what am I doing wrong?

    Thanks in advance.
    John
     
  41. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Not that I've heard of at least. I've been thinking about making a catch fall behaviour that would pose the ragdoll according to the direction of falling with IK.

    Hey,
    What kind of a character controller are you using? It might be that the character controller keeps forcing the character to that position where it last was. Character controllers must be disabled from changing character position, rotation and animation while behaviourPuppet.state != BehaviourPuppet.State.Puppet;

    Best,
    Pärtel
     
  42. a365384849

    a365384849

    Joined:
    Mar 12, 2015
    Posts:
    1
    [QUOTE =“Partel-Lang,帖子:2320117,成员:173554”]大家好!

    我很自豪地向您介绍PuppetMaster,这是一种先进的角色物理工具,使其成为资产商店的方式。除了它的运动学兄弟Final IK之外,它还是Unity可用的专业制作质量程序动画工具中缺失的环节。

    我们可以用PuppetMaster做什么?

    创建活动的布娃娃,可以使用肌肉力量跟随角色的动画和/或将布娃娃骨骼物理地固定到他们的动画目标上。


    只需在角色堕落/死亡后继续制作动画。在下面的GIF中,角色的动画(由青色骨架表示)在两个动画状态之间简单地交叉淡化,基于布娃娃从地面的高度。


    确定每个肌肉或肌肉群的肌肉/钉扎特性。按照以下顺序,上半身仅释放到肌肉动画,而下半身仍固定在世界空间的动画中。


    同样的逻辑适用于2个字符......


    动画木偶也可以使用简单的关节链接到运动刚体。


    PuppetMaster可以通过Puppet Behaviors进行扩展,提供一种模式来开发动态调整肌肉和钉扎重量,力量和其他属性的功能,或者对目标姿势进行运动调整。下面使用的行为(BehaviourPuppet.cs)会在碰撞时放松固定。如果布娃娃骨头离目标太远,傀儡会失去平衡。


    ...此行为也可用于更复杂的角色控制器。触发掉落/起动动画也由BehaviourPuppet自动处理。


    上面的视频更长,质量更好:
    [媒体=的YouTube] 0xICBEQoFvs [/媒体]

    以及整个软件包的完整概述视频:
    [媒体=的YouTube] on7wAz0fsGg [/媒体]

    为方便起见,PuppetMaster还包含用于自动生成布娃娃的工具,并在场景视图中可视化地编辑碰撞器/关节。

    [媒体= YouTube的]的y luLRVmL7E [/媒体]

    干杯,
    Pärtel[/ QUOTE]
    [QUOTE =“Partel-Lang,帖子:2320117,成员:173554”]大家好!

    我很自豪地向您介绍PuppetMaster,这是一种先进的角色物理工具,使其成为资产商店的方式。除了它的运动学兄弟Final IK之外,它还是Unity可用的专业制作质量程序动画工具中缺失的环节。

    我们可以用PuppetMaster做什么?

    创建活动的布娃娃,可以使用肌肉力量跟随角色的动画和/或将布娃娃骨骼物理地固定到他们的动画目标上。


    只需在角色堕落/死亡后继续制作动画。在下面的GIF中,角色的动画(由青色骨架表示)在两个动画状态之间简单地交叉淡化,基于布娃娃从地面的高度。


    确定每个肌肉或肌肉群的肌肉/钉扎特性。按照以下顺序,上半身仅释放到肌肉动画,而下半身仍固定在世界空间的动画中。


    同样的逻辑适用于2个字符......


    动画木偶也可以使用简单的关节链接到运动刚体。


    PuppetMaster可以通过Puppet Behaviors进行扩展,提供一种模式来开发动态调整肌肉和钉扎重量,力量和其他属性的功能,或者对目标姿势进行运动调整。下面使用的行为(BehaviourPuppet.cs)会在碰撞时放松固定。如果布娃娃骨头离目标太远,傀儡会失去平衡。


    ...此行为也可用于更复杂的角色控制器。触发掉落/起动动画也由BehaviourPuppet自动处理。


    上面的视频更长,质量更好:
    [媒体=的YouTube] 0xICBEQoFvs [/媒体]

    以及整个软件包的完整概述视频:
    [媒体=的YouTube] on7wAz0fsGg [/媒体]

    为方便起见,PuppetMaster还包含用于自动生成布娃娃的工具,并在场景视图中可视化地编辑碰撞器/关节。

    [媒体= YouTube的]的y luLRVmL7E [/媒体]

    干杯,
    Pärtel[/ QUOTE]Vertex disturbances occur when using plug-ins
     
  43. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    I would be very interested in this. My current game I am making, it would actually be ideal to have a target direction in which the character would stagger and/or fall toward each time
     
  44. igoraleftinovich

    igoraleftinovich

    Joined:
    Feb 11, 2017
    Posts:
    17
    It seams like there was a problem with the Unity's cache. I have created new Unity project and import all assets from my actual project and that has fixed the problem. So...can't do the screenshot but in the inspector there was no any properties for the grounder component, just text about errors in the script.
     
  45. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    Did you mean you needed to make sure the character falls towards a certain dictated direction?
    In that case, "Death Procedures" might be a good demo for you to get started with. Requires an animation to start off the dying process, but there are tons of (free) dying animations for each direction out there, but the results I think are highly realistic.

    Best,
    Pärtel
     
  46. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Hello @Partel-Lang

    Does PuppetMaster have any know issues with objects being under parent objects? I made a waypoint system and I have one set up for one group another setup for another. The way it is setup is There is a top level parent which is the main system and then a second parent which houses the people :

    SystemA --|
    HolderGroupA--|
    Person
    Person
    SystemB --|
    HolderGroupB--|
    Person
    Person


    It seemed to work ok like the above most of the time. What I attempted to do is put both systems under another parent for organization to keep several systems from just being in the root hierarchy like below :

    Systems --|
    |SystemA
    | HolderGroupA
    | Person
    | Person
    |SystemB
    | HolderGroupB
    | Person
    | Person
    |OtherSystems


    It took me far longer than I would have liked it to, to figure out why things from HolderGroupA were not unpinning from collision with HolderGroupB, but both groups A and B would unpin if my character (who was just in the root unparented) could go up and throw the test ball at them and they would unpin. After a few tests and rearranging from being a child 1-2 levels deep to being closer to the root, I would get much more unpinning success it seemed.

    So I was just wondering, is this something that is known and I just have to deal with the fact that the systems have to remain closer to the root in order to unpin from each other?

    Thanks!
    -MH
     
  47. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,554
    Hey,
    It's a known limitation with current PuppetMaster, you should not parent puppets to the same gameobject.
    It's in MuscleCollisionBroadcaster.cs, lines 93, 104 and 115. It checks if collision collider transform root is the same as muscle transform root to skip processing internal collisions. This limitation is there because it is the fastest way to check that and it needs to be as fast as possible because there could be a lot of collision messages each frame. Wouldn't want to do a GetComponent call there.

    Best,
    Pärtel
     
  48. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Oh, I see, so any and all characters should have no parent at all? That very well might account not only for the issue I was having with it not colliding properly, but some of the performance issues than I would guess, too?

    Just to be sure I am understanding you correctly, I have the actual PuppetMaster character still setup the way it is supposed to be. If you see below, I have a root object, which I am counting as "my charcter", so under that root object is my actual character that has the controller, I have the puppetmaster, and the behaviors. That has not changed. The only thing I was attempting to do was place my characters root under another gameobject, which in the pic would be the "Pedestrians" gameobject of my waypoint system.




    In this second image, you will see how I took the "WaypointSystem-Ped" and put that under the "Systems" game object along with the "WaypointSystem-Veh", that was when I began to have lots of issues.



    Am I understanding you correctly that the actual character root object should be directly in the root of the hierarchy and not under any sort of parent except for itself?
     
  49. Deleted User

    Deleted User

    Guest


    It should not on the same root because of the MuscleCollisionBroadcaster of the Muscles.
    Im sure this have a deeper reason but when you look in the MuscleCollisionBroadcaster.cs in the CollisionEnter Function at line 105 then you have see a blocking of collision behaviour.
    Code (csharp):
    1. if (collision.collider.transform.root == transform.root) return;
     
    Partel-Lang likes this.
  50. Chris45215

    Chris45215

    Joined:
    Jan 30, 2016
    Posts:
    16
    Partel, an additional person has my project and we'll both be using the characters made with PuppetMaster, though I may be the main person setting up and configuring the puppets. I can't find the license terms for PuppetMaster and the asset store isn't quite clear on the topic. Should I purchase an additional license for my collaborator on this project, or are we fine using just the single license?

    The tool is so good and I don't want to shortchange you.

    Thanks,