[Closed] Curve control for IK squash-stretch shape?
I’m looking for a good way to have an editable curve to use to define the shape of squash-stretch in a rig. Currently I define a float custom attribute and add animation keys and sample that controller at relevant times to get the required values. This is working fine, but because they’re actual key frames on an object, it’s easy for animators to accidentally clear. Also, Since it’s already an animation curve, I can’t animate the shape of it which would be a good feature to have. I’ve had a brief look at curve control and had a read of some posts on here about it and just from a quick bit of reading, it seems a little convoluted and fiddly to manage. I wonder if any of you have added a curve control to scripted custom attribute UI? Would I have to write something to convert data to and from a parameter block to the actual curve to store it on an attribute holder? From what I know, you can’t store arrays that way so I guess I’d be limited to a set number of editable points on the curve. Has anyone got any tips on other directions to look? A friend of mine just suggested an actual spline curve in the viewport. Which, while I’m not totally against, I think it’d be a little messy to just leave it hanging around in the viewport and I would prefer something tidily packed away on a modifier. We’ve had scenes in the past with over 100 of these types of systems.
Any advice? Experience you’d like to share? Tips?
Cheers,
Cg.
there is an example
http://forums.cgsociety.org/showpost.php?p=7554786&postcount=17
some bugs were fixed here
http://forums.cgsociety.org/showpost.php?p=7741152&postcount=17
Thank you very much. Looks so much tidier than what I had started playing with.
Cg.
Dennis, I have a couple of questions. When (in the second posted link) you say add this to the code. Where to add this in your code? I’ve tried a few spots with different errors. Also, I’ve not delved into this too much yet. I’ve only had a few minutes spare to check it out so far. I notice that it’s possible to animate the points on the curve. Which is really cool. But I can’t see where any keys are being stored to be able to edit them. Also, if animated, the object doesn’t update with the animated curve shape.
I do really like the very plain and uncluttered UI on your curve.
Cg.