PDA

View Full Version : lamp wire dilemma (limitation of Extrusion Along Curve?)


4SweetB
12-13-2004, 11:12 PM
I have gotten myself into an interesting predicament while playing around with NURBS in XSI (which I'm very much enjoying, coming from LW.. that, and having an operator stack!)

I'm trying to make a lamp cord by extruding along a guide that I can later move around (or hopefully even animate). I made a very nice profile curve of the insulation. With but a few clicks of the mouse, I had an excellent cord. Of course, I had to get ambitious. :)

I decided to make it one of those speaker cord type deals, where you can see the two conductors through the (semi-)transparent plastic insulation. I pulled the curve out of a disc to get a couple nice clean round profiles for the two conductors, and proceeded to extrude them along the same guide as the insulation.

Doing this of course meant that I had to offset the profiles and use "snap to profile", so that each conductor is on its own side of the cord. That looked good, so I went ahead and surfaced the conductors to look like two different metals, as they often do in speaker cords.

From my vantage point, it looked great, but when I checked other angles, I found that as the cord twisted around, the conductors crossed each other!

I immediately realized that this was because snapping to the profiles was causing the paths of the conductors to fail to account for their offsets from the center of the cord (and therefore the positional offsets caused by its rotation).

If I turn "snap to profile" off, then the conductors will correctly follow the rotations of the cord, but will also happen to both run down its center, which is, of course, wrong.

Mathematically speaking, what I should do is leave "snap to profile" off, but have the object centers of both profile curves at the same center as the insulation's center. In theory, this would make XSI have the conductor run alongside the guide curve instead of right through it, while still correctly accounting for the cord's rotations.

Unfortunately, it seems I've found an oversight in XSI (surprising as that is), because it doesn't actually do that; if I offset the centers, it still pulls the geometric centers of the profile curves through the guide curve, NOT the *official* centers of the profile curves like I need it to in this case. I even tried deleting the surfaces and extruding again in case it had compensated for the change in the centers, to no avail.

Can this be for real? Have I really found a limitation? Can anyone think of any magic that might solve this? I suppose I could use three separate guide curves, but that sounds overly complex and harder to animate. There must be an easier way...

Cheers,
Kevin

comanche
12-13-2004, 11:54 PM
Hi Kevin,

two things might work (I prefer the 2nd one):

1. Model the cords straight and use "deform by curve" to get more control over the placement around the curve

2. Create a straight curve. Duplicate it as many times as needed - one duplicate for each wire. Offset the duplicated curves to the original curve. Now deform the copies by the original curve. You can now edit the curve in point mode (or anyway you like - even with other deformers) and all the duplicated curves will follow the deformed shape. Extrude a circle along each curve to create the wires. You only have to edit/animate the original curve - all others will follow.

Regards,
Andreas

MJV
12-14-2004, 12:04 AM
Could you use a figure eight shaped curve as the profile of the internal wires?

4SweetB
12-14-2004, 02:20 AM
Andreas, MJV, thank you both for your replies. After I wrote that post, I took a break and another solution occurred to me. Actually, it was a similar idea to Andreas' suggestion #2. MJV, yours is an interesting idea too, although the only problem with that is you can't get too close or else you might see the two wires are shorting. :)

Here's what I ended up doing. I made a linear curve with two points, snapping those to the points of my wire circles. I used the guide curve to extrude that into a ribbon, which I set to hidden. I used the isoparms of that ribbon as the guide curves for the two wires. This worked, but Andreas' suggestion is more direct than mine... leave it to me to always find the craziest way to do something. :) I'll remember that method in future.

Hopefully they fix this, though, as it would have made more sense just to move the centers.

Thanks again for your ideas,
Kevin

CGTalk Moderation
01-20-2006, 05:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.