logoalt Hacker News

Modern Rendering Culling Techniques

163 pointsby krupitskaslast Sunday at 7:54 AM38 commentsview on HN

Comments

Animatsyesterday at 11:47 PM

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.

show 3 replies
yardsyesterday at 9:13 PM

I always wonder about this IRL...I'm at work rn, is my apartment still rendered?

show 3 replies
snailmailmantoday at 5:13 AM

I've always wondered to what extent these culling techniques still work with raytracing? A reflective surface can bring a bunch of otherwise-offscreen things into the scene. Its what makes screen-space reflections look so bad sometimes, they can't reflect whats not on-screen.

show 1 reply
greggman65today at 12:51 AM

> Quake made PVS famous. It’s still useful in some indoor games where the scene geometry is static and bake time is acceptable.

It was used extensively in outdoor games like Jak and Daxter.

enobrevtoday at 5:03 AM

I really appreciate this post. It reminds me of a video I watched a couple years ago that does an excellent job of demonstrating how culling works with actual code and visuals

https://www.youtube.com/watch?v=CHYxjpYep_M

LarsDu88yesterday at 7:37 PM

PVS isn't that expensive to compute. Especially nowadays. I assume this is actually referring to the binary space partitioning techniques used in DOOM and improved in Quake, Half-Life, etc in the late 90s, early 2000s.

The BSP tree was also extremely useful for optimizing netcode for games like Quake 3 Arena and games within that family and time period I believe.

show 2 replies
nickandbroyesterday at 8:22 PM

Love this, I will now use backface culling for my game:

https://slitherworld.com

show 1 reply
Panzerschrektoday at 5:20 AM

Is portal culling still used today? I thought it's an old technic used only by some very old games like Thief.

root_axistoday at 6:14 AM

Great post. Looking forward to the followup article about lights and shadows :)

igraubezruklast Sunday at 9:17 AM

Very good read and visualizations, thank you for writing it

mempkotoday at 2:22 AM

Back in the 90s I made a 3d engine (software renderer) and used frustum culling. But computing the frustum intersection every time was too slow. So one technique I did was add a count to each polygon. If the polygon was outside the view frustum, i added a count of N frames. Each frame if the count for a polygon was 0 it would check against the frustum, otherwise it would reduce the count and skip the polygon rendering entirely.

This worked very well but of course if the camera turned quickly, you would see pop-in. Not a modern technique, but an oldschool one.

yopstodaylast Sunday at 1:19 PM

Dooope!