Compressing a coil spring

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
Old 12 December 2012   #1
Compressing a coil spring

Hi--

I guess I'm more of a noob than I'd like to believe.

I'm trying to compress a coil spring (in an automotive-type shock absorber--see attached screnshot) in a realistic fashion. The spring was constructed via a multi-step process. I first made a low-poly helix, converted to subs, converted again to NURBS, then selected an isoparm and duplicated the surface curve. I then used the resulting helical curve as a path and extruded a circle along it to create the coil spring. Maybe there's a quicker way, but I wanted the helical curve so I could compress it with a lattice, thereby compressing the spring without flattening the coils themselves.

OK. I searched all over the place, and found a thread where someone recommended parenting the bottom lattice points to a locator, then animating the locator. I tried the parenting thing, but got nowhere. I clearly don't understand the process, or else you just can't do that.

Next, I tried a Set Driven Key, using the locator as the Driver, and the lattice points as Driven. OK, now, moving the locator does indeed move the points, but by some apparently non-linear relationship. IOW, the locator moves, and the points follow, but with a sort of floating, out-of-synch tracking.

The driven points do obey the limits set by the keys, but I'm really getting frustrated. It would seem a simple thing, but either I'm not understanding something fundamental, or I'm going down an entirely wrong path.

I would sure appreciate some guidance, particularly if I'm going the wrong direction.

Many thanks in advance!

--Tim
 
Old 12 December 2012   #2
Anyone?
 
Old 12 December 2012   #3
Many ways to skin a cat... if you still want the lattice I suggest creating a cluster out of one end of the lattice points and parent the cluster to the piston. Or create two clusters, one for each end. Set driven should work ok with simple scaling of the helix, if you adjust the tangents right... I think.
 
Old 12 December 2012   #4
Originally Posted by Tobbe: Many ways to skin a cat... if you still want the lattice I suggest creating a cluster out of one end of the lattice points and parent the cluster to the piston. Or create two clusters, one for each end. Set driven should work ok with simple scaling of the helix, if you adjust the tangents right... I think.


Thanks very much, Tobbe! Worked like a charm...until i tried to rotate the whole thing (see screen shots).

I've run into this sort of thing before, and have usually been able to resolve it by deleting history, proper grouping, etc. In this case, however, with only the lower lattice points clustered, i'm not sure my idea was the best solution after all. The screenshots show the heirarchy, so i'd welcome all critiques.

Thanks again!

--Tim
 
Old 12 December 2012   #5
You could try a combination of a wire deformer and squash deformer. As stated there's a few ways you could do this. Just need to try a few things and find something that works for you.
__________________
Animator
 
Old 12 December 2012   #6
Im hardly an animator but from your picture your lattice would have to rotate with your group object thats rotating right? Looks like the lattice shape is not parented under your group node.
__________________
Vimeo
 
Old 12 December 2012   #7
Hi guys--

Thanks very much for the thoughtful comments and pointers. It turns out that, at least for me, this is a more complicated thing than meets the eye, particularly if you want the shock absorber to behave properly in a full suspension rig. However, after a little more creative use of search terms I googled up two excellent YouTube tutorials that attack the problem with approaches I wouldn't have thought of.

Worth a look, if you're interested in this sort of thing:

http://www.youtube.com/watch?v=q1cQ...4K-bwg&index=27

and

http://www.youtube.com/watch?v=VJ39hLI7pWU

Thanks again!

--Tim
 
Old 12 December 2012   #8
create the coil with a nurbs curve and then loft a nurbs circle along the coil. that gives you the actual coil geometry. don't delete history though, you want the coil geometry still attached to the original nurbs curve. all you'll have to do is move the pivot of the original nurbs curve to the base of the curve and then you can simply key frame animate the scale attribute. it will scale the coil curve while keeping the geometry intact while also maintaining the volume of the coil geometry.

it looks like that second video you posted is exactly what i'm talking about
__________________
Character Artist
Treyarch
My Website

Last edited by ZippZopp : 12 December 2012 at 01:03 AM.
 
Old 12 December 2012   #9
Originally Posted by ZippZopp: create the coil with a nurbs curve and then loft a nurbs circle along the coil. that gives you the actual coil geometry. don't delete history though, you want the coil geometry still attached to the original nurbs curve. all you'll have to do is move the pivot of the original nurbs curve to the base of the curve and then you can simply key frame animate the scale attribute. it will scale the coil curve while keeping the geometry intact while also maintaining the volume of the coil geometry.


That's the course I originally followed, but quickly ran into the various problems detailed above. The referenced YouTube videos seem to offer a more comprehensive--if more rigorous--approach.

Thanks!

--Tim
 
Old 12 December 2012   #10
this what you are after?
Attached Files
File Type: zip coil.ma.zip (8.5 KB, 5 views)
__________________
Nothing last forever
 
Old 12 December 2012   #11
Originally Posted by f3rry: this what you are after?


No, but many thanks. As mentioned in my first post here, I've got the spring (see accompanying screenshots), but ran into the difficulty when trying to animate (compress and decompress) it without flattening the coils.

I am curious as to how you guys are creating the helical curve. I described my method in the first post. It seems to work well and only requires 5 or 6 steps, but I'm always interested in the techniques of others.

Thanks!

--Tim

Last edited by rattletrap99 : 12 December 2012 at 02:19 AM.
 
Old 12 December 2012   #12
Hi!

I would do it like this.

1. create a helix. the size you want. make sure to have the outer edges of it in the center of were you want you spring profile.

2. convert polygon edges to curve. (this is under the modify menu)

3. make a copy of your created curve.

4. create a lattice on one of the curves with 2 x 2 x 2 divisions.

5. move the points as you want your spring to look when compressed.

6. select your compressed curve and then the original and create a blendshape.

7. now hook the blendshape up with an locator or expression or any way you want.

8. create a empty group and place it at the center and base of the spring. in this group you need to have the spring curve.

9. all the other nodes created needs to be outside this group. this group is the one that you translate and rotate.

10 if you need to scale the rig you need to connect the scale to the scale of the nurbs circle that you extrude the shape from.


I have attached my scene file.
Attached Files
File Type: zip coil_rigged.zip (29.2 KB, 4 views)
__________________
Voxels for dinner.
_____________
http://esvfx.wordpress.com/ maya vfx blog
 
Old 12 December 2012   #13
I have made a complete setup fro a suspension but the file is too big to attach. mail or message me if you want it.

or add skype: eric.schempp
__________________
Voxels for dinner.
_____________
http://esvfx.wordpress.com/ maya vfx blog
 
Old 12 December 2012   #14
Hi.

Was wondering, with regard to blendshape and the compressed version of the spring, it seems that this one could also use Schempp's steps in this animated knot motion path example here:
http://www.garynoden.co.uk/ARCHIVE/tutorials/QnA_91.pdf

Or am I mistaken?

It seems that its necessary to start with the compressed or tightened state of the spring or knot?

Correct?

Thx
 
Old 12 December 2012   #15
The only reason why i did the compressed state of the spring at first was to be able to see how much i could compress the curve without the geo actually intersecting.

When making the knot you might wanna do several steps with blendshapes and just use them as inbetweens. I guess it very much depends on if you want the rope or wire just to glide "into" a knot or actually do the knot animation were the curves animates over and into itself.
__________________
Voxels for dinner.
_____________
http://esvfx.wordpress.com/ maya vfx blog
 
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 02:18 PM.


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