stretchy spine, how to?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  10 October 2012
stretchy spine, how to?

I've been searching around but I couldn't find much info about making a stretchy spine with control for the amount of strecth, if that makes any sense? how would you guys approach that? any ideas? also , that spine, ideally, would be able to switch between FK and IK somehow....

thanks a lot!!

Last edited by metamesh : 10 October 2012 at 10:22 AM.
 
  10 October 2012
I don't know if I understand you properly, so my reply may be off. Have you tried making a spline line and creating a shape from it? It would be very easy to manipulate with the standard tools.
__________________
I like to learn.
 
  10 October 2012
One way to do this is to use path deform. What you do is you have two splines. The first is shaped by the animation controls and the second is path deformed to the first. The second is the one that carries the bones that deform the character. The path deform will stop the spline from stretching by default but has a stretch value that you can calculate using the length of the spline.
__________________
Paul Neale
http://paulneale.com
 
  10 October 2012
aaah that makes sense! i forgot about the path deform! thanks a lot Paul... now...any idea how to calculate the amount of stretch needed and/or how to calculate the lenght of the spline?

thanks again for the help
 
  10 October 2012
just heads up on this, I found the curveLength() function that seems to work well, I guess for this to keep updating over time I need to use a script controller on the stretch value? mmm im gonna test that!
 
  10 October 2012
hey Paul, any chance you could shed some light onto this? I'm a bit stuck with it :S
I've created 2 curves, 1main curve, lets call it curve1, and a copy of it, curve2, now i path deform curve2 with curve1 ( world space path deform ), and I create an script controller that controls the "stretch" value on the path deform, what I do is i basically divide the curveLength of curve1 by the value of the curve in the initial state, for example 100, so curveLength $curve1 / 100.

that gives me the stretch value interactively, so if i stretch the curve1, curve 2 gets stretched too. What im having problems is in how to solve this: If I want to control that stretch lets say with a slider that goes form 0 ( non stretched curve ) to 1 ( curve stretched as much as curve1 ) I didn't manage to get that going, any help or ideas?

I have managed to kind of do it but with 4 curves instead and is a bit of a mess, I have curve 1 that is the one animated, curve 2 path deformed to curve1, with no stretch, Curve3 path deformed to curve1 WITH stretch, and then curve4 that morphs between curve 2 and curve3 ( in a linear manner ) so it kind of does the trick but im sure there are better ways of solving it, any help really appreciated!

cheers
Alex
 
  10 October 2012
Post

I read this thread and i tried to make this IK/FK/Stretch Spine
I used only one spline, never used pathDeform and don't understand how you use it

What I did:
- Create a classic splineIK
- for each knot:
Create a FK control object (link splineIK dummy to it)
- Create an IK control that have last FK control transform
- for each knot:
Create a Point aiming at IK control
Create a IK control object with FK control transform (link to created Point)
- Constraint in position and orientation FK controls to IK controls
- Add a slider somewhere to paramWire controller weigths (blend IK/FK)

- Create a bunch of points with path constraint
- replace percent controller with a script controller

here's the script I use:
Value is the base percent
UnstretchW is a float parameter (when 1.0 if spline is stretched point will go back)

BaseW = 1-UnstretchW
UnStretch = Value/UnstretchW
if (UnStretch>Value) do (UnStretch = Value)
(Value*BaseW)+(UnStretch*UnstretchW)


- After that create your bones and constraint them to the "path constrained" points.

Bone scale script
Stretch is (spline length/original spline length) like you used it
unStretchVal = (1.0*UnstretchW)
StretchVal = Stretch*(1-UnstretchW)
[unStretchVal+StretchVal,1,1]


Et voila!
 
  10 October 2012
Originally Posted by metamesh: hey Paul, any chance you could shed some light onto this? I'm a bit stuck with it :S
I've created 2 curves, 1main curve, lets call it curve1, and a copy of it, curve2, now i path deform curve2 with curve1 ( world space path deform ), and I create an script controller that controls the "stretch" value on the path deform, what I do is i basically divide the curveLength of curve1 by the value of the curve in the initial state, for example 100, so curveLength $curve1 / 100.

that gives me the stretch value interactively, so if i stretch the curve1, curve 2 gets stretched too. What im having problems is in how to solve this: If I want to control that stretch lets say with a slider that goes form 0 ( non stretched curve ) to 1 ( curve stretched as much as curve1 ) I didn't manage to get that going, any help or ideas?

I have managed to kind of do it but with 4 curves instead and is a bit of a mess, I have curve 1 that is the one animated, curve 2 path deformed to curve1, with no stretch, Curve3 path deformed to curve1 WITH stretch, and then curve4 that morphs between curve 2 and curve3 ( in a linear manner ) so it kind of does the trick but im sure there are better ways of solving it, any help really appreciated!

cheers
Alex


Easiest way to handle switching it on and off or ramping it on and off is to make sure that you place a float_list on the percent and have the script controller in the second track. Then just ramp on and off the weight of the list
__________________
Paul Neale
http://paulneale.com
 
  10 October 2012
Originally Posted by PEN: Easiest way to handle switching it on and off or ramping it on and off is to make sure that you place a float_list on the percent and have the script controller in the second track. Then just ramp on and off the weight of the list


oh man, so simple and nice! got it working Paul, thanks a lot!!

l'animal, thanks a lot for the suggestion, but at the end I will go with Paul's system, really simple and clen, thanks for the suggestions tho!
 
  10 October 2012
That trick works for so many things.
__________________
Paul Neale
http://paulneale.com
 
  10 October 2012
Still don't get the 2 spline with second path derformed by the first.
When I add the path deform modifier the second path doesn't match the first anymore.
Can one of you explain it to me please.
Or if you have a video example somewhere
 
  10 October 2012
aer you using a path deformer or a wsm path deformer? I think you need to use the WSM path deformer to match the spline ...
 
  10 October 2012
I use the world space one.
And i spline2 is just a copy of spline1...
 
  10 October 2012
weird..it works for me...I'll see if i can post a file later on...
 
  10 October 2012
Ok thanks if you provide a file.
I'm using an old max9 but i don't think it's the problem
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:30 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.