sprockets The Snowman is coming! Realistic head model by Dan Skelton Vintage character and mo-cap animation by Joe Williamsen Character animation exercise by Steve Shelton an Animated Puppet Parody by Mark R. Largent Sprite Explosion Effect with PRJ included from johnL3D New Radiosity render of 2004 animation with PRJ. Will Sutton's TAR knocks some heads!
sprockets
Recent Posts | Unread Content
Jump to content
Hash, Inc. - Animation:Master

How to build a flexible cable.


Kelley

Recommended Posts

I've spent the best part of the last two days trying to make the X-Machine float alongside The Sentinel. On the first try, it and the umbilical were part of the Beast model. There was a chain of 10 bones starting at Beast's pelvis and running out to the X-Machine. This didn't work because Beast has a rolling waddle, and this just yanked the machine left and right. It appeared to be firmly mounted on a curved pole which was bolted to the saddle. Also, moving the machine always kinked the chain and fine-tuning each bone was going to take years. Then I cut the machine and cable out of the model and broke it into two parts: machine and cable and Translated them to Beast. Same problem, different shape. Then I deleted the bones altogether and Translated the machine to Beast and left it pretty much in place, and Scaled the umbilical to longer and shorter as Beast walks. No good. the biggest problem was keeping the two ends of the cable at the proper point on two surfaces, one of which is moving. It might have worked if I could match one end to the machine, and use the Rotate tool to adjust the other end up or down. But to do that, I need to be able to move the pivot to the machine end, and the pivot [to the best of my knowledge] doesn't move in the choreography.

 

I'm about to delete the X-Machine altogether. It doesn't really play a part in the story. But I thought I'd try you all first. Any ideas? Thanks,

HASH.jpg

Link to comment
Share on other sites

  • Replies 35
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • Hash Fellow

is the problem just the cable to the floating thing? I'm not sure yet from reading your description.

 

But a while back i offered a solution for a hose that needed to run from a gas pump to the nozzle

 

http://www.hash.com/forums/index.php?s=&am...st&p=286159

 

also don't discount th epossiblity of using a dynamic chain for the link. that is a more advanced solution requiring more patience.

 

 

If the problem is getting the floating thing to "float" rather than be rigidly following the beast, that sounds like a job for a translate to constraint with "lag" set to several frames. Basically it causes a delayed reaction to the movement of the parent object.

 

"lag" may be an advanced prop. enabel advanced props in options>global I think.

Link to comment
Share on other sites

robcat: Thanks for the comeback. It's hard to tell if the 'lag' solution would do it without seeing a cable connecting the two eggs. However; the gas pump .prj looked really outstanding. Tomorrow I'll dive into that. Thanks again.

Link to comment
Share on other sites

Perhaps you could make the tube a cloth mat. It would have great life to it, and you can control the stiffness.

Thanks for the suggestion. I have yet to tackle anything dealing with cloth. [i find it a bit daunting] Are there any tutorials that might make it easier?

Link to comment
Share on other sites

None that i know of that use Simcloth. Its not that hard. Here is a cloth Mat and deflector mat. Play with the stretch and dampers in the cloth mat. There not perfect but they are good starts. Now just set the collision tolerance in the chor to .1 and you should be simulating in no time.

 

If ya need any help just ask,

Shane

cloth_and_deflector.zip

Link to comment
Share on other sites

I did a quick test using Rob's project and dynamics.

 

I drew added a 'Rope' to the model consisting of 21 extruded cross sections and ten bones.

 

The first bone is a child of the Beast floating thing.

 

I cheated and did not model the rope in place I connected it in the pose.

 

The first bone in the chain is Translated to the Beast bone.

 

The last bone in the chain is Dynamically constrained to the Floaty thing bone.

 

That's it. It would need some tweaking to get it to look just right but I think it does what you want. I left Rob's lag contraints in place cause I thought they really add to the effect. I never thought about using lag so i learned something from this one.

Dynamics_Test.mov

Link to comment
Share on other sites

Noober, did you use cloth?

 

I think the advantage to Dynamics is that it's basic premise is that it wants to maintain its modelled shape whereas cloth will collapse. I know you can increase the stiffness oft he cloth but that will also limit its flexibility.

 

