Search Unity

Dynamic Bone - Realistic swaying ponytail and bouncing boobs

Discussion in 'Assets and Asset Store' started by HorngYuiWei, May 11, 2014.

  1. fengkan

    fengkan

    Joined:
    Jul 10, 2018
    Posts:
    82
    Is it possible to add a callback function when the colliders collide?
     
  2. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    the direction of "End Length" depend on last two bones.
    if it's not correct please set "End Length" to 0 and use "End Offset" instead.
     
  3. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    there is no build-in collision callback.
    but it's easy to modify script.
     
  4. Kyrieru

    Kyrieru

    Joined:
    Mar 2, 2015
    Posts:
    42
    For some reason this does not work with an auto-rig-pro export. It works with all bones except bones created manually.
    Under what circumstances would a bone be moveable by normal means, but not by dynamic bone?
     
  5. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Dynamic Bone work with any game object hierarchy. It does not care is it skined or not.
    You can send a simple test project to willhongcom@gmail.com. I'll look into it.
     
  6. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    you can use script function SetWeight() to control how physics blend with existing animation.
    or just set enabled = false to disable it.
     
  7. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    you can use script function SetWeight() to control how physics blend with existing animation.
    or just set enabled = false to disable it.
     
  8. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    155
    Hi @HorngYuiWei, is there anyway to get this to run with timescaling? Adjusting the frequency of the computation in the component basically runs the dynamic bones at normal speed. Is there somewhere in there where it can also adjust the movement deltas instead such that the simulation is smooth, but the distances per frame are relative timescaling?
     
  9. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Hi,
    I‘m working on new version which may fix this problem.
    please mail to willhongcom@gmail.com to request it.
     
  10. ferverence

    ferverence

    Joined:
    Jul 15, 2014
    Posts:
    56
    Hello. Could someone assist with these errors found on import? Looks like some parameters of Plane in 2019 doesn't take 2 arguments anymore. Is there an updated version of Dynamic Bone? Thanks.

    upload_2020-8-11_11-43-46.png
    upload_2020-8-11_11-44-10.png


    https://docs.unity3d.com/ScriptReference/Plane.GetDistanceToPoint.html

    Resolved: By modifying where Planes were being declared and adding "UnityEngine." ex. UnityEngine.Plane movePlane = new UnityEngine.Plane();

    Works great now.
     
    Last edited: Aug 11, 2020
    HorngYuiWei likes this.
  11. Evanrych

    Evanrych

    Joined:
    Jun 15, 2017
    Posts:
    2
    any tips on how to implement chronos time control for slow motion on the dyanmic bones
     
  12. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    872
    This desperately needs a "Include" instead of just exclude. I have a system where bones may be instantiated, and lets say if I add hair bones, and cat ears, I can't tell the hair physics to exclude the cat ears.

    But if I had an "include only", type thing it would work.
     
  13. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Hi,
    I'm working on a new feature. Allow multiple "Root".
    please mail to willhongcom@gmail.com to request it.
     
  14. tagrandmere0

    tagrandmere0

    Joined:
    Nov 11, 2017
    Posts:
    5
    New
    Hi, i got a Daz Model , but hair got no bones, if i buy your product did i need to put bones into my hair shape to make it move? thanks
     
  15. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Yes, you need to add bones to hair before using dynamic bone.
     
  16. FORNya

    FORNya

    Joined:
    Nov 2, 2018
    Posts:
    6
    Hi, I use Dynamic Bone and Constraint, for an object track an leaf bone with Dynamic Bone.
    It works on 2018.4. However it doesn't work on 2019.4 or higher.

    upload_2020-9-15_6-11-42.png

    the "Constraint Object" are never swaying. It looks like no exist Dynamic Bone on "Constraint Object".
    But "Dynamic Bone End(leaf)" are swaying as correct.

    How to track the object?

    Thank you in advance.
     
  17. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Hi,
    It seems Unity changed Constrain update order in version 2019.
    https://forum.unity.com/threads/parent-contraints-evalutation-execution-order-and-ik.819849/

    You can write your own constrain script. use "Script Execution Order' functionality. Let dynamic bone update after the constrain script.
     
    FORNya likes this.
  18. davidgbarnes_inertialframes

    davidgbarnes_inertialframes

    Joined:
    Sep 15, 2017
    Posts:
    8
    Hey there everyone. Anyone had success using Dynamic Bone to get breast jiggle on a character exported from Reallusion Character Creator 3?

    The exported rig lacks lCollar and rCollar bones and instead has lRibTwist and rRibTwist, each with child lBreast and rBreast, which are /very/ short. I place the dynamic bone on the RibTwist but the end result is still too much motion at the tip like its "floppy" while the breast proper doesn't move enough. Anyone got suggestions? Please, I hope so!
     
    Milo88 likes this.
  19. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    You can try set "End Length" or "End Offset" parameters.
     
  20. davidgbarnes_inertialframes

    davidgbarnes_inertialframes

    Joined:
    Sep 15, 2017
    Posts:
    8
    I have tried a lot of combinations. But my reading of the docs is that the end length means another bone is added. I kind of want the opposite, a bone removed, which would of course require re-weighting the skinned mesh. For now I've achieved what I want with vertexmotion, but I will see what other approaches might work. Basically dynamic bone works beautifully with a Genesis 8 character out of DAZ as FBX and straight into Unity, but it does not work (as described above for breast jiggle) if that character is taken through Character Creator 3 and then exported to Unity. Live and learn :)
     
  21. dizzymediainc

    dizzymediainc

    Joined:
    Apr 6, 2014
    Posts:
    432
    I seem to be having an issue integrating this with Final IK, it works fine by itself but once Final IK is on there is a lot of jittering going on with the bones. In my case i'm using DB for a cloth around the waist, so anytime Final IK does anything, i.e adjust the feet, etc., the cloth spazes out.

    Any thoughts on how to fix this issue?
     
  22. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    you can try use Unity's execution order function:
    from menu Editor->Project Settings->Script Execution Order
    add both Final IK and Dynamic Bone scripts , put Dynamic Bone after Final IK.
     
    dizzymediainc likes this.
  23. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Please send exported character to willhongcom@gmail.com
    I'll look into it.
     
  24. dizzymediainc

    dizzymediainc

    Joined:
    Apr 6, 2014
    Posts:
    432
    That did the trick! Thanks! :D
     
  25. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    We've been using Dynamic Bone for years, really a great thing. But we have a new need. Is there any way to have the terrain be the collider for the dynamic bone object? (Player is carrying a carcass and it needs to drag nicely on the terrain surface.) I'm guessing not, but it's always worth asking.... (Currently i have a capsule collider set to Inside, but that doesn't account for terrain slopes)

    thanks!
    Dave
     
  26. FORNya

    FORNya

    Joined:
    Nov 2, 2018
    Posts:
    6
    I cannot take the solution for VRChat. I drop support 2019 or later on my project.
    I hope to found good solution for VRChat.

    Thanks your information.
     
  27. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    sorry, terrain collider is not supported now.
     
  28. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Final IK is supported by VRChat. It's execution order is adjustable.
    but I'm not sure is it provide constrain you needed.
     
  29. kevojo

    kevojo

    Joined:
    Apr 25, 2017
    Posts:
    12
    I'm wondering if it would be feasible to only simulate relative to a certain transform? Specifically, when the character moves in it's own local space, the bones simulate to the movement, but when the character is parented to an object which is moving, the dynamic bone components do not simulate to the world movement, but still only to the local movement of a transform I set.
     
  30. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Increase "Inert" can cancel out global movement.
     
  31. brummer

    brummer

    Joined:
    Jul 3, 2013
    Posts:
    31
    Not sure i'm missing something, but is it possible to dampen per local axis?
    Some types of cloth would realistically not swing as much on certain axes, but they could still swing a bit, so is there a way to cancel out forces in this way? upload_2020-10-19_11-24-5.png
     
  32. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    "FreezeAxis" constrain bones to move on specified plane. but it cancel out all forces of other axis.
     
  33. brummer

    brummer

    Joined:
    Jul 3, 2013
    Posts:
    31
    Hi!
    So it's not possible to just dampen it, rather than straight out cancel it?

    Also, i ran into another unexplained behavior.
    Sometimes my hierarchy of objects that i want to be shaken consists of a transform or two transform that i want to be a "chain", of which i only really need the first one to be shaken.
    The two objects (see linked video) share the same settings. One of them works just fine, while the other doesn't behave as a dynamic joint at all, only its children joints.
    What could cause this difference in how the script works on them, and how can i fix it?
     
  34. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Damping on one axis is not supported now.

    Dynamic Bone modify rotation only if a gameobject has exact 1 child.
    But Boomerange1_R has 2 children: Boomerange1_2_R, Boomerange1_3_R.
     
    Last edited: Oct 23, 2020
  35. argitoth

    argitoth

    Joined:
    Nov 18, 2020
    Posts:
    2
    Two question:

    1. It seems that if you have two dynamic bones that are also dynamic bone colliders and are set to collide with each other, one will collide with the other, but the other will not collide. In other words, A will collide with B, but B will not collide with A. Is there a solution?

    2. How do you recommend simulating soft body physics? I had an idea: create a spiral armature that goes around the inside of the body so that all bones are connected. Deforming one point will partially deform nearby points. Do you have another suggestion?

    Basically trying to create a soft body simulation where objects can collide with each other.
     
    Last edited: Nov 18, 2020
  36. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    1. dynamic bones that are also colliders not working correctly now.
    2. dynamic bone has only one fixed end. bones can not connected freely. you may consider using Unity's build-in physics system.
     
  37. argitoth

    argitoth

    Joined:
    Nov 18, 2020
    Posts:
    2
    It's gotta be your dynamic bones script. So I'll let you know if I figure out a setup that works. I'll skip the part where the objects collide with each other.
     
  38. Hannah_Dawson

    Hannah_Dawson

    Joined:
    Feb 28, 2018
    Posts:
    1
    I found a strange bug:

    If you try and modify a Dynamic Bones variable, like Damping or Inertia, using an animation clip, the script locks the value in place at runtime and it cannot be changed. If the animation clip is running, it will appear that the value has changed, but the script does not correctly apply the new value.

    This would be useful to fix for VRChat - it would allow people who are moving around to increase inertia if moving quickly, as this tends to cause Dynamic Bones to go a bit crazy at the moment.
     
  39. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    After modfing parameters, you need to call script function UpdateParameters().
    so use animation clip to modify parameters will not work correctly.
    You can try increase "Inert" parameter to remove character's movement from dynamic bone's physics simulation.
     
  40. Scanlab

    Scanlab

    Joined:
    Apr 27, 2014
    Posts:
    13
    @HorngYuiWei

    Is there any way to set the Root of each Dynamic Bone programmatically?

    Example: I have a character with 30 hair strings, I'd like to have a Check Box that would detect and set the Root as a parent of the component. Because when I do updates to the rig and joint names change, then I need to re-attach parents many many times.

    I don't CS to do that inside the script and I would really appreciate your help.
     
    Last edited: Dec 8, 2020
  41. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Hi,
    you can mail to willhongcom@gmail.com
    I can provide a special version to support this feature.
     
  42. Spikebor

    Spikebor

    Joined:
    May 30, 2019
    Posts:
    280
    hi Hong, congrat on this mega successful asset which is bought the most on the assetstore *because boobs lol*

    Since this asset animates bone, is there a possible setup that i can :
    - add rigidbody to the bone
    - continously add force to the rigidbody, so it moved >> to simulate realistic wind force applied to the character.
    - the end result : character animation + dynamic bone secondary motion + wind force

    pls pls pls tell me this possible.
     
  43. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Hi,
    dynamic bone do not work with rigid body.
    but you can apply force to dynamic bone by modify "Force" parameter.
    or set "m_Force" by script.
     
  44. Spikebor

    Spikebor

    Joined:
    May 30, 2019
    Posts:
    280
    Thank you for your quick reply
     
  45. FIFTYTWO

    FIFTYTWO

    Joined:
    Oct 21, 2014
    Posts:
    49
    Hello! Is there any way to avoid these jiggles while FPS drops?
     
  46. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    You can try Increasing "Inert" parameter.
    Change "Update Mode" to "Default" may also help.
     
  47. MrZeker

    MrZeker

    Joined:
    Nov 23, 2018
    Posts:
    227
    Hello, i have a problem with the asset. When the character walks the boobs move back toward the downwards and the body in a clipping ugly fashion.
    I tried putting the exclusion in different bones but it doesn't fix it.
    How could i fix it? i want the boobs to jiggle when running
     
  48. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Try increase "Inert" parameter.
    character's movement is ignored in physics simulation.
     
  49. MrZeker

    MrZeker

    Joined:
    Nov 23, 2018
    Posts:
    227
    oh thanks, that worked!
     
  50. tgiddings000

    tgiddings000

    Joined:
    Mar 1, 2021
    Posts:
    5
    Can we get a parameter to suppress the effects of the character's animation?

    It would effectively be an opposite of the "inert" setting -- where "inert" suppresses the contribution of root motion, this parameter would suppress the contribution of other animations.

    The compelling example is VRChat. Due to the game's input systems, a character's pose will often change a large amount in just a few frames. A dynamic chain will respond violently to this. The root motion, meanwhile, is much smoother. In a VRChat asset, the setting I'm requesting would be near-max while "inert" can be fairly low.

    You've mentioned in a few replies that it's easy to modify the script. Unfortunately, VRChat will not accept modified versions of your script. VRChat users would not be able to use a feature like this unless it was added to an official release.