Episode 13- Shortest Path Growth

This week I learned about an interesting technique called “Shortest Path Growth”. Basically, the technique is a relatively quick way of producing organic-looking paths procedurally. Why is this important? Well, there’s the obvious, that organic movement is cool. It’s also difficult to make- short of hand animating each piece. I can think of a lot of use-cases, but the top that springs to mind is helping with having a model animate on and off in an interesting way. Here’s the result of several hours of tinkering:

ShortestPathGrowth.1.gif



Honestly, I kinda phoned it in this week on the texturing and lighting. I wasn’t going to color it because I spent so much time learning the animation technique that I just wanted to be done with the damn thing. But I stuck with it because I’m a fucking champ. Needless to say, my brain was pretty much at full-capacity. (What’s new?) But in the materials panel, I stumbled across something called “Toon-Shading” that was pretty fun to play with- hence the wild colors. Rather than giving you a fully shaded object texture, this lets you choose a highlight color, a mid-tone color, and a shadow color. Depending on how much light you have hitting certain parts of the material it’ll show one of those 3 colors. It’s an unexpected find that I’ll definitely be delving into tinkering with later because I think it can produce some really lively cartoon shading effects.

Ok, so back to this “Shortest Path Growth” technique. I found this tutorial from an instagram account that I follow, and they borrowed sections of it from another 2 Houdini artists that they reference in their tutorial. So it’s a string of techniques bunched and mashed together to get the end result of procedurally animated growth goodness. This is to say, it’s a VERY complex system of parts. At it’s core, it’s fairly simple actually. What is happening is we take a shape, in this case, a sphere. We defined a bunch of points on this sphere, (this “sphere” is really made up of polygons, so we use the vertexes to define the points) then we write some pieces of code in Houdini’s Language called “VEX” code, which gives us 2 main components- a system that finds the shortest path between the points and writes lines connecting them starting at a defined point, and sliders. Then with these sliders, we are able to control how far the lines spread from that initial point. Sooooo, from there it’s basically a simple matter of setting keyframes to animate the spread of lines. Unfortunately, lines don’t render in an export because they technically have no geometry or polygons to render. So you can do a million different things with this data, but I decided to go with an easy and familiar path of simply extruding out the lines into flat paper-like geometry.

This is a bit of an oversimplification of the process since the tutorial included about 10 extra steps AFTER what I just described to essentially take the points and scatter them about the surface of the sphere to achieve the randomness you see in the gif above. I’d love to go into more detail about it, but to be perfectly honest I was following along and just pushing the same buttons as this guy was after a certain point. Where he really lost me was the second or third node with VEX code in it. It’s a little tough to follow along with a language that you don’t know I guess. I plan on going back through it later in the week and seeing if I can tinker with it to see if I can understand what I did, but at least I learned a few interesting things this program can do if nothing else.

Plus toon shading.

What a day.

Jake-out

Jacob Sullivan