Wade

Link to comment
Share on other sites

I awake this morning to an embarassment of riches! My thanks to all of you. I'm printing these out as fast as I can and adding them to the archive. It looks like there's several good ways to make this happen.

Link to comment
Share on other sites

Noober, did you use cloth?

 

I think the advantage to Dynamics is that it's basic premise is that it wants to maintain its modelled shape whereas cloth will collapse. I know you can increase the stiffness oft he cloth but that will also limit its flexibility.

 

Wade

 

 

I did use cloth. and it does flatten some. But there are ways around that. Imagine looking through the center of the rope. If you connect the inside some, it will prevent it to an extent.

 

Remember, there are always many solutions to a problem. If they get the job done, it doesn't matter what route you take.

Link to comment
Share on other sites

Maybe you could rig a chain of bones for the "tube". Then use cloth for a single spline. Use a path constraint on the bones pointing to the cloth spline. Use incremental settings for the enforcement of each constraint so the tube bone chain is spread out evenly along the cloth spline. Now the tube will act alike a flexible cable but maintain stiffness so it won't collapse.

 

Or maybe changing the collision distance on just a cloth tube will keep it "stiff"... a couple of things to try.

 

-vern

Link to comment
Share on other sites

Newton physics can't do "flexible" objects like tubes so well (same problem that makes rag doll physics difficult for rigged characters) like a rope or cable. Dynamic constraints really work best constrained at one end. Cloth can be connected at both ends like a rope or cable and react to forces and gravity.

 

This is an extruded tube. In the tube model is a mesh assigned cloth. This mesh only has 3 long splines. Only one of the long splines is needed for the path constraint but you have to have some patches for cloth to work. In an action each bone of the long chain for the tube mesh is assigned a path constraint to one long spline of the cloth mesh. There are 20 bones in the tube or cable mesh so each of those constraints increments the ease by 5%, bone 1 5%, bone 2 10%, etc etc.

 

There are two bones on either end of the cloth mesh. I haven't worked out exactly how to do this perfectly but I assigned half the cloth mesh to a bone on one end and the other half to the other end so the bones can be moved in the chor for like... two connected space ships etc. A single spline on each end is not assigned to the cloth group so it will stay "fixed" and go with the bone.

 

For this example I "curved" the cloth mesh in the action so it would "fall" and bounce around. I suppose if you wanted to simulate zero gravity just turn off gravity. Moving the bones around would "move" the cloth causing it to react and move like a cable. Adjusting the cloth options would make it stiffer. Unfortunately I was in a hurry and didn't rig the cable tube properly so the joints "squish" and twist incorrectly. With a properly rigged cable it would bend smoothly and not get those twisted flat areas.

 

cable.mov

 

-vern

Link to comment
Share on other sites

I couldn't disagree more.

 

To set up the attached sequence, I made a 'tube' with 30 bones and two nulls.

 

Bone one is translated to null 1

 

Bone 2 is dynamically constrained to null2. The trageting method was changed to none. The translate offsets were set to 0.

 

That's it. No other setup.

 

Now, on the downside, I could not get rid of the squash that happens when the bottom loop of the 'rope' comes too close together. This would not be as severe if the motion wasn't so drastic. It can be minimized by increasing the drag a little.

 

The only real disadvantage I see with using Dynamics is that there is no pre-roll option. Other than that, it seems to be a much easier solution.

 

This 10 second video rendered in 1:13 with no multipass.

Dynamics_Test2.mov

Link to comment
Share on other sites

Yup, I agree. Your way much better less work.

 

Any kinking or collapsing is actually "easy" to fix... uh... easy in that it fixes it but it does take a bit of extra set up. You don't control the bones for the mesh directly. You would use the set up you have with the 30 bones. Then a second set of say 15 bones. Each of the 30 are constrained to the 15. Each bone getting 100% to one bone and 50% to the next. This will spread out the bone motion, sort of "softening" it a bit. I've even gone so far as to have 2 sets of bones... 40 to 20 to 10 for example... you could take it even further for a really really smoothly bending shape without any chance of kinking or collapsing at all that only needs a few bones to control. It does take a while to set up all the constraints though. I think this is used in the TSM rig for rigging tails and or tentacles. I remember this technique from years ago on an ancient VHS Siggraph tape I bought. ;)

 

