Game Development Community

dev|Pro Game Development Curriculum

Plan for Ben Garney

by Kyle Carter · 06/12/2004 (11:51 pm) · 37 comments

In my elusive spare time, I'm currently working with Robert Blanchet and Wes Beary on a forest code pack. The idea is to code up a fast forest renderer that people can use as a quick, cheap alternative to more expensive and comprehensive tree rendering solutions.

Wes chipped in some cheesy tree placeholder art (done to the special requirements of the renderer), and Robert and I hammered on the task of writing the renderer. Clark, ever the 3space wizard, gave us some valuable guidance.

And here are some screenshots, from my pathetic GeForce2 powered laptop:

www.pblabs.com/forest/screenshot_004-00011.jpgwww.pblabs.com/forest/screenshot_004-00008.jpgwww.pblabs.com/forest/screenshot_004-00006.jpgwww.pblabs.com/forest/screenshot_004-00005.jpgwww.pblabs.com/forest/screenshot_004-00003.jpgwww.pblabs.com/forest/screenshot_004-00001.jpg
The forest pictured contained 29921 trees, of which about 500 were actually being rendered at any given time. Before the forest, Torque ran at about 70fps. After the forest it averaged about 45fps. My CPU is 1.8Ghz.

Two geometry detail levels per tree (we had two types of trees) and one automatically generated billboard detail level were used. If you look very closely, you can see some nasty glitches in the detail selection code, as well as some overlapping trees - these are both known issues and we're working on fixing them. The forest code is fully networkable. You can define clearings as well as what trees are placed where and with what probability. There are a lot of options to tweak forest LOD. Things like rocks and ground cover can also be rendered using the forest code.

Anyway, I'll probably post another .plan when we have better art and get some of the more heinous rendering and performance flaws fixed up.

Disclaimer: This is work I am undertaking as a private citizen, not as a GarageGames employee. By posting this plan, I am in no way implying that GG is involved in the development of this product, nor am I implying that GG condones my development of this technology.
Page «Previous 1 2
#1
06/13/2004 (12:05 am)
Nice - very nice. This will be fun when it's released :-)
#2
06/13/2004 (12:31 am)
Looks funky Ben. What do the trees look like from above? I would imagine the billboard show up quite a lot there?

Anyway, looks funky.

What about the pack? get on with it!!!
#3
06/13/2004 (12:37 am)
Actually, it uses TSLastDetail so if you look straight down from high above you see.... the tops of trees.

;)
#4
06/13/2004 (12:41 am)
Ben, this is a really impressive project you and the others are working on, with so many people asking for a resource on how to integrate "more expensive and comprehensive tree rendering solutions" this will be very useful. Can't wait to check it out.

Matt
#5
06/13/2004 (12:48 am)
Since my machine is a little beefier then Ben's I ran my settings a little more aggresively. There are over 12k trees being rendered in the below shots.
hosted.tribalwar.com/legends/xgalaxy/forest1.jpghosted.tribalwar.com/legends/xgalaxy/forest2.jpghosted.tribalwar.com/legends/xgalaxy/forest3.jpg
#6
06/13/2004 (1:32 am)
Those are some small trees... But I love it. Its like uber fxFoliage :D
#7
06/13/2004 (1:41 am)
Guess I won't be needing SpeedTree after all ;)

Great job guys!

-Greg.
#8
06/13/2004 (3:07 am)
Awesome guys! Can't wait to try this :)
#9
06/13/2004 (5:25 am)
Mmmm, Ben, I am a layman when it comes to programming but have been tossing around some ideas when it comes to real-time forests.
The thing I've been thinking, if you auto-magically splice the tree in 4 and render the side(s) closest to (in line of) the viewer (player) in high detail and all other sides at low detail (or not at all) within a given radius and a certain field of view (something lower than the regular FOV, say 60), the trees that lies outside that radius and the detail-FOV could be plain billboard.
It's just a tought, I have been meaning to look into this but it is loow on my list. Would this be a stupid approach ?
#10
06/13/2004 (5:35 am)
@Ben & Robert: Looks quite cool! What fps drop did you notice? Will this be integrated into TSE, and how will it be released?

@Jorgen: AUTOMATICALLY, not magicely :P
#11
06/13/2004 (6:16 am)
Do you know if you will release this for TGE as well, don't forget about us guys :(
#12
06/13/2004 (6:27 am)
@stefan: i think the autoMAGICally was an intentially jest. Joke. Yuk yuk.
#13
06/13/2004 (6:29 am)
@Stefan & Paul: well, to get any of my ideas to work you'd probably need some magic :)
#14
06/13/2004 (8:46 am)
Sweet. Everyday I log in there is something else kickass being worked on.
#15
06/13/2004 (8:48 am)
So Ben, Robert and Wes

Could you explain how your code differs from fxShapeReplicator? I know its different, just wondered what kind of automated stuff you got in there that is different than the simple shape replicator.

Also are there any requirements on the models themselves to work with your code?
#16
06/13/2004 (9:10 am)
Brief response before I head out for today:

This is on TGE. TSE doesn't run on my laptop.

This does optimized culling and rendering, unlike fxShapeReplicator, which just stuffs a lot of StaticShapes into the scenegraph. It's a lot more like fxFoliage, except for arbitrary models.

The models have 2 geometry detail levels and a billboard level. This can be changed but so far it looks good so we haven't bothered.

I should point out that Robert's screenshots ran at about 4fps. ;) The ones in my .plan do run in realtime: 40-50fps. It's all a question of rendering 12000 trees or not.

Hope that answers your questions!
#17
06/13/2004 (10:39 am)
Woo, way to go Ben! In fact, you beat me to it! I was working on a very similiar thing, but put it aside when I was having some issues with LOD selection code.

I had the exact same thought; A modified fxShapeReplicator to work something like fxFoilage, with a culling region and batched rendering of DTS objects. (With a user-selectable override for LOD selection, so they could have more sparse or lush forests at whim.)

A sort of budget version of something like SpeedTreeRT, in effect.

Glad to see I'm not the only one wanting something like this! Great job!
#18
06/13/2004 (11:01 am)
This is completely awesome :) I've been wondering about a solution like this for a while, since I've been having to do multiple fxShapeReplicators(and the optimisations would be very welcome too). You guys rock!
#19
06/13/2004 (11:30 am)
Whoa
#20
06/13/2004 (12:29 pm)
Nice work guy's, we can not do without a good looking forrest. If you need a better tree model to work with mail me (pascal@nedcore.com) i might have something you can use.

Keep it up it looks great
Page «Previous 1 2