CGTalk > Software > Autodesk 3ds max
Login register
Thread Closed share thread « Previous Thread | Next Thread »
 
Thread Tools Search this Thread Display Modes
Old 10-11-2012, 09:47 AM   #1
metamesh
Expert
 
metamesh's Avatar
portfolio
Alex Huguet
lead Modeller, ILM
Vancouver, Canada
 
Join Date: Feb 2004
Posts: 1,391

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-11-2012 at 10:22 AM.
 
Old 10-11-2012, 06:16 PM   #2
Dillster
Always Learning
 
Dillster's Avatar
portfolio
Dylan Saunders
Dublin, Ireland
 
Join Date: Jan 2011
Posts: 2,731
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.
 
Old 10-11-2012, 06:55 PM   #3
PEN
R&D/Technical Director
 
PEN's Avatar
portfolio
Paul Neale
PEN Productions
Canada
 
Join Date: Jun 2002
Posts: 7,416
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
 
Old 10-11-2012, 07:47 PM   #4
metamesh
Expert
 
metamesh's Avatar
portfolio
Alex Huguet
lead Modeller, ILM
Vancouver, Canada
 
Join Date: Feb 2004
Posts: 1,391

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
 
Old 10-11-2012, 09:07 PM   #5
metamesh
Expert
 
metamesh's Avatar
portfolio
Alex Huguet
lead Modeller, ILM
Vancouver, Canada
 
Join Date: Feb 2004
Posts: 1,391

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!
 
Old 10-15-2012, 07:17 PM   #6
metamesh
Expert
 
metamesh's Avatar
portfolio
Alex Huguet
lead Modeller, ILM
Vancouver, Canada
 
Join Date: Feb 2004
Posts: 1,391

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
 
Old 10-16-2012, 09:51 AM   #7
lanimal
Veteran
portfolio
Gonzales
Antony, France
 
Join Date: Jun 2011
Posts: 77
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)

Code:
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
Code:
unStretchVal = (1.0*UnstretchW) StretchVal = Stretch*(1-UnstretchW) [unStretchVal+StretchVal,1,1]


Et voila!
 
Old 10-16-2012, 06:46 PM   #8
PEN
R&D/Technical Director
 
PEN's Avatar
portfolio
Paul Neale
PEN Productions
Canada
 
Join Date: Jun 2002
Posts: 7,416
Quote:
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
 
Old 10-16-2012, 07:47 PM   #9
metamesh
Expert
 
metamesh's Avatar
portfolio
Alex Huguet
lead Modeller, ILM
Vancouver, Canada
 
Join Date: Feb 2004
Posts: 1,391

Quote:
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!
 
Old 10-16-2012, 08:38 PM   #10
PEN
R&D/Technical Director
 
PEN's Avatar
portfolio
Paul Neale
PEN Productions
Canada
 
Join Date: Jun 2002
Posts: 7,416
That trick works for so many things.
__________________
Paul Neale
http://paulneale.com
 
Old 10-17-2012, 10:51 AM   #11
lanimal
Veteran
portfolio
Gonzales
Antony, France
 
Join Date: Jun 2011
Posts: 77
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
 
Old 10-17-2012, 10:55 AM   #12
metamesh
Expert
 
metamesh's Avatar
portfolio
Alex Huguet
lead Modeller, ILM
Vancouver, Canada
 
Join Date: Feb 2004
Posts: 1,391

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 ...
 
Old 10-17-2012, 10:58 AM   #13
lanimal
Veteran
portfolio
Gonzales
Antony, France
 
Join Date: Jun 2011
Posts: 77
I use the world space one.
And i spline2 is just a copy of spline1...
 
Old 10-17-2012, 11:00 AM   #14
metamesh
Expert
 
metamesh's Avatar
portfolio
Alex Huguet
lead Modeller, ILM
Vancouver, Canada
 
Join Date: Feb 2004
Posts: 1,391

weird..it works for me...I'll see if i can post a file later on...
 
Old 10-17-2012, 11:03 AM   #15
lanimal
Veteran
portfolio
Gonzales
Antony, France
 
Join Date: Jun 2011
Posts: 77
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 02:41 PM.


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