Home » Community » Forums » Graphics Programming and Theory » Convincing trees
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic

Page:   1 2 3 4 »»

 Last Thread Next Thread 
 Convincing trees
Post New Topic  Post Reply 
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!

 User Rating: 1022   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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

 User Rating: 1807   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

Imp...Imp...Impoztirors??? Whats that?

 User Rating: 1022   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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.

 User Rating: 1221   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Actually I don't believe that procedural trees can look good ;-)
(I mean in comparison to artist made ones)

 User Rating: 1022   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

...and I didn't see them being used in games...

 User Rating: 1022   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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


 User Rating: 1996   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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.

 User Rating: 1063   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

"Actually I don't believe that procedural trees can look good ;-)
(I mean in comparison to artist made ones)"

I feel sorry for you...

 User Rating: 1015    Report this Post to a Moderator | Link

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.

 User Rating: 1057   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

What does neverwinter nights use to produce the bigger trees? They really looked great.

 User Rating: 1000   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

@Yann
Yeah, some screenshots would be great!

@AP
Procedural trees with 50.000+ leafs, all detailed objects, hundreds of branches and high quality textures can look really realistic. But not in realtime! (At least I couldn't manage to do this ;-) )

 User Rating: 1022   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

That's the kind of tree I'm dreaming about:





;-)

 User Rating: 1022   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I would love to see some screenshots too =)... I guess I'm going to be doing this in my engine soon enough..

 User Rating: 1221   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Do what in your engine? The same as Yann?
Am I surrounded by uber-gods? ;-)

 User Rating: 1022   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

OK, here are some very preliminary shots. It's only a single tree per shot, as I'm currently adjusting the LOD thresholds and lighting. They will look much better in a large forest. Both trees are fully procedural. They are animated in realtime, ie. branches and leaves move in the wind, etc.






 User Rating: 1996   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Nice yann, could you post some lower LOD images though? And do you have any links on procedurally generating (general)vegetation?
Before, in a past engine, what i would do in my second level of detail would be isolate the tree and render it from different angles and then just texture 2 coplanar quads with it, but as you can guess, this looked horrible and never lent itself to large patches of trees

 User Rating: 1011   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

omg nice trees m8!

 User Rating: 1015    Report this Post to a Moderator | Link

Yann ... you never cease to amaze me ... sorry to add nothing to the discussion, but that's pretty frickin amazing.

Joel Martinez
http://www.codecube.net/

 User Rating: 1138   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:
Original post by Hairybudda
Nice yann, could you post some lower LOD images though?


They are already at a lower LOD: the trunk/branches are optimized to about 30% of their original faces at that distance. The leaves are partially patched in coplanar sets.

quote:

And do you have any links on procedurally generating (general)vegetation?


Sure. Try XFrog. That's the tools I used to create the basic tree skeletons. You can get extremely realistic trees with this great piece of software, but keep in mind, that those trees will range from 20k to over 200k faces per tree. So make sure, that your LOD and engine is up to it.

quote:

Before, in a past engine, what i would do in my second level of detail would be isolate the tree and render it from different angles and then just texture 2 coplanar quads with it, but as you can guess, this looked horrible and never lent itself to large patches of trees


Hmm, coplanar ? Do you mean perpendicular (ie. the classical X-shape) ? Or did you use real shifted coplanar shells, like in volumetric rendering ?


[edited by - Yann L on May 16, 2003 5:23:17 PM]

 User Rating: 1996   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

*uaa cry* that's not fair!!! *snief* I'm a loser...
...my x-billboards suck...


THATS AMAZING YANN! (What Engine is that your're working on? Doom4, HalfLife2, Unreal3 ????) ;-)

 User Rating: 1022   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:
Original post by VanKurt
*uaa cry* that's not fair!!! *snief* I'm a loser...
...my x-billboards suck...


THATS AMAZING YANN! (What Engine is that your're working on? Doom4, HalfLife2, Unreal3 ????) ;-)

Some more of Yann's work for you.

I love it when Yann 0wns threads.

 User Rating: 1025   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

That's not realtime, is it?????? ;-)

Could please somebody else than Yann post some shots of his/her trees and plants? Just that I have something to compare / orientate myself to.... ;-)

What Yann does is simply beyond my capabilities!

 User Rating: 1022   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:
Original post by Yann L
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



How about slowly squashing the tree until it collapses in to a billboard over distance. That way you would still have the perspective advantage over a greater distance. And of course cut away on the tree more generously as it moves away?


____________________________________________________________
Try RealityRift at www.planetrift.com
Feel free to comment, object, laugh at or agree to this. I won't engage in flaming because of what I have said.
I could be wrong or right but the ideas are mine.



 User Rating: 1078   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

No offence to Yann_L or anything, but could you guys kindlyt remove you lips from his anus? You're sucking so hard you'll give him a rectal prolapse...

 User Rating: 1011   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link
Page:   1 2 3 4 »»
All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: