L-Systems

From Odwiki

Jump to: navigation, search

The L-System SOP creates both polygonal curves and meshes based on standardized L-System rulings.

L-Systems are short for Lindenmayer systems: A method of generating geometry by creating rules based on self-similarity.

While most think of modeling plant life with L-Systems, there are a wide range of uses and effects one could apply them to.

To learn how to use the L-System SOP, the following resources are available:

  • Houdini’s Help Window within the L-System SOP
 : Contains all the rules available and their operations.
  • Houdini’s Geometry PDF
 : Contains a whole section dedicated to L-Systems and tutorials on each of the SOPs functions.



FAQ:


Q. My L-System doesn’t grow smoothly... Even the default L-System doesn’t grow smoothly… What can I do to fix this?


A. Well before we get in to how to fix it, first we need to analyze how L-Systems are generating geometry to understand why it’s not growing smoothly in the first place.


As an example, let’s use an extremely simple and very basic L-System that can be written in two different ways to affect the way it grows. Even though the two sets of L-System rules look identical at first glance, they will be completely different in how they generate:


            L-System 1:                 L-System 2:
            Premise: A                  Premise: A
            Rule 1:  A=FA               Rule 1:  A=B
                                        Rule 2:  B=FA


So when we look at these two L-Systems, they appear exactly the same: A straight line going in the positive Y. But if we animate their generation, L-System 2 only grows during generation 1 to 2, 3 to 4, 5 to 6 and so on and so on.
So what’s with the pauses? Well if we write out what the L-System is doing at every generation, we will understand why:


Description


So you can see that because L-System 2 returns “B” every other generation, it has to evaluate “B” once it comes up. If we go back to the original default Houdini L-System, you’ll notice the same thing happens here as well.


Now on to the original question... How the heck do I fix it? Well two ways:


  • 1. The long but more “proper” way:
Re-write you rule set so that your L-System will grow continuously and not get stuck on evaluating certain rules.


  • 2. The quick “hack”:
Set two key frames right next to each other so that it will “jump” over the pause.
i.e. Using L-System 2 from the example above:
- With all your curves set to linear, set a key frame at frame 1 with a Generation Value of 1. At frame 10 set a key frame of Generation Value 2. At frame 11, a value of 3. At frame 20, a value of 4. At frame 21, a value of 5. At frame 30, a value of 6. And so on and so on. Basically this just means you are skipping over the generation(s) that are getting stuck in only 1 frame.
- Another way to do this hack is to just set your first and last key frame where you want. Then just scrub to the spot where your generation value crosses over in to a stuck area, set a key frame right before and right after the cross over. Add the number of generation values you need to “jump” over the area to the key frame after the cross over. Continue doing this for every generation value that causes you a problem.




L-SystemRepository where the community can share example L-System rules.

Back to Modeling

© 2009 od[force].net | advertise