Original Post
Hi, I need an advice.
I have a quad tree terrain. When I place meshes on that terrain, I assign them to the terrain quad tree they fall in and when I render the terrain I set the terrain nodes meshes as "visible" if the terrain node is visible itself. There is only one mesh of a single type and if it needs to be repeated, pointers to it are stored and a transformation matrix as well.
That's OK, but when rendering lots of small meshes like rocks, flowers, grass blades leads to many "draw calls" which brings my engine to it's knees. I'm thinking of combining all the terrain node meshes into a single vertex buffer transformed into world space and render them in a single draw call, but that would eat up more memory for the vertex data to be stored, compared to the "one mesh per kind" and rendering it in multiple places. Should I use instancing in such a situation ? Is there a additional overhead of the instancing itself ?
Which route to go ?
-save memory, transform and render a single mesh in several places using several draw calls
-make one big vertex buffer that eats up more memory and render them in one draw call.
-use a single mesh and use instancing.
I experimented a bit with it even and found a bit slow compared to the "transform and render" approach. My meshes are about 100-200 triangles, 100 or more per terrain chunk.
Thank you in advance.
I have a quad tree terrain. When I place meshes on that terrain, I assign them to the terrain quad tree they fall in and when I render the terrain I set the terrain nodes meshes as "visible" if the terrain node is visible itself. There is only one mesh of a single type and if it needs to be repeated, pointers to it are stored and a transformation matrix as well.
That's OK, but when rendering lots of small meshes like rocks, flowers, grass blades leads to many "draw calls" which brings my engine to it's knees. I'm thinking of combining all the terrain node meshes into a single vertex buffer transformed into world space and render them in a single draw call, but that would eat up more memory for the vertex data to be stored, compared to the "one mesh per kind" and rendering it in multiple places. Should I use instancing in such a situation ? Is there a additional overhead of the instancing itself ?
Which route to go ?
-save memory, transform and render a single mesh in several places using several draw calls
-make one big vertex buffer that eats up more memory and render them in one draw call.
-use a single mesh and use instancing.
I experimented a bit with it even and found a bit slow compared to the "transform and render" approach. My meshes are about 100-200 triangles, 100 or more per terrain chunk.
Thank you in advance.