Houdini

The rainy forest cinemagraph, Part 2

Continued from the previous post.

Part 2 here is all about the hero plant, which was by far the most time-consuming part of this whole process. The animation ended up being done primarily using FEM, which in retrospect was probably overkill. If I were to try this again, I’d probably try to build a more procedural system involving IK chains with maybe a layer of simple soft body dynamics on top to add springiness. Going the FEM route meant that each iteration took about 30 minutes to simulate, which adds up pretty fast. There are some neat little shortcuts elsewhere in the process, though, that hopefully some readers will find useful.

The hero plant

I am a masochist so I again started with L-systems to create the basic plant structure. L-systems are one of those things that start very simple and quickly build in complexity until they’re totally unreadable, so you generally want to keep notes of what the rules are actually doing as you build them. Of course, the notes from the original .HIP file that I posted are outdated, as they apply to an older version of the plant, so if you’ve already checked out the .HIP you may want to read these more accurate notes.

Here’s what the rules look like:

(more…)

Houdini

Nesting L-systems in Houdini

L-systems can get very complex very quickly. If you want full control over exactly how the plant grows and what its final shape looks like, you’re in for a long haul. There are a few ways to get “artistic” control over an L-system, like using metaballs to influence rules depending on the turtle’s position inside or outside the volume, but in general a single L-system has to control everything just with variables, which gets tedious quickly. It gets even worse when you want complex branching structures.

I was following along with the excellent L-systems tutorial (part 2) from cmiVFX, which offers a way to nest L-systems using some creative use of the Copy SOP. If you’ve checked out the tutorial, it’s in an older version of Houdini which historically crashed when you tried to connect L-systems together as Leaf inputs. While this isn’t the case anymore with Houdini 12, you still miss out on the big advantage of the Copy SOP method, which is manipulating point attributes and using these to set properties of the branch L-system using copy stamping.

I won’t go into the finer details of setting up this method; you really should just watch the tutorial I linked to in order to understand how the Copy SOP method of nesting L-systems works. Basically there is a “trunk” L-system, which has rules that call for a “J” leaf. The “J” leaf receives a simple curve with three points, one at the center, another straight above the center (+Y), and another along the positive Z axis. After this curve is copied onto all the J inputs in the L-system, you can use the difference in position of these points relative to each other to determine a normal and up vector for each instance of the curve, and write these vectors to the points. Then the points other than the center points are deleted, along with the trunk, leaving you with a bunch of points from which branches will sprout, each with attributes N and up. These attributes are automatically used by the Copy SOP to orient an instance of a second “branch” L-system to each point. Again, this is a very quick write-up of a complex network, and you should watch the tutorial. Hit the jump for more…

(more…)

Houdini

Some notes about L-systems in Houdini.

I’ve been spending a good amount of time recently on trying to figure out L-systems in Houdini. I’ve always wanted to be able to grow plants in 3D, and I was always frustrated by the lack of flexibility in Maya’s Paint Effects and the Onyx plant generator, so I figured it was time to learn this once and for all. Let’s just say there is a bit of a learning curve, like anything else in Houdini.

I’m not going to go into the basics of L-systems here, there is way too much for me to even consider posting. The best resources I’m aware of for learning how to use them in Houdini are this tutorial on Digital Tutors, and this tutorial on CmiVFX. The Digital Tutors tutorial is probably a little bit easier to start off with as it tries to take a more flexible approach to making the plants grow (as opposed to CmiVFX’s more “pure” L-systems approach) but they both require basic Houdini ability before you start.

Anyways. The plant I was trying to create was a little seedling, with leaves that unfurl as they grow out from the main stem. Here’s what I came up with:

Hit the jump to see the breakdown…
(more…)