Pages

Wednesday, June 27, 2012

Cable Maker

So what I wanted to do here is, given a curve with 3 points, create a spiral along it. I tried a few methods at first, including trying to use a foreach node to iterate through each circle copied along the curve and rotate them based on a stamp value given by the foreach node. However, that didn't work. :( So I consulted Ari and some of the interns and they suggested using the wiredeform node. I wasn't really keen on this initially as it would mean starting with a line, and adjusting the position of the midpoint of the line was a bit of a hassle (not that little considering the amount of cables I would have on my final model. I adopted this approach but tried to find a workaround to allow me to use a curve to control the shape instead. And it worked! Also thanks to Chris for help with the wirecapture node!

This is done by using the copy and foreach nodes on the left. the copy determines the number of spirals, with an expression to automate the rotation so the spirals would be equally spaced. The foreach node takes these circles, and iterate through each circle, with another copy and skin nodes inside creating a spiral for each circle. More EXPRESSIONS inside on the copy!
This is the fun part! Because I would simply not settle for manipulating a line, I created an expression that takes the distance between the first and last point on my curve, and creates an equidistant line. The npoints expression gives the line the same number of points as the curve. This is necessary in order for the wiredeform to accept the curve as a deformed wire.


And after wire capturing and deforming! Initially the spirals were flattened once they reached the bend, however, I fixed it by adjusting the capture radius in the wirecapture node. Thanks again to Chris!

Now for more bulletproofing!

No comments:

Post a Comment