Creating a rubber-band like cable that reacts to objects putting underneath

Creating a rubber-band like cable that reacts to objects putting underneath

xin_yi_wang
Enthusiast Enthusiast
2,472 Views
9 Replies
Message 1 of 10

Creating a rubber-band like cable that reacts to objects putting underneath

xin_yi_wang
Enthusiast
Enthusiast

Hi All,

 

I'm trying to create a rubber-band like cable that's been tightly fixed vertically. Now I'm inserting a box against the wall let's say, and I'd like to have the cable to react to the box and still fixed & cover the surface of the box tightly, like my sketches below:

 

Rubber Band Cable.pngRubber Band Cable.png

 

Is there a way to create something like this in maya?

 

Thanks in advance!

0 Likes
2,473 Views
9 Replies
Replies (9)
Message 2 of 10

mspeer
Consultant
Consultant

Hi!

 

Try nCloth or nHair (you can create nHair from Curve).

 

A simpler and faster solution would be to use a Deformer parented to the box that deforms the cable (if no complex simulation is needed).

0 Likes
Message 3 of 10

Roland.Reyer
Alumni
Alumni

You can use nHair dynamics to simulate a curve.

With the curve you can then construct a rope or cable.

 

Here's a video: https://youtu.be/PEd49PxnsYE

0 Likes
Message 4 of 10

xin_yi_wang
Enthusiast
Enthusiast

Hi mspeer,

 

Thanks for the reply.

 

Would you be able to elaborate a bit more on the Deformer command? I'm really new to Maya.

 

Thanks!

 

 

0 Likes
Message 5 of 10

xin_yi_wang
Enthusiast
Enthusiast

Hi Roland,

 

Thanks for the post and the video!!!

 

Really helpful! 

 

I'd still like to ask that since in the video the two contacting points between the rope & box aren't as neat as how a real rubber band behaves:

 

Rubber Band Video.PNGRubber Band Video.PNG

 

Is there a way to make that more realistic?

 

Thanks!!

 

P.S. I won't be needing an animation or anything. I'm trying to capture that moment and turn it into a static model which I will use as a reference to create an architectural model. I don't know if this will change the workflow but thought I'd put it down to avoid any confusion. Cheers!

0 Likes
Message 6 of 10

xin_yi_wang
Enthusiast
Enthusiast

Also Roland,

 

I'm trying to recreate what you've done in Maya and I have a question: does creating order affect the result?

 

I see that you've modelled the cube first and hid it. Then revealled it and gave it a nCloth passive collider, and it worked.

 

I've modelled the curve first and made it nHair per your video instruction. Then created the cube and nCloth. But when I press play nothing happens to the cube. It didn't move.

 

Is there any reason for this?

 

Cheers! 

0 Likes
Message 7 of 10

xin_yi_wang
Enthusiast
Enthusiast

Sorry to ask so many questions Roland,

 

I noticed that in your video you've set the animation length to 120/200 at 24 fps.

 

However when I'm playing it under the same setting the object moves really fast! 

 

Is it become of the unit that I'm using (centimeter)? 

 

Thanks again!

0 Likes
Message 8 of 10

Roland.Reyer
Alumni
Alumni

In order to avoid the bad corners on the rubberband you could try different resolutions and various settings for stiffness, damping and for the collision.

 

The order in which you create the parts doesn't matter, as long as they all belong to the same solver/dynamic system.

 

The playback speed may differ because I've set 24fps as a maximum.

 

If the whole thing is for a still then I definitely recommend to model the rubberband with a NURBS curve. That would be much faster, is easier to control and to bring into the desired shape.

Same for the animation: if the rubberband doesn't need to wiggle (or to be loose or to do anything special) you could just create an animated NURBS curve and skip the whole simulation.

 

 

0 Likes
Message 9 of 10

mspeer
Consultant
Consultant

Hi!

Just a very rough example (using Lattice). You can use whatever deformer you want and even combine them.

 

deformer.gifdeformer.gif

 

 

 

Message 10 of 10

mspeer
Consultant
Consultant

Hi!

I just forgot the simplest solution.

Just create a curve of 4 points and move the inner 2 (in my example connected with a box by using Cluster).

 

deformer2.gifdeformer2.gif

 

 

Every way has it's pros and cons, choose a solution based on your requirements.

 

Please mark every answer that solves your problem as solution, so others interested in this thread will get a better overview.

(Though in this case all offered solutions will work.)

0 Likes