Then you would link the final smaller chain of bones to the dynamic objects.

 

-vern

Link to comment
Share on other sites

There is one small advantage I discovered using the cloth spline constraint technique. You can change the "stiffness" or material of the cable by simply changing the cloth properties. You could make a thick electric cable, a strand of silk or a rubber band using the same rig set up and just changing settings in the cloth material.

 

-vern

Link to comment
Share on other sites

Update:

 

My thought of using that "tentacle" trick isn't working exactly as planned. The problem is that the vector or mesh bones are not a chain. They don't translate. The rotation is applied to each bone but not translation at both ends. Basically it was for doing tails or tentacles that are fixed at one end (not both). So with this set up you can only move one end. If you move both only the end moves. I think I will switch to using some sort of fan bone system based on the exact same concept but using the original geometry bones as the targets for orient constraints and "fan" bones as children of the original bones. Since the fans will be children of each bone it will behave correctly when moving the nulls to change the position of both ends.

 

I also found that changing the dynamics properties can create different types of cable "stiffness". Cloth still has more options for creating stretchable cables or strings, however some of that could be done with the dynamic set up but with cloth it's in one spot, the material.

 

Here's a quick movie showing the "tentacle" technique in action. Notice how the cable maintains the shape better:

cable2.mov

 

And here's the model file if anyone is interested:

verns_cable.zip

 

-vern

Link to comment
Share on other sites

I'll give it a shot. Are you mainly interested in the "tentacle" bone technique or the physics or the cloth?

 

I'll assume it is the tentacle bone constraints. There is probably an ancient tutorial out there for this but it wouldn't hurt to update it. The one I have on VHS is for AM 8.5.

 

-vern

Link to comment
Share on other sites

Found this link:

 

http://www.garycmartin.com/octopus_setup.html

 

This pretty much covers the idea. However I was very "rigid" in my spline and bone set up. I made sure all the cross sections and bone positions were "exact". I also only used ONE set of extra control bones instead of two. Using two makes it "stiffer".

 

Like I said, I'm working on another similar rig. Basically the same concept but the bones are parented in a different way for better control with "tethered" objects and dynamic constraints.

 

-vern

Link to comment
Share on other sites

Here's the verdict so far: almost there.

 

