Easy Trees (part 2)

In part 2, I’ll talk about the next way to do low poly trees and shrubs.

For this example, we’re using a standard tree map you’ll find in any package. There are 2 files, the map itself (in color), and the mask (the one that has the tree in white on a black background). This is what they look like:

trees2_1.jpg

The images are always the same size. In this case, the images are 1645 pixels wide, and 1991 pixels high:

trees2_2.jpg

This is a 0.826 width/height ratio. Then make a simple plane to hold the tree image, making it the same dimensions as the image. In this case, I made the plane 100″ in length (height) and 82.6″ in width.

trees2_3.jpg

Next, we need to create a material to hold the image:

trees2_4.jpg

You apply the bitmap (even if it is a jpg) to the “Diffuse” channel. If you double click on the small material sample window, you’ll get a bigger version to more closely inspect the material. Right now, we can’t use this as our material because the parts that aren’t the tree are not transparent:

trees2_5.jpg

If we go back to the Maps for this material, we can make the material transparent in the right spots by using the mask in the “Opacity” channel:

trees2_6.jpg

Now the material is ready to go. All we do now is select the plane we made earlier, and apply this material to it. Either click on the apply icon, or select Material -> Assign to Selection

So now we have a single plane with our transparent tree on it:

trees2_7.jpg

As you can see, there is no shadow, and the tree is flat. In order to make another plane, rotate the existing plane around the Z axis 90 degrees while holding the shift key. When asked, create an instance. Instances use far less resources than copies, and allow global modification of objects.

The scene should look something like:

trees2_8.jpg

If we render this new tree, it will look like this:

trees2_9.jpg

You’ll notice that I am using a faded checker pattern instead of stark, black squares. This will make the shadows we’ll do next easier to see. To show what happens when a standard light is applied, check this render out:

trees2_10.jpg

I used a rectangular direct light to show the problem clearly. The light creates shadows from our tree, but unfortunately it also washes out those shadows. The stronger the light, the more washed out things are. The solution is to create the shadow for the tree that is independent of any positive light source.

trees2_11.jpg

So take our existing light, and go to General Parameters -> Exclude and exclude the 2 planes that make up our tree. You can’t select everything, as we need the plane (ground) enabled to allow the projection of the shadow. In our simple scene, it will look like:

trees2_12.jpg

For the light, go to Advanced Effects -> Projector Map and select the mask for the tree image. Under Directional Parameters -> Bitmap Fit, select the same mask. Finally. make the light’s intensity -1.0. A negative intensity will project the opposite of the mask onto the plane. The mask had white areas for the tree’s parts, so now the light will project dark in that pattern. Be sure to turn the Shadow off for the light, as we’re not actually calculating a shodow-we’re projecting one.

With a little positioning of the light’s target, it will look like this:

trees2_13.jpg

When you look at the tree from above, it will look like this:

trees2_14.jpg

To adjust the shadow’s intensity, simply adjust the amount of negative intensity. This is with a -1:

trees2_15.jpg

Now see the difference with -2:

trees2_16.jpg

This approach works for most applications where you need a high quality tree/shrub/bush that can bear close inspection. It gives a very low poly count (2 planes), and the shadow is not actually calculated. This makes the model extremely fast to render.

Note: The render times are for a Dell D620 1.8GHz with 2GB RAM. Considering how much time a full 3D tree would take to render, these times are excellent.


Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/16/d105165054/htdocs/atcp.us/blog/wp-includes/formatting.php on line 4819

Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/16/d105165054/htdocs/atcp.us/blog/wp-includes/formatting.php on line 4819

Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/16/d105165054/htdocs/atcp.us/blog/wp-includes/formatting.php on line 4819

Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/16/d105165054/htdocs/atcp.us/blog/wp-includes/formatting.php on line 4819

Leave a Reply
Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/16/d105165054/htdocs/atcp.us/blog/wp-includes/formatting.php on line 4819

Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/16/d105165054/htdocs/atcp.us/blog/wp-includes/formatting.php on line 4819

Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/16/d105165054/htdocs/atcp.us/blog/wp-includes/formatting.php on line 4819

Your email address will not be published. Required fields are marked *