Episode 16- Sticks and Ropes and Things
Ok, so check it out guys. This week I learned a neat little trick. I saw this tutorial on how to make a rope/pipe/ anything wraps around something that stretches to fit objects you define based off of a plane you set it to be at.
I’m getting ahead of myself. This week I followed along to a tutorial about how to create a rope wrapped around sticks. Real ground-breaking shit. The thumbnail looked cool so I tried it out, simple as that. I have no idea what a practical use for this would be outside of video game design, but I’m sure use-cases will follow now that I know how to do this.
So the setup was surprisingly simple, basically I just made 3 tubes to stand-in as “sticks” in a geometry node, then merged them together. Now that I have them grouped together as a single unit of geometry, I was able to apply a node called a “Shrinkwrap”. It pretty much does exactly what it sounds like, as you can see.
From here it gets a tiny bit more technical, but it’s honestly still pretty straightforward. You make a grid, and connect it to the first input of a “intersection analysis” node, then connect the output of the shrink-wrap node to the second input. What this does is basically it tells the node to look for what the grid is intersecting with, and identify those points. Next, we use a series of 3 more nodes- the fuse, polypath, and resample nodes- to modify those points so that they’re spread fairly evenly along the shrink-wrapped sticks and not super bunched up in the corners. The last part of this little engine is adding in a sweep node to the output of all that business and adjusting a few settings to convert 2D point data into essentially one 3D pipe. Now anytime I want to make changes of where the “rope” is sitting or the angle that it sits at all I have to do is make those changes to the grid node and the pipe with fit itself around the object with out me having to scale it and finesse making it fit snugly around how it should. This is what’s so rad about this whole setup.
This is one of those really magical things about working procedurally that makes life a breeze if changes need to be made down the line, no need to undo a bunch of work to change the look of some rope. Easy Peasy adjustments- bring on the client revisions baby.
That’s pretty much it! To make this final cluster of pipes all I did was copy this engine a few times and with some creative plugging in of nodes into themselves I was able to make it so that each new pipe/ “Rope” that I laid down would adjust itself to sit on top of the last set.
Then I copied the entire structure a few times and we have the messy composition you see before you!
Final thoughts on this- discovering little tricks from tutorials that you didn’t expect has been a real joy. Always adding tools to the tool belt- maybe I won’t need them for years, but if I do, I’ll be happy to know a way or two to work around a difficult problem. Gotta count the little wins.
Also, checkout this pretty node tree this resulted in:
Happy Quarantine, stay safe out there folks.
Jake-out.