logoalt Hacker News

Animatsyesterday at 11:47 PM2 repliesview on HN

Occlusion culling is really tough in systems where users can add content to the world. Especially if there's translucency. As with windows (not Windows), or layered clothing.

You're in a room without windows. Everything outside the room is culled. Frame rate is very high. Then you open the door and go outside into a large city. Some buildings have big windows showing the interior, so you can't cull the building interior. You're on a long street and can look off into the distance. Now keep the frame rate from dropping while not losing distant objects.

Games with fixed objects can design the world to avoid these situations. Few games have many windows you can look into. Long sightlines are often avoided in level design. If you don't have those options, you have to accept that distant objects will be displayed, and level of detail handling becomes more important than occlusion. Impostors. Lots of impostors.

Occlusion culling itself has a compute cost. I've seen the cost of culling big scenes exceed the cost of drawing the culled content.

This is one of those hard problems metaverses have, and which, despite the amount of money thrown at the problem, were not solved during the metaverse boom. Meta does not seem to have contributed much to graphics technology.

This is much of why Second Life is slow.


Replies

corysamatoday at 1:57 AM

Dynamic occlusion culling is pretty common these days now that the GPU can do its own filtering of the draw list. I think it goes like:

Start with a list of objects that were visible last frame. Assume they are visible this frame. Go ahead and draw them.

Then, for the list of things that were Not visible last frame, draw bounding box queries to build a conservative list of objects that might actually not be occluded this frame. This is expected to be a short list.

Take that short list and draw the probably-newly-visible objects.

Have queries attached to all of those draws so you end up with a conservative list of all of the actually-visible objects from this frame.

This obviously has problems with camera cuts. But, it works pretty well in general with no preprocessing. Just the assumption that the scene contents aren’t dramatically changing every frame at 60 FPS.

danielvaughntoday at 12:51 AM

I was thinking about this problem a few days ago, imagining a semi-online game where players could create a collective city by plotting buildings. The "grid" would be some kind of pre-determined voronoi pattern, in theory making occlusion culling easier.