Tree and plants modeling

As you may yourself imagine some sort of things are easy to model some other are not. For example if I create some mechanical objects, or furniture will be quiet easily created but 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 photo the backdraw is that good textures are not free and sometimes are very expensive. You may found some for free but if you want a full CD of vegetation you 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 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. Solutions to archive that are a lot but most use a textures 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 time the same flat texture 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 do exactly the same... well... For example if I take the following formula:

# This is a test
12
18
30
S
S=FFA
A=[B][C][D][E]
B=++'(.7)tRA
C=--'(.7)tRA
D=&&'(.7)tRA
E=^^'(.7)tRA
R=+&F+&F-^F-^F
@

Will give you some interesting result:

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 he must for character like +&F and then he found back the R order which is the full formula so he will go a step down a do it again. Of course you may specify how far in the recursion he must go, if you don't want to have a never-ending formula :-) And this is specified by one of the first number of my program. You may generate more or less what you want with this tool and my next example will be example of tree which should be completed with textures and the formula retouched to archive better 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 want to present you also another tool which is a shareware. I used it to create small plants like in-house vegetation or may be used to create outside flowers, grass like vegetation and so on. He do not create trees for the moment. The software is called PlantStudio and may freely downloaded but you should pay for using it. It's not expensive 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 quiet easy to incorporate those vegetation object inside your images.

In conclusion the method you will choose depend of what you need to do. The first solution will generally have good quality result for still images, the second is for 3D real-time games and the 3rd is good for animation, and may used for still also but will results that are not as good as the first one.

A. Bertrand