sio2 wrote:I've been playing around with this. I tried a 32x32 grid of trees (yes, that's 1024) and here's my findings:
1. Lowest fps is about 40.
2. I get about 100fps with them all on screen (LOD in action!). Viewpoint is just above tree (0,0) looking over the forest at toward tree (31,31).
Thanks for posting this. I'd be interested in hearing your system specs too. What fps do you get in the demo program I made? I'm getting around 400 fps in my demo app, with my GeForce Go 7300.
3. Trees don't seem to be frustum culled. I can look at a 1000 trees and then point the camera towards "nothing" and the frame rate doesn't budge.
Irrlicht's frustum culling tends to be a bit inaccurate. Try printing out the number of triangles drawn too (using driver->getPrimitiveDrawnCount), to see if it gets culled or not.
4. Popping is obvious at LOD transitions.
Yeah, especially with lighting enabled. Most games fade the meshes between each LOD, but this is very cumbersome in Irrlicht at the moment.
5. 1024 trees take a second or two to set up.
Thanks for the benchmark. In a practical application, I'd recommend re-using existing tree meshes, so you only have about 20-60 unique tree models. Saves memory and generation time.
BTW I also tried a 256x256 grid of trees but after about 30 seconds it crashed. Haven't investigated this yet.
Were all the trees unique? Have you tried loading 65536 meshes into memory? An oak uses around 2500 vertices (not including leaves). Each vertex uses 36 bytes. So roughly estimated, you would need 5625 MB of RAM to store the vertices alone.