Search Unity

Dynamic Bone - Realistic swaying ponytail and bouncing boobs

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

  1. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Hi,
    you can try attach dynamic bone script in character's root gameobject, instead of the bone you want to have physics.
    then set "Root" to the bone have physics.
     
  2. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    130
    @HorngYuiWei

    Quick question. Just to know, do you have a recommended bone count as a reference?

    In my game, there won't be many huge graphical prowess, but I *do* want things like lots of physics, etc. Around how many bones can I safely simulate in total for an average machine, in your opinion?

    Also, Colliders. I want to keep the hair from clipping into the body. Do I use Unity's default colliders (capsule, box, sphere) or do I have to use DynamicBoneCollider?
     
  3. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Hi,
    Dynamic Bone use it's own collider.
    performance depend on a lot of situation.
    It's best to test on your target platform.
     
  4. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Hi,
    dynamic bone blend physics simulation with existing animation.
    you can use script function SetWeight() to control how it blend or simply disable it.
     
  5. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    Is it possible to add chain of bones to NON skinned object using this asset? Or do I have to use other 3D software to add bones first?
     
  6. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Hi,
    actually dynamic bone apply physics to any gameobject hierarchy. It don't care is mesh skinned.
    but if there is only one gameobject and mesh. it won't work.
     
  7. mcmount

    mcmount

    Joined:
    Nov 15, 2015
    Posts:
    83
    Having an issue; I need to move the dynamic bone root joint position in runtime, however I can't seem to find the way to do it. Disabling->moving xyz with code and enabling just snaps the root joint back to the original position. Deleting the dynamic bone and assigning a new one in runtime ignores the physics completely unless I dial something from the inspector. Any help appriciated!
     
    Last edited: Jan 17, 2020
  8. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    130
    try to change the weight of the dynamic bone. Set_Weight(x) I think it is.
     
  9. mcmount

    mcmount

    Joined:
    Nov 15, 2015
    Posts:
    83
    Ok, answering to myself; anyone else trying to do this requires one modification to the dynamic bone script; make the SetupParticles() public and call it after you've moved your joints.
     
    nirvanajie and HorngYuiWei like this.
  10. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    @HorngYuiWei

    Hi. looking at your demo scene, if I increase the "Radius" to allow for collisions I get colliders at the base, breast, and the end of the white line. Is there a way to only have the collider on the breast (bone) instead of all three? Thanks.
     
  11. mcmount

    mcmount

    Joined:
    Nov 15, 2015
    Posts:
    83
    It's called the radius distrib, make a curve.
     
    HorngYuiWei likes this.
  12. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    298
    Does Dynamic Bone work with dynamic rigidbodies?

    I have an antenna attached to a car and the antenna is setup with bones. The simulation works but once the rigidbody speed is above a certain amount, Dynamic Bone starts to jitter. Any reason for this?

     
  13. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,490
    Hi, interested in this asset, can you advise if this might make hair look wavy/sway around if the head moves? Does it need bones? Is there a tutorial video/docs I can review? Thanks.
     
  14. frostyone

    frostyone

    Joined:
    Aug 2, 2018
    Posts:
    8
    Hello , is it possible to collide with Dynamic bone colliders with another object ?

    And how should it be setup if possible ?
     
  15. enblomquist

    enblomquist

    Joined:
    Jul 25, 2012
    Posts:
    85
    Give your character the dynamic bone collider component!
     
  16. PuzzledBoy

    PuzzledBoy

    Joined:
    Sep 9, 2014
    Posts:
    23
    Hi,Is there a plan to support Unity Job System?
     
  17. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    130
    So I'm having a little problem with animations and the DynamicBones. So, here's the thing. When I use static animations, with no root motions, the bones behave correctly. When I want to make an animation where the character moves around, the bones are very janky, looks like they're always updating. Here, take a look at these:

    This is the problem video:


    This is how it's working with a static animation:


    Any ideas what can I do to fix this?
     
  18. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    you can try increase "inert" parameter
     
  19. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    dynamic bone simulate physics on bones. there should be bones in hair before use it.
     
  20. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    It's in future plan.
     
    shyamarama likes this.
  21. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    try increase "inert" parameter.
     
  22. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,490
    Hi, just a question, interested in purchasing but have a question: Can your asset assign bones/joint automatically, or must the mesh/model already have those for it to work? If not, is there way to do it? Thanks in advance.
     
  23. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    You need to add bones in 3d software before use dynamic bone.
     
    khos likes this.
  24. davitsedrakian

    davitsedrakian

    Joined:
    Jun 23, 2018
    Posts:
    30
    Hey! I need a sort of effect like in Human Fall Flat Game, can I achieve it with this asset?
     
  25. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Hi, dynamic bone is good to do secondary animation, like hair and clothes.
    It may need other physics solution to achive Human Faill game.
    you can mail to willhongcom@gmail.com to request evaluation version.
     
  26. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    Is there a way to exclude a mesh from being effected by dynamic bone? Because I just need this to effect my character cloth but it changes all character body.
     
  27. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Hi, you need set "root" to bone you want to effected by dynamic bone.
    there is also "Exclusions" settings.
     
  28. Roritamashi

    Roritamashi

    Joined:
    Jan 27, 2018
    Posts:
    8
    HorngYuiWei i want to buy this asset but i have a little question

    The asset is working on Unity 2019.3.9f?
     
  29. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    Works for me.
     
    Roritamashi likes this.
  30. Roritamashi

    Roritamashi

    Joined:
    Jan 27, 2018
    Posts:
    8
    Another Question, this asset is ligth or optimised for high use?

    obviously not in abusive use
     
  31. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Yes, dynamic bone works well on Unity 2019.
     
  32. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Dynamic Bone uses its own physics simulation, which is simpler and much faster than Unity's build-in physics system.
    but performance still depend on how complex you use and target platform.
     
    Roritamashi likes this.
  33. Senky

    Senky

    Joined:
    Dec 12, 2019
    Posts:
    1
    This script tends to set override transform values in editor mode in some cases, making it really annoying to make bone changes to the underlying model.

    You can fix this by commenting out InitTransforms(); inside the OnDrawGizmosSelected function in DynamicBone.cs.
     
    HorngYuiWei likes this.
  34. Janoooba

    Janoooba

    Joined:
    Feb 9, 2016
    Posts:
    43
    Dynamic Bone doesn't seem to work well if you scale the parent object non-uniformly (Example: x:1 y:1 z:0.4)
    Is this able to be fixed?
     
  35. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Hi, please provide more information what specified problem you meet.
     
  36. Janoooba

    Janoooba

    Joined:
    Feb 9, 2016
    Posts:
    43
    I've got a set of chains hanging off of a shackle on my characters viewmodel. If the viewmodel is unscaled (x:1 y:1 z:1) everything works fine.

    https://i.imgur.com/JHIPekU.png

    The issue arises because I scale my viewmodel in the Z direction by 0.4 to simulate FOV changes.
    This is what the chain looks like while running with the viewmodel scaled.

    https://i.imgur.com/yxznlS3.png

    As you can see, the bones aren't lined up properly anymore. Something isn't taking into account that it's stretched on only one axis.
     
  37. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    It's confirmed there are problems with non-uniform scale and not easy to fix.
     
  38. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    There is nothing speicial to debug dynamic bone source code.
    what's problem you meet ?
     
  39. SoyUnBonus

    SoyUnBonus

    Joined:
    Jan 19, 2015
    Posts:
    43
    Hi, I've been using DynamicBone in a few released games but I'm having a bit of trouble now.

    We're trying to use it in a chain of a weapon in a first person game. It works very jittery when rotating the camera with the mouse and the Inert parameter doesn't seem to be doing anything at all.

    While moving the character or attacking works fine, it just jitters when rotating the camera.

    Any idea on how to make this work?
     
  40. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    "Inert" can cancel character's movement from physics simulation.
    Dynamic bone detect character's movement depend on which game object dynamic bone component attached.
    you can try attach dynamic bone component on weapon game object instead of player game object.
     
    SoyUnBonus likes this.
  41. deneme09

    deneme09

    Joined:
    Feb 26, 2016
    Posts:
    19
    Hi sir. First I wanna thank you for making this amazing asset :) I have a problem and I need some help from you, maybe you can solve my problem.
    I need to add very bouncy breasts physics to my game, so I added some gravity to make it seem better. But as you can see in the video, gravity doesn't seem realistic. Gravity sometimes has no effect and sometimes has too much effect.

    How can I fix it?
    upload_2020-6-1_10-13-21.png
    This is my dynamic bone script, only "chain tag" field is added by me and it doesn't affect the script. Dynamic bone's actual script is totally the same.
     
  42. SoyUnBonus

    SoyUnBonus

    Joined:
    Jan 19, 2015
    Posts:
    43
    I'll try that. Thanks!
     
  43. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Reduce “Damping” and “Stiffness” make bones more bouncy.
    you can also try use "Force" instead of "Gravity".
     
    deneme09 likes this.
  44. Lawina

    Lawina

    Joined:
    Feb 28, 2019
    Posts:
    21
    Has there been a solution against the flickering problem?
     
  45. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Please give me more information. In what situation there are flickering.
     
  46. MrZeker

    MrZeker

    Joined:
    Nov 23, 2018
    Posts:
    227
    Im having a sort of flickering problem too,
    I uploaded a video there, sorry for the host but since Gfycat doesn't allow boobs now, i didn't knew where to put it.
    https://www.redgifs.com/watch/unrulylastingerin


    The boobs (script targets the boob bones) makes it flickery every time the character moves or rotates.
     
  47. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    It looks there are objects always collide with boobs.
     
  48. MrZeker

    MrZeker

    Joined:
    Nov 23, 2018
    Posts:
    227
    how could i fix it?
     
  49. HorngYuiWei

    HorngYuiWei

    Joined:
    Apr 27, 2014
    Posts:
    174
    Please check is there any colliders always collide with boobs bones.
     
  50. Devsagi

    Devsagi

    Joined:
    Sep 28, 2019
    Posts:
    33
    Hello there,

    when using "End Length" and "End Length Offset" is the preview in Scene view supposed to update?
    It is always pointing upwards and offset seems to not change the position of the extra bone.

    Best regards!
     
    Ony likes this.