I recently tried the infinite terrain sample from the A7.80 update. The vegetation seems very unoptimized because each grass is a single mesh. The debug panel says there are 2000 entities visible at once crazy . Like mentioned before, use a single mesh for many small objects. This reduces the list the cpu has to send to the rendering chain and takes load off of the cpu.

To make many objects out of one mesh I have an idea that should work. In your modeling application you group all the objects into a single mesh and save it as one mdl file. For example, you could have hundreds of trees in a single mdl file. Arrange the trees in a grid pattern. Keep each tree farther away from the other trees than the maximum length of one tree. You then make a rough measurement of that distance. In the code do a distance check on all the verts to all the verts. Depending on how many verts there are this could take a few seconds since it is a distance check on number of vertices in the mesh squared shocked . Now all the distances that are under the maximum length of a tree are associated with a single tree (via indexed array 1,2,3,4...). Keep which tree the vertices are attached to in a file (each vertice has a unique number that stays the same), then you just have to read from the file upon the game loading. The trees can be individually positioned by creating an array of positions for each tree and checking the array with the index in the text file. If you wanted to put the trees on a terrain you would just use c_trace for each tree and update the array.

Now when the game loads, it modifies the position of all the vertices using ent_set_vertex, and if a tree where rotated you could call ent_fixnormals(). The initial setup of the trees is cpu hungry, but once done has no load on the cpu. Only one call to the rendering chain has to be made for one hundred trees. It is even possible to move individual trees where you want to while the game is running. Waving in the wind can be done by a vertex shader without any modification. This approach may be similar to what speedTree uses, I'm not sure though.

Hopefully you understood some of what I was trying to explain. tongue