Live data from Hacker News

Modern Rendering Culling Techniques

krupitskas.com

11–20 of 44 posts

Re: Modern Rendering Culling Techniques

#11
post #6

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

The old philosophical question remains, "If a tree falls in a forest and no one is around to hear it, does it make a sound?" [1]

[1] https://en.wikipedia.org/wiki/If_a_tree_falls_in_a_forest_an...

Re: Modern Rendering Culling Techniques

#12
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.

Re: Modern Rendering Culling Techniques

#14
post #12

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 inter…

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.

Re: Modern Rendering Culling Techniques

#16
post #7

Love this, I will now use backface culling for my game: https://slitherworld.com

Backface culling has been common since the late 1990s when we started using face normals to determine lighting rather than per-vertex lighting. Pretty much every 3D game engine since about 2004 has included and enabled it by default. How is it that you made a game that doesn't use it?

For the curious readers, backface culling (at least in the way fixed-function OpenGL does it, and probably newer APIs still do) is not based on face normals, it's based on winding order of triangles, so it works even if normals are not used.

Also face normals (flat shading) are generally considered older tech than per-vertex lighting (Gouraud shading). Newer stuff since 2008-ish is generally per-pixel using normal maps for detail.

Re: Modern Rendering Culling Techniques

#17
post #11
post #6

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

The old philosophical question remains, "If a tree falls in a forest and no one is around to hear it, does it make a sound?" [1] [1] https://en.wikipedia.org/wiki/If_a_tree_falls_in_a_forest_an...

Yes, the other trees hear it. Easy :)

Re: Modern Rendering Culling Techniques

#18
post #12

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 inter…

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.

Re: Modern Rendering Culling Techniques

#19
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.

Re: Modern Rendering Culling Techniques

#20
post #7

Earlier quoted context omitted.

Backface culling has been common since the late 1990s when we started using face normals to determine lighting rather than per-vertex lighting. Pretty much every 3D game engine since about 2004 has included and enabled it by default. How is it that you made a game that doesn't use it?

For the curious readers, backface culling (at least in the way fixed-function OpenGL does it, and probably newer APIs still do) is not based on face normals, it's based on winding order of triangles, so it works even if normals are not used. Also face normals (flat shading) are generally considered older tech than per-vertex lighting (Gouraud shading). Newer stuff since 2008-ish is generally per-pixel using normal ma…

Thanks for clarifying, so I guess I already have it on then.
Post reply on HN