I've got the umbilical built as per Vern's example using a two-tiered hierarchy of bones. It flexes just fine. And I got the X-Machine and Beast Blob to run around together using a 20 frame lag. But I'm stumped on how to attach the chain to Beast & Machine. In some way, they don't like each other. The X-Machine is Translated To, and Oriented Like, Beast. Then I took the Root Bone in the Chain [the first hierarchy that's actually in the mesh] and Translated it to Beast, and the bone at the other end to X-Machine. Then I put a 15-frame lag on the X-Machine. What happens is that Beast and the chain move along fine except for the last bone on the chain [and the Machine], which lags OK, but the last bone stretches 'way out. Then, I also discovered that in Translating the first hierarchy, I was leaving the second behind. So I translated each end of that chain to the respective objects, and removed the lag thinking that I'd just move the Machine by hand at various key frames. But as soon as I move the Machine in any way, I get this long stretch in the last bone. I think the solution is close, but I can't see it.

VERN__S_ROPE.prj

Link to comment
Share on other sites

That "stretching" problem is due to the "tentacle" setup example. It won't work well with your set up. I am working on a better solution that should solve your problem.

 

Here's the main issue: that first bone in the chain CAN NOT be constrained to another bone because the constraints are only rotation constraints. Moving any of the bones won't MOVE the geometry bones, those bones that actually control the mesh. So when you constrain that last bone in the chain to the other bone only THAT bone will move, causing the stretching of the splines.

 

My NEW rig solves this by putting the geometry bones as children of the control bones. So, you get the same smooth bending result BUT when you translate the last bone the other bones move along like they should as part of the chain.

 

The above is a short explanation and NOT a tutorial by any means. I haven't worked out all the details (the dynamics example for instance). I will post it as soon as I can. I am using the same concept for my own project. I need some swinging, hanging cables and ropes to add some detail for overhead machinery to raise and lower a brick wall. It's the same concept, I want to have each end of the rope or cable attached to a different moving point.

 

---

 

Possible work around you could try on your own... but it might be tricky and I haven't tried it myself

 

The main problem is that the FIRST bone in the chain won't effect the position of the mesh. Moving the last bone however will move the cable. If you could possibly figure out a way to constrain that LAST bone to a bone OUTSIDE of the model and the model ITSELF is constrained to one of the ships, moving the MODEL will move the WHOLE THING EXCEPT THAT LAST BONE. This might give you the correct behavior.

 

I just now thought of this and will go and try it myself. Be back in a few minutes.

 

 

-vern

Link to comment
Share on other sites

Yeeeeeeehaaaaaaaa!

 

It worked! Piece of freaking cake.

 

Same rig, same setup. All you need are two nulls in the chor.

 

You use a translate to constraint on the LAST CONTROL BONE of the chain, NOT the geometry bones, that second set of control bones. The last bone of that chain is constrained to Null 1. That null controls one end of the chain.

 

Then you constrain the MODEL BONE of the chain model to THE SECOND NULL. Moving that null moves the whole model EXCEPT FOR THE LAST BONE OF THE CONTROL CHAIN! Works like a freaking miracle baby.

 

Let me know if you need more explanation. I will post a sample shortly.

 

-vern

Link to comment
Share on other sites

Let me know if you need more explanation.

As someone once said [and it might have been on this forum] "In theory, there is no difference between theory and practice. But in practice, there is."

When I move the Model Bone Null everything moves, including that last bone in the chain. Then, whenI move the Null at the far end of the Control Chain, nothing happens. When I check the last Control Bone in the chain, there is a 'Dynamic Constraint' on it instead of a 'Translate To' which runs counter to your explanation. Is this an oversight, or a 'higher logic' that zipped right by me? Finally, the last three bones in the Control Chain are numbered 29-31-30. In the PWS they are listed correctly. Is this confusing A:M in deciding where the end of the chain is?

Am I right in assuming [with these resolved] that one Translates the Model Bone Null to Beast, and the last Control Bone Hull to the Machine?

Link to comment
Share on other sites

It should work fine. Are you moving the nulls on frame 0? Nothing will happen on frame 0. You must be on a frame past 0. Don't move bones inside the cable model itself. Only translate the nulls in the chor.

 

Once you get it figured out, one null represents one object to constrain to (beast or machine), the other null the other one. It doesn't matter which is which. It would work either way.

 

-vern

Link to comment
Share on other sites

It should work fine. Are you moving the nulls on frame 0?

Yes, I was at Frame 0. I'll give it another shot.

Just to reality check a bit: The Control Bone at the end of the chain [X-Machine end] gets a Dynamic Constraint to its Null? Or 'Translate To'?

The 29-31-30 bone order on the end of the Control chain is OK?

Thanks much Vern.

Link to comment
Share on other sites

There is a constraint on the end of the control chain. The last bone of that chain whatever it is called. That bone gets dynamic constraint pointing to whatever the object is that should be holding or controlling it. Look at the properties of the constraint in the sample.

 

These are the two items you would change for this type of thing if you assigned this type of constraint on your own:

 

Target = shortcut to null (or whatever you want to target. I don't know)

Targeting = none

 

The "null" is what I'm using to move the chain. You can use whatever you like or, leave it like it is and use a constraint to translate the null.

 

There is also one more dynamic constraint on a bone in the middle of this chain, bone 25. It has no target and none for targeting. Not sure exactly that is needed but it doesn't seem to work without it.

 

-vern

Link to comment
Share on other sites

I did not look at the project but when I made my simple chain, I translated the first bone in the chain to the 'Parent' or main object.

 

I did not translate to the last bone in the chain. This caused the problems you are describing. Instead, I set the target of the dynamic constraint to be the 'child' object' main bone.

 

This gave me the results I needed. I also set the offsets to 0 but you can set these offsets to place the end of the rope to whereever you need it in the child and parent models.

 

Wade

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...