Jump to content

Archived

This topic is now archived and is closed to further replies.

Guest Somnifer

Hanging Chain & Gravity

Recommended Posts

Guest Somnifer
  • Topic Author
  • Hi guys,

    I'm trying to make a hanging chain between two poles, something like the image I've added in this post.

    Modelling this as a static image is easy, and poses no problem, but I don't know how to make it interact with the poles;

    I want the curve of the chain to adjust itself (to sag realistically) when I move the poles further apart or closer together.

    I'm guessing it has something to do with gravity of maybe bones, but since I have no experience whatsoever whith both....

    Any help is greatly appreciated!

    Share this post


    Link to post
    Share on other sites

    Mocca Soft IK is one way. Another way is to use spline dynamics from the hair module. You then have your chain constrained to the spline with something a MoGraph splinewrap deformer.

    I would use spline dynamics as they are very fast calculating and it would be easier to set up than Soft IK. We've got a tutorial on using Soft IK for something like similar.

    3DKiwi

    Share this post


    Link to post
    Share on other sites
    Guest Somnifer
  • Topic Author
  • Thanks for the suggestions! I'll check them both out, see what results I get (Downloading the tutorial as I write...)

    Share this post


    Link to post
    Share on other sites
    Guest Somnifer
  • Topic Author
  • I just set up a small scene with a dangling chain (using mocca soft IK)...

    The dynamics are working OK, but my chainlinks are getting deformed :-(

    Guess I'm doing something wrong, but I can't seem to figure out what it is....

    Share this post


    Link to post
    Share on other sites
    Guest Squirrel
  • Topic Author
  • In the Object tab of the first bones attributes (The one listed right under the "chain" null), change the "Function" attribute to "1/r^10". Hopefully that fixes it.

    Share this post


    Link to post
    Share on other sites

    Try making the links child objects of the bones. Then on each link give it a "Stop" tag and enable deformers. This prevents them from deforming.

    3DKiwi

    Share this post


    Link to post
    Share on other sites
    Guest Somnifer
  • Topic Author
  • At first i tried setting the function to 1/r^10. This helped a bit, but there still was some slight deformation...

    I then tried making the links child objects of the bones and adding a stop tag. This resulted in a hierarchy of bone-torus-bone-torus- and so on....

    This helped for the deformation, but now the form of the chain as a whole got torn apart. The rotation (every following link should rotate 90°) didn't match anymore, and the individual links were spread further apart not really forming a chain anymore...

    Using the rest-tab in the mocca-tag I could adjust rotation and z-position for each individual chainlink, which finally gave me the result I wanted. :)

    However, I can't help but wonder if there isn't some more efficient way of doing all of this in mocca. I really wouldn't want to make a 500 link chain this way...

    Share this post


    Link to post
    Share on other sites

    Piece of cake if you have the HAIR module. Here's a scene file in R10 using spline dynamics. I'm also using MoGraph to constrain the chain to the spline. I've added particle turbulence to simulate the chain being blown by the wind.

    Sorry this won't load in R9 but you can use the 10.5 demo to check out the scene. Screen grab included also.

    3DKiwi

    Share this post


    Link to post
    Share on other sites
    Guest Somnifer
  • Topic Author
  • Cool! Thanks for the scene-file!

    The Hair-module is definitely the way to go. Wày easier than mocca...

    Just a quick question: does it matter which spline you use? (Bézier, B-spline, etc...)

    Now, thinker a bit further; would it be possible to let the chain interact with other objects? Suppose I'd want the middle part of the hanging chain to be pushed upwards by a small box. I've tried putting the chain in a solver object and putting on the chain and the box a rigid body tag (full collision), but that didn't do anything...

    Share this post


    Link to post
    Share on other sites

    Yup the HAIR module is very cool. Spline type doesn't really matter but I would use cubic. You need to add a HAIR collider tag to your objects to make the spline react to objects. Nothing to do with the dynamics module at all.

    3DKiwi

    Share this post


    Link to post
    Share on other sites

    Yes indeed, the hair spline dynamics are a lot of fun to play with. smile.gif

    PEace,

    Rich_Art. :)

    Share this post


    Link to post
    Share on other sites
    Guest Somnifer
  • Topic Author
  • Cool! It's really great to see the chain interact with the box! (I'm sensing some major experimentation sessions coming up...)

    The only downside is that the box interacts only with the spline, and not with the object wrapped around that spline, giving (in resting position) the result shown in the thumbnail. The links just cut through the box....

    Share this post


    Link to post
    Share on other sites
    Guest
    This topic is now closed to further replies.

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×
    ×
    • Create New...