PDA

View Full Version : dynamic tubes/cables



p_micah
12-29-2006, 12:01 PM
i know i have posted question before, but i still haven't found a good solution. i have new project and need a way to set up cables to react to the movement of other objects. i've tried different bone configurations and IK. i got close working with goals and targets, but still can't get desired results. any help?

thanks in advance.

Ztreem
12-29-2006, 12:06 PM
Use clothFX on a two point poly chain and simulate it, then affect your cable object with metalink.

p_micah
12-29-2006, 12:19 PM
thats a good idea. can i parent each end of the poly chain to different objects?

SplineGod
12-29-2006, 11:19 PM
Select the first point in your polystring and give it a weight map called 'first'.
Select the last point in your polystring and give it a weight map called 'last'.
Select the first and last point and give them a weight map called 'fixed'

Apply sockmonkey to the polystring in layout. It will create two handle nulls, one called first and one called last. Those nulls can be parented to any objects.
Use the 'fixed' weight map in clothfx under fix.

evenflcw
12-30-2006, 09:02 AM
I just discovered last week that there is actually another way to attach a point in a clothfx'ed mesh to an item (usually a null). A more direct way. You simply use the ClothFX sewing tool. You can sew points to items!

I used to use weightmaps and bones (instead of weightmaps and sockmonkey) to do this since I rather use the same tools for multiple things than a different tool for everything (and I like LW bones). Now I'm not so sure. The weightmap approach is still nice because more info is contained and preserved in the LWO rather than the LWS. But the sewing-approach is alot faster to setup and tweak (despite the somewhat quirky workflow) since you won't have to bother with Modeler and weigthmaps, bones or sockmonkey. And since you can sew and cut by event you can also start or end the point-to-item-attachment at any time.

evenflcw
12-30-2006, 09:09 AM
Is it correct that you can't sew-by-event AND cut-by-event on the same pair of points (or point and item) within one scene? It's either sew OR cut. Right?

SplineGod
12-30-2006, 09:49 AM
Whats dumb is motion designer allows you to attach to objects but that option isnt in clothfx.

evenflcw
12-30-2006, 10:34 AM
Motion Designer. Talk about a dead horse! ;)

I don't remember MD that well. Are you talking about the "Fixed Reference Object" setting? I guess you would need to setup multiple parts/surfaces to attach to multiple items using that? It might be more obvious but not much different than the weightmaps approach in ClothFX imho. And I think we can agree upon that attaching to point(s) makes more sense than polygons.

SplineGod
12-30-2006, 11:35 AM
Motion Designer allowed you to link your dynamic object to a couple of nulls for example, one at each end similar to IK. Its strange that this feature wasnt included with the updated dynamics. :)

evenflcw
12-30-2006, 11:45 AM
OK, now you are almost just repeating yourself. What I was wondering was where and how you practically set this up. Any chance you remember?

Ramon
12-30-2006, 11:55 AM
You said that you didn't remember MD that well. Larry's just helping you recall.

Cageman
12-30-2006, 02:23 PM
The teqnique Larry suggested works really well. Thanks a bunch Larry! Now I finally got to use SockMonkey! :)

However, I have another problem. I want the result using this teqnicue to be transfered to bones. I figure that I can save out each point of the 2-point polychain as Nulls and then convert those nulls to bones. I havn't tested this yet though. :)

I've tried using IKB to do a similar thing, but it doesn't look half as good as this approach, so other ideas to get ClothFX to drive bones would be really interesting!

BTW... great thread!

SplineGod
12-30-2006, 03:09 PM
I dont typically use sockmonkey for much. Its pretty limited and doesnt play well with other displacements/deformations.
Why do you need to drive bones this way?
If I were going to I would probably use the PLG Curve Bone plugin. Run Clothfx on your 2 point polystring. Use it FX to create nulls from each point. Use those nulls as the controls on the Curve Bone plugin.

Cageman
12-30-2006, 04:46 PM
Well, we do ingame stuff in LightWave and we need translation and rotation data. Deformations can only be driven by bones.

Cageman
12-30-2006, 05:48 PM
Ohh... and by the way... How would I go about parenting the end of the 2-poly chain to an object of my choice without using SockMonkey? If I don't parent it, I can't get any usable cloth fx out of it. Hmm.... this isn't simple at all... :/

Axis3d
12-31-2006, 12:26 PM
Here's a quick test I made. It's something I was working on when I came across this thread. This shows two ends of a rope attached to two legs of a dinosaur, but it wouldn't take much to modify it for two different objects instead.

Here's my method:

1. Animate dinosaur.

