Geri said:
They go hand in hand and i have noticed they are usually used and recommended together, sometimes people refer them under the same umbrella terminology.
But it's completely different concepts.
LOD aims to have constant geometry to screen resolution ratio independent of distance. (decreases detail)
Instancing is about the idea to model complex scenes with many copies of the same object. (increases detail)
They neither build upon similar technology, and even their goals differ.
Ofc. you can combine both, e.g. rendering a forest with instances of a tree model having multiple LODs. But they still remain different concepts.
Geri said:
I tested it in ~2006-2007 when i had an athlonxp with radeon 9800 and i already used vbo. Some walls were able to cover out specific models (such as high poly characters) - the algo was very simple. The test was about having a few rooms with a high poly statue in it (100k or so, which back then was HUGE), and filtering out the model if you were in a room where it was not visible (not doing the draw call for the modell). The difference was 30 vs 35 fps or so. I was not amused, and scrapped the idea.
If you cull objects which are in the frustum but occluded by a wall, then we talk about ‘occlusion culling’ (or ‘hidden surface removal’), which opposed to frustum culling is a hard problem and still open.
I worked on this too, at about the same time. I've used a custom quake 3 level, a house with detailed interiors. And i wanted to render a city scene, duplicating the house 16 times. From the street, you could look through windows and see coffee cups on the kitchen table. Back then the frame rate was 20 fps if frustum culling was the only culling method.
My algorithm required to model a low poly version of the house, containing the walls, but still making holes for windows and doors.
Then i made an octree to divide the big model into smaller chunks (i did not use Quake BSP because i wanted support for dynamic scenes). And i put the low poly occluders into the same tree.
Then i process the octree in coarse front to back order.
If there is a occluder polygon, i rasterize it on CPU. But i do not process individual pixels, instead just horizontal spans with a start and end point. Intersections with former spans are needed to guarantee correct depth order, but otherwise it's fast. Only the vertical screen resolution matters for performance.
For any octree node, i test its bounding box against the current depth buffer. This again processes only spans, no pixels. If it's occluded the whole branch of the tree can be skipped, otherwise any chunk of geometry in the node is drawn.
The cost was multiple milliseconds on a single CPU thread, but it saved the GPU so much work i got 60 fps in the end.
The cool thing about the algorithm is that culling reduces work for both GPU and the culling algorithm on CPU itself. I also get frustum culling for free.
The bad thing it's not well suited for multi threading or parallel implementation on GPU. Automated generation of low poly occluders also would be difficult.
Modern games mostly do it with reprojection of the previous frames depth buffer, making a max depth pyramid, and having the whole culling pipeline on GPU. But that's not accurate. UE4 often shows white flashes on failure cases.
People rarely talk about it nowadays, but visibility is still the key problem in computer graphics. Fancy ray tracing for example is just a visibility test. Visibility is the most expensive part in the rendering equation, etc.
Maybe not amusing, but definitively worth to work on it if we want nice things on affordable hardware ; )