Convincing trees

Started by
95 comments, last by VanKurt 20 years, 8 months ago
I''ve been reading through all the posts I could find on this page for more than an hour now but didn''t find satisfiing answers. I also have played games like GhostRecon, Battlefield, MotoCrossMadness2 but couldn''t really find out how they do it. Well, if you''re far away from the tree it is just a simple billboard. If you come closer it is faded into a real 3D object. That isn''t hard to do... But my problem is that I don''t know how to visualize the 3D Object. The trunk wouldn''t be too hard (a simple mesh). But what about the leafs? How do games (like mentioned above) realize them? Special textured quads along the branches? A 3D trunk and a billboarded Quad for the leafs? Real 3D (procedural) leafs? This slices method from vterrain? Well, I really don''t know... any ideas? Thanks!
Advertisement
A really cool way to do trees can be found on the nVidia site. They have an old demo somewhere in their archive that generated a fractal tree. You could generate a few of these fractal trees at runtime, and use them as imposters during run-time... Could work, who knows.

Trent Polack
trent.codershq.com
trent@codershq.com
Author of Focus on 3D Terrain Programming
Imp...Imp...Impoztirors??? Whats that?
Imposters are basically what you were talking about earlier... When the tree gets far enough away from the camera, exchange it with a billboarded quad.
Actually I don''t believe that procedural trees can look good ;-)
(I mean in comparison to artist made ones)
...and I didn''t see them being used in games...
Heh, a couple of days ago, I implemented a new tree (and general vegetation) renderer for our engine. I''ve tried a *lot* of different approaches, but wasn''t really happy with any of them. I finally settled with a hybrid 3D/2.5D/2D system, much like a grass renderer, but suited for large scale instanciated objects.

The idea is to render a full 3D tree near the viewer, with trunk, branches and leaves all 3D. Then, when the camera moves away, you can gradually switch to other, less expensive solutions. And that''s where the trouble begins. The trunk and branches are easy, a standard geometric LOD system performs very well here (QSlim for example). But that doesn''t work on the leaves. So I first tried a volumetric approach: rendering the leaves as a sliced set of aligned textures. That looks more or less OK, but takes a huge amount of memory, and can lead to weird visual artifacts, when the trees shape is very irregular (branches fading in and out).

So, I finally used a different method: The tree foliage first gets planar patched, ie. transformed into larger face sets, containing several leaves on a alpha blended planar layer. That looks nice, but takes quite a lot of fillrate. Still not optimal. I was thinking of dynamic parallax layers instead, those should give similar visual results but lower fillrate costs. I haven''t yet tried them.

When the camera gets even further away, I render the tree into a texture, and use that texture as a billboard. The z-information is preserved as an 8bit bumpmap over the billboard, allowing 3D lighting of the tree. That part works very well, is fast, and pretty realistic.

And finally, if the tree is really far away, I drop the bumpmap. Simple per vertex lighting of the quad is enough at those distances.

All in all, I''m happy with the quality and performance. I can post some shots, if people are interested. The only part that makes me still somewhat uncomfortable, is the second LOD, between the full 3D and the bumpmapped billboard. I don''t know, I''ll probably try out some alternatives.

If anyone has weird ideas about organic vegetation rendering, esp. trees, it would be nice if you''d share. Even if it''s totally bizarre, or you think it wouldn''t work, just post it. Sometimes the most weird ideas can get the best results
I''d be interested in seeing some screenshots. I''ll let you know if I can figure out a better way of doing intermediate detail levels (before the bumpmaped quad) when I get to that part of my engine.
"Actually I don''t believe that procedural trees can look good ;-)
(I mean in comparison to artist made ones)"

I feel sorry for you...
In my crap ass renderer, I procedurally generate trees, trunk/branches in full geometry, leaves as sets of textured quads..(but i''m unhappy with that atm), anyhow, as the trees get further away, i start dropping branches below a certain size, and at the lowest detail level, all I draw are the leaves...looking into a valley full of trees from 700 - 1000 meters away, only seeing the leaves is good enough at that distance.
Waramp.Before you insult a man, walk a mile in his shoes.That way, when you do insult him, you'll be a mile away, and you'll have his shoes.

This topic is closed to new replies.

Advertisement