The springs are deformed using a blendshape - my first instinct was to use the helix's creation history height field to drive the stretch. Applying this I soon discovered the deformation occurs from the centre and expands out in the y axis, which is unrealistic. A car suspension springs deformation works from the top down.
To overcome this I used a MEL script called "spiral" which creates a cv curve with the height radius and coil number specified by the user.
The command is as follows:
spiral (Height, Radius, Coils)
The parameters should be identical to the poly helix's dimension's so the curve runs through it's centre you usually have to scale it in x -1 and rotate it in y by 180 degrees to match it up). Once the curve is created, attach it to the poly helix via a wire deformer, then add a joint chain which runs through the centre of the spiral (give it a generous amount).
Skin the joint chain to the spiral curve and scale each joint in x (excluding the end joint unless its oriented correctly). You should be getting a nice even deformation down the poly helix, with no flattening as it stretches.
Pitfalls
So up intil now, things have appeared pretty straight forward, but there are a couple of things to look out for when building this set-up.
flattening out:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhZiokBMW-i0e4yIMn9TD7SNyGxymVEWynztUTrT_KSan-8flSFaP_YVS2_wVea_NN52pmFykoQ9-x-iwHKbYvD5q1om6tVWeptl60-wwZcv4cNEZO4c9hGgVDhQI7VZG1ueLbBcqwhyphenhyphenoI/s320/spring01.jpg)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLPvSd5EDu_SM9JerrYTKxMVDeGMGmi_ktSVYGCW3mrLXTpoQ0S36ShNw77ZZYY9GhgZIqHWM9f7IdRk0woBarhhK_2d1uCmWF7gmhH7zOz7ice5n66OQUjgYz2kCHHAae-8xKPaxrSd3_/s320/spring02.jpg)
<< 01 02 03 04 05 06 07 08 09 10 >>
No comments:
Post a Comment