Light management on Octree
Posted: Fri Feb 18, 2022 3:57 pm
Hey. Me again.
So, now I need some tips on how to properly optimize my map geometry.
Currently I have it divided into chunks. Each chunk is about 64 by 64 units in size (just for testing) and contains one block. Now I could combine it all into one single mesh and use an octree buuuuuuut...
The main problem is I also want to manage lights per chunk (and since I need to have a lot of lights and NOT use deferred shading it's all the good ol' forward renderer) to have seemengly unlimited light sources per map (not really, but you get the idea).
I've been trying to come up with a culling algorithm for chunks (by the way, found a good blog posts on that: http://tomcc.github.io/2014/08/31/visibility-1.html). But I'm afraid the overhead here is using nodes for chunks. Since each node is a meshnode and has its own buffer, it will constantly change materials, which I previously avoided by combining everything into one single mesh (by the way, can someone explain why exactly I have higher framerate using pure Opengl while doing the same thing? I used drawElement and only changed textures on geometry. And had higher framerate than using nodes in Irrlicht).
Is there a way to manage lights per Octree node (which is generated by irrlicht when loading mesh)? Or maybe you have other good ideas on how to manage lights AND optimize rendering? Or will it also change materials when drawing all nodes?
So, now I need some tips on how to properly optimize my map geometry.
Currently I have it divided into chunks. Each chunk is about 64 by 64 units in size (just for testing) and contains one block. Now I could combine it all into one single mesh and use an octree buuuuuuut...
The main problem is I also want to manage lights per chunk (and since I need to have a lot of lights and NOT use deferred shading it's all the good ol' forward renderer) to have seemengly unlimited light sources per map (not really, but you get the idea).
I've been trying to come up with a culling algorithm for chunks (by the way, found a good blog posts on that: http://tomcc.github.io/2014/08/31/visibility-1.html). But I'm afraid the overhead here is using nodes for chunks. Since each node is a meshnode and has its own buffer, it will constantly change materials, which I previously avoided by combining everything into one single mesh (by the way, can someone explain why exactly I have higher framerate using pure Opengl while doing the same thing? I used drawElement and only changed textures on geometry. And had higher framerate than using nodes in Irrlicht).
Is there a way to manage lights per Octree node (which is generated by irrlicht when loading mesh)? Or maybe you have other good ideas on how to manage lights AND optimize rendering? Or will it also change materials when drawing all nodes?