Hey everyone. So in response to a question asked in another topic, I came up with this system for having bones jiggle around based on a very crude / simple physics model. The physics part is a modified version of Pegorari’s “Rubber Simulation Script” (http://forum.unity3d.com/threads/45148-Rubber-Simulation-Script?highlight=rubber+duck) but instead of modifying vertex positions, it applies the results to bone rotations. It also has a “squash and stretch” function, which helps to add a little bit of extra fluid motion.
It can be used for effects like bouncy breasts, bouncy hair, etc. Hope you guys like. Also if anyone has any ideas on how to improve it, please contribute:
The webplayer has settings set WAY too high. It’s set that way for demonstration purposes only, and would have to be adjusted to more real world settings.
i am working on a character that has jiggly fat. this could be ideal, i cant seem to view the web demo it just asks me to instal the unity player but the one it downloads is older than the one i have installed.
Believe it or not, I have no idea where that project went . . . :T
Its pretty straight forward, just drag the script onto a transform of the bone on your mesh. You will have to know what axis to shoot it down. For me I had the bone axis set to Z forward, meaning the Z axis was looking down the length of the bone. You can change which axis it uses in the script though so you can mess with the values.
So, I have a bunch of 3d models that are .FBX files from the asset store. I wanted to try this on them. But, they do not have any bones defined for inside the boobs. So, is it possible? Would I have to define new bones in a modeling program and somehow remap the mesh to them? Is there anyway to do this from within Unity (or if not through some plugin to unity?)
Because none of the models I have currently has bones to control the boobs as far as I can tell.
Wow, thanks for the great job.
And for those who have bones facing -X axis, I made some changes on your code so it works on standard 3dsmax export bones.
// Set bone rotation to look at dynamicPos
//transform.LookAt(dynamicPos, upVector);
Vector3 negXAxis = (dynamicPos - transform.position).normalized;
Vector3 negZAxis = Vector3.Cross(negXAxis, upVector); // -Z = -X cross oldup
Vector3 newUp = Vector3.Cross (negZAxis, negXAxis); // Y = -Z cross -X
transform.LookAt(transform.position + (-negZAxis), newUp );
So I’m using this and trying to get the workflow down with makehuman to blender to unity. I’m almost there, but for some reason, even with the adjustments TMPxyz added I still have bones that seem to want to point out from straight. As if they are being pushed apart (rotated on the vertical axis) away from each other by about 15 degrees each. This makes a nice separate on some models but on my current one, it would be nice to make them seem a little more ‘perky and straight’.
Does anyone have tips for Blender rigging and importing to unity? I’m able to use the humanoid rig setup in unity and I do get the bounce effect, however the axis are definitely off and all of my tests have come up with inverted meshes. The only current way it works is to have all axis set to 0.
Thanks for this however, since I’m sure its just something simple I am not seeing yet. It really is very configurable.
EDIT —
So I found out that my export settings, or some other setting isn’t allowing the bone in blender to face the ‘right’ way, so I had to go by the transform gizmo and a lot of guesswork to get it to the right angle. Once I was able to get it to face forward (z) and have y up the original script worked great.
Pro Tip: position the bones where you want the rotation to be based out of. For a while I had my bones outside the mesh (so they were easy to grab) but I soon found my deformation in unity rotation oddly outside the ‘mesh body’. Now the extra jiggle control bones are back inside the mesh and it rotates / squishes properly!