1 bazillion trees

i want to add lots and lots of trees to my terrain (currently a terrainblock). the question is how to do it?

also, i noticed a terrainblock is rendered as a whole - no quadtree, no culling at all as long as one triangle is visible. what do i have to do to fix this?

  1. It requires a lot of work to render many trees with a high framerate.  My tree implementation using static geometric instancing is mentioned in this thread:

    http://www.jmonkeyengine.com/jmeforum/index.php?topic=4623.0


  2. If im not misstaking one terrainblock should be rendered as a whole, it’s not possible (efficient) to cull away parts of a batch, it’s faster to let the graphics card do that. The terrainblock should be in an efficient size (haven’t checked)… If it is to few triangles per block the draw call will become a bottlneck.



    NVidia explains batches and how many triangles should be in them:

    http://developer.nvidia.com/docs/IO/8230/BatchBatchBatch.pdf
terrainblock is rendered as a whole - no quadtree, no culling at all as long as one triangle is visible. what do i have to do to fix this?

Use TerrainPage.

It requires a lot of work to render many trees with a high framerate.  My tree implementation using static geometric instancing is mentioned in this thread:

Use lockMeshes to create displaylists, make sure your trees have a bounding volume so that they are culled when not visible, use the imposter nodes or switch nodes to replace with low-res trees, and optimize the tree model's geometry to have less triangles. If things still aren't going, you might want to just render your trees as a billboarded quad.

i'll look into it

i started with a simple octree and put lots of stuff into it. the performance boost is more than just noticable, but i'm puzzled about a few things:

is there a difference between locking a node containing children and locking all its children one by one and then adding them to it?

how do locked imposternodes work? does it even make sense here?

when using reeaaaaally lots of graphical spices like here:

http://img116.imageshack.us/my.php?image=screenshot6on4.jpg

i'l like to share my animated models instead of creating new ones for every enemy/flying axe/anything else with keyframe animations. is it possible, or do i have to pool the nodes?

(ignore the triangle count, my projectile has 2k triangles, i didn't bother to find a better one yet)



and finally:

i'd like my little thingies to vanish when they are beyond a specific range. is that possible?