2. Apply SoftFX to dino. Open the SoftFX interface and under the Operator Tab > Operator1 Map - set this to "none". This tells SoftFX not to apply any of its deformations to the model and to only record the point movments instead. Hit Calculate.

3. When finished, go to EditFX tab > EditTool. Lots of points get highlighted. Select one which will be the Front of your rope. Select Commands > MakePath. This bakes out a null with keyframes. Select another point for the Back of your rope and bake out another null.

4. When done baking points out, remove SoftFX from your model.

5. Load in a 2d polychain model. This was made in a similar fashion as splinegod has described except I do not use sockmonkey. In modeler, one endpoint is given a weight map called "Front". The other endpoint given a weightmap called "Back". Both endpoints are given a weightmap called "Fixed_Ends". At this point, I have also added two small bones to the polychain object, placing each one at each end of the polychain - at their pivot points. These bones should be given the names "Front" and "Back" to match the weightmap names.

When this 2d chain is loaded into Layout, convert skelegons to bones and the bones should automatically match up to the weightmaps.

6. Select the null in Layout which represents your Front end of the rope. Then select File > Save > Save Motion File. Give a name of Front.

7. Select the null in Layout which represents your Back end of the rope. Then select File > Save > Save Motion File. Give a name of Back.

8. Make sure Parent in Place is turned off or the bones will not snap to their correct positions.

9. Select the bone in your 2D chain called Front. Then select File > Load > Load Motion File. Select the Front motion. Do the same for the Back bone.

10. From this point, add ClothFX to your 2D chain. Under the Basics Tab > Fix - select the "Fixed_Ends" weightmap. Set up your values for your rope, and hit calculate. Both ends of your rope should stay attached to two differents ends. In this case, I made the dino a collision object and added a collision ground plane also so the rope could collide with things. I had a tube object which I had FX_MetaLink applied to. That object must be parented to the 2d chain to work.

If you were doing this effect with two separate objects, you could use Save Motion on each object and apply those to the bone ends instead. When you use Save Motion, it saves the motion from the pivot point of the object.

Hope this helps. Happy New Year everyone!

Cageman
12-31-2006, 02:52 PM
Great tecnique! Thanks for sharing!

FONGOOL
12-31-2006, 03:14 PM
Axis3d, for some reason I can't see your .mov. If I right click on it I end up saving an .htm file, and if I left click on it I just get a page full of garbled text.

SplineGod
12-31-2006, 03:20 PM
same here

Cageman
12-31-2006, 03:27 PM
Ohh... I didn't see that there was an attachment! Must be blind or something *LOL*

I get the same errors as Fongool and Splinegod. :/

Axis3d
01-01-2007, 10:12 AM
Sorry about that guys, see if this link works.

http://mywebpages.comcast.net/axis3d/Apato_Rope_1.mov

FONGOOL
01-01-2007, 10:44 AM
That worked! Thanks! :)

The effect looks really good!

munky
01-02-2007, 01:51 PM
Hi There,

I was wondering how if your cable is stretchy you would be able to get bones to follow your nulls and resize to maintain the elastic length of the cable?
see the attached movie where I have just used two bones to move the pillars and a pointset to exclude them from the clothfx calc and then I have followed Larrys edit fx suggestion to make the nulls. Don't bust your chops on this as I was just being curious about Cagemans need for bone driven deformations but using dynamics!

I hope this makes sense

regards

Paul

Cageman
01-02-2007, 02:40 PM
I hope this makes sense

regards

Paul

Great example!!! :thumbsup:

I'm working on a similar solution and it looks like we are on the same page! The bad thing is that I can't show any of the stuff I'm doing because it is work-related... :/

SplineGod
01-02-2007, 05:05 PM
I guess if the bones are using weight maps only it really doesnt matter what the bones orientation or length is. They wouldnt even have to be in a heirarchy. :)

munky
01-03-2007, 09:22 AM
Hi again,

thank you for the thumbs up Cageman! Unfortunatly thats as far as I have got, just how to progress to bones from there has got me stumped. I think it might be up to Splinegod to throw me some Manna down from heaven to fill in the large gaps in my small brain!


regards

paul

SplineGod
01-03-2007, 09:26 AM
I have that phone cord rig on my site that does pretty much what you described.

munky
01-03-2007, 10:33 AM
Thankyou Splinegod,

very nice

regards

paul

Cageman
01-04-2007, 01:20 AM
I guess if the bones are using weight maps only it really doesnt matter what the bones orientation or length is. They wouldnt even have to be in a heirarchy. :)

Exactly. Once I've got the softfx to do its thing, I just output all points to nulls, save each nulls motion and apply that motion to the corresponding bone in a totaly different scene where the object is in the "bindpose". It doesn't work if I have the bones in hierarchy, but just unparent them and it will work! :)