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…)