Tree and Plant Modeling

As you may imagine, some sort of things are easy to model and other are not. For an example, if I create some mechanical objects, or furniture it will be quiet easily created. It will be more difficult to create creatures like humans, dragons, etc... But sometimes the more common thing in real life will be the most difficult in computer graphics. Yes I'm talking about all those green things around: plants and trees. Some will be quiet easily modeled like cactus (if you don't create those spikes), but try to imagine to create a good looking oak tree. And if you plan to create outdoors images you will need some vegetation, at least some grass. In this article I plan to explain you different approach and tools you may use depends of what you need.

The first solution is using textures with alpha channels (transparency), and generally those textures are based on photographs, the drawback is that good textures are not free and sometimes are very expensive. You may find some for free but if you want a full CD of vegetation you will have to pay. I can give you some URLs:

Marlin Studio (CD with textures including a Virtual Tree and foliage)

Image Farm (Site with Royalty-Free photos)

Image Cels (CD and free samples of photo with alpha channels)

You may also take some photos yourself and do the work of cutting the interesting part (which can be quiet time consuming). The following example is done using a free sample from Image Cels.

The second solution I will present is the most useful for 3D games. First of all you will surly agree that we need a 3D look of a tree with as low poly as possible. There are numerous Solutions to achieve that, most use a texture with alpha channels and a base object in low poly. For example if I want to make a tree I will have the root of the tree as a 6 sided cylinder and put branches and foliage on textures. Or copy and past 4 to 6 times the same flat textures to see the tree from every direction. For this you will archive better results using symmetrical textures.

The last solution I will discuss is to use a full modeled object. You may try to model a tree by yourself but I don't think you will go very far... as this will require a huge amount of time. But I found some interesting tools that you may use. The first one which is by far more complex to use but extremely powerful is called an LParser.

You may try this LParser which is free by the way. An LParser is a tool that take a text based formula and generate some other media. For example a 3D object. You will ask me what is strange with it, pov can do exactly the same... well... For example if I take the following formula:

# This is a test121830SS=FFAA=[B][C][D][E]B=++'(.7)tRAC=--'(.7)tRAD=&&'(.7)tRAE=^^'(.7)tRAR=+&F+&F-^F-^F@

Will give you some interesting results:

I used this object with another color as a coral inside a underwater image as showed in this image (look at the bottom right):

and I must say it gave an excellent result. Of course this is a complex object because I got 32748 faces. I can't imagine doing this by hand. Now how does it work ? Well it's recursive parsing, every time I have a formula like R=+&FR the parser will do what it must for character like +&F and then he found back the R order which is the full formula so it will go a step down a do it again. Of course you may specify how far in the recursion it will go, if you don't want to have a never-ending formula :-) And this is specified by one of the first numbers in my program. You may generate more or less what you want with this tool and my next example will be example of a tree which should be completed with textures and the formula retouched to achieve the best results but it's a good start:

But if you want more info on this tool you should got to the site and read the documentation given with the package.

I also want to present another tool which is a shareware. I used it to create small plants like in-house vegetation or it may be used to create outside flowers, grass like vegetation and so on. It do not create trees for the moment. The software is called PlantStudio. A free demo is available, but its output may not be distributed. It's not expensive (about $20 US) and may be very useful. The interface is extremely simple:

And you may generate more or less every sort of small vegetation. I have a simple example of what I got inside my renderer. I tried also the "age" parameter inside PlantStudio to see how a plant will grow (look at the first row of pots):

Those 2 tools may export DXF files and then be converted or imported in you own 3D package. So it's quite easy to incorporate those vegetation objects inside your images.

In conclusion, the method you will choose will depend on what you need to do. The first solution will generally produce good quality results for still images, while the second is for 3D real-time games and the third is good for animations or lower quality still images.