Notifications
Clear all

[Closed] stretchy bones overstrech feedback script??

hi all

basically i hav a stretchy bones setup and i want each bone to change color when it has become overstreched so the animator will have some visual feedback. i have watched cg academy intermediate rigging volumes 1 and 2. in volume 2 this idea was demonstrated on a pre made rig but it was not shown how it was done.

any help anyone can give me would be much appreciated

3 Replies

I haven’t watched the DVD’s yet, but I am assuming that you’re using a script to create the stretchy spine, all you need to do is add some more code to that script to make it change colour. As I don’t know what your script looks like I’ll give you some pseudo code:

if (current_bone_length > maximum_length) then -- Over-stretch turn red
  current_bone.wirecolor = red
  else if (current_bone_length < minimum_length) then -- Over-squash turn yellow
  current_bone.wirecolor = yellow
  else -- Right size green
 current_bone.wirecolor = green
   This code will make the colours snap. If you want it to smoothly transition the code get's a bit more complex, but not much.
   
   If you give me your script I can give you the exact code you should use.
 PEN

As well as Wahooney’s suggestion there is also a free tutorial on http://cg-academy.net thet covers this topic. I wish that I had time to put every thing in the DVD’s

thanks for the help guys and i’ll be sure to check out that tutorial from CGA