This project is read-only.


Mar 10, 2010 at 4:02 AM

I seem to have performance issues when I have 10+ trees.  Is this something other people are seeing or is it something in my implementation?



Mar 10, 2010 at 8:39 AM

Hello Jeremy,

starglider has a LOT of trees in his Flight Sim demo (youtube links are in one of the other threads here), though he did hack the rendering a good deal. I should think 10 trees could be rendered without defeating a semi-modern video card, but after that you will definitely need billboards and culling techniques to make it work out.

Mar 10, 2010 at 1:21 PM

Thanks for the reply.  I've read through the thread explaining how he did most of the code.  I'm going to work on implementing some of his ideas and see where I end up.  This library is fantastic!



Apr 17, 2010 at 1:44 AM
Edited Apr 17, 2010 at 1:50 AM

I was able to get about fifty visible Ltrees rendering at 30 FPS on the Xbox and a couple of hundred on a decent PC, with the tree rendering code taking about 60% of the GPU time. There are over ten thousand trees per level, but all of them outside of the player's immediate vicinity are drawn as billboards. The double pass leaf rendering is a killer but the trees don't look good without it. To make it go that fast I had to implement a whole series of fairly aggressive optimisations; in fact I rewrote it so much that the only mostly-original Ltree code I have left is the content pipeline classes. Still, it was an invaluable starting point. :)

Apr 17, 2010 at 8:07 PM

I also discovered that it is the leaves causing many of my problems with slowness.  I implemented some basic things to prevent the leaves from drawing if the tree is a certain distance away ect.  That seems to have worked fairly well, but there are some issues with it esp when the objects are moving through the scene quickly.  Is your code available to look at for tree optimization?