Natural Selection 2 is the sequel to the popular Half-Life mod Natural Selection. It is built on our own engine and will be distributed through Valve's Steam platform.

Report article RSS Feed Occlusion Culling

On of the important tasks in a first person engine is occlusion culling. Occlusion culling is the process of discarding elements of the world that aren't going to contribute to the final rendered scene so that you don't spend CPU and GPU time processing them. With expensive elements like dynamic lighting and shadows, this becomes especially important.

Posted by TychoCelchuuu on Mar 5th, 2009

Here's a Natural Selection 1 level rendered in our engine:


Even with the textures missing, some of you will probably recognize this spot. While this may look like a simple hallway, to the rendering engine it looks a lot more complicated. Here's the same scene rendered in wireframe mode:


As you can see, there's lots of stuff behind those walls that's being rendered, but which we don't actually see. In many first person engines this problem is solved by precomputing information throughout the level about what's visible; this is known as a potentially visible set (PVS).

If you've ever done any mapping for the Quake or Half-Life engines, you're probably familiar with the "vis" tool which performs this precomputation. This can be a slow process that requires a lot of tweaking and careful modeling. Because the data is precomputed, the environment can't change much at run-time. And finally the PVS method is not very good when it comes to outdoor scenes. To alleviate all of these problems, we've chosen to use a hardware assisted occlusion culling method that doesn't require precomputation.

Here's what the scene looks like with the occlusion culling system enabled:


As expected, most of the invisible geometry has been discarded during the rendering process. Because of way the algorithm utilizes the graphics card, the structure of the level doesn't really affect the system. It works with outdoor environments as well as indoor environments and can handle polygons "soups" -- collections of polygons that don't really have any structure at all.

While real-time occlusion culling has some additional performance cost over precomputed systems like PVS, we think the benefits more than make up for it. And with clever optimizations, that cost can be reduced substantially.

For those that are technical minded and would like to learn more occlusion culling, our system is an implementation of the CHC++ algorithm (paper available online here).
Comment on this

Post comment Comments
Spector
Spector Mar 5 2009, 9:22pm says:

Good stuff. Always good to know that good optimizations are being implemented. Maybe my computer will run this at a decent frame rate. =O

+14 votes     reply to comment
SandeR2
SandeR2 Mar 6 2009, 2:14am replied:

indeed!
oops omg sorry Spector i accidently [-] your post instead of [+] please forgive me....

+3 votes     reply to comment
RogerRamjet
RogerRamjet Mar 5 2009, 10:23pm says:

Nice, it is always a good thing to know info like this... go NS2...

+4 votes     reply to comment
SweetPoison42
SweetPoison42 Mar 6 2009, 12:05am says:

Very Nice! I always say great occlusion culling makes a great levels. Great to see you guys go as far as making your own tools. Looking froward to NS2.

+4 votes     reply to comment
Setis
Setis Mar 6 2009, 5:12am says:

looking great, as was expected from you guys! :D What you guys have done with the occlusion culling sounds fantastic already. Really can't wait to see this in action. You should release a video of running through the level in wireframe! :)

Looking forward to more news!

+1 vote     reply to comment
SinKing
SinKing Mar 6 2009, 5:41am says:

Haven't you been making Natural Selection 2 forever? Why do we get this very basic info, isn't there anything more interesting to see, yet?

I really wonder what's gonna come out of NS2, as the first part was a great game, but time doesn't go easy on old concepts. Better hurry up a little, or you will be dead on release.

-1 votes     reply to comment
Dragonlord
Dragonlord Mar 6 2009, 6:42am says:

Using the Occlusion Test Extension ( don't know how this is called in DirectX ) it looks like. The performance hits comes from the feedback nature of this system ( reading back infos from the graphic card stalls the render pipeline ). I'm a bit astonished this should yield alone a speed up since many tests showed so far that relying on HW-Occlusion testing alone won't gain anything. Some profiling numbers you can produce? Just curious to know since my numbers support the stance towards HW-Occlusion being slower.

+1 vote     reply to comment
f0rqu3
f0rqu3 Mar 6 2009, 7:03am says:

great after months you came with occlusion culling???
isn't news supposed to be about the game?

-3 votes     reply to comment
Harimau
Harimau Mar 6 2009, 11:57pm replied:

hey genius. it's about the game engine. you need a game engine to make a game.
...have you made the connection yet?

+2 votes     reply to comment
f0rqu3
f0rqu3 Mar 7 2009, 3:07pm replied:

umm lol of course you need an engine but adding occlusion culling to your engine and thinking it is a ground breaking feature is priceless. nowadays it is like "hey look I added 3d rendering"
anyway sorry for not being a natural selection fan.

0 votes     reply to comment
hushpuppy
hushpuppy Mar 6 2009, 2:09pm says:

Yeh it sure is good with optimizaton, but this isnt really anything revolutionary? :S I mean, most mappers know this stuff xD

+2 votes     reply to comment
f0rqu3
f0rqu3 Mar 6 2009, 2:12pm replied:

probably they have nothing else good to show
sadly...

0 votes     reply to comment
Relto
Relto Mar 7 2009, 12:31pm replied:

Mappers know its there. They don't know how it works.

+1 vote     reply to comment
Harimau
Harimau Mar 7 2009, 12:15am says:

ah right, and just so you know, progress IS getting done, they're just being very careful about releasing media, particularly when it comes to art direction or game design decisions. updates on the technical side just happen to be the 'safest'.

how you know there is progress: follow their twitter for most recent updates - Twitter.com - the team updates it very often.
and there's a discussion thread for the twitter updates here Unknownworlds.com so register if you wanna chime in.

+1 vote     reply to comment
_Xero_
_Xero_ Mar 17 2009, 10:57pm replied:

I think Harimau summed it up best. I know that to many people, occlusion culling isn't the most exciting news. However, the team is being very tight on their juciest info. This is on purpose, not for a lack of interesting news. StarCraft 2 is about to go beta, and there are things people didn't know for a while, and other things are still changing every day. Does that mean SC2 was boring and/or early in development? No, it simply means that the developers wished to keep a tight lid on what is sure to be a killer game. This goes for NS2 as well.

+1 vote     reply to comment
TyeTheCzar
TyeTheCzar Mar 9 2009, 1:36pm says:

Just like everyone here, thanks. I love to see really good explanations such as yours on how the game is made. I'd love to see this kind of thing from most developers.

+1 vote     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
Natural Selection 2
Platforms
Windows, Linux
Developer
Unknown Worlds
Engine
Spark
Contact
Send Message
Official Page
Naturalselection2.com
Release Date
Released Oct 28, 2012
Game Watch
Track this game
News
Browse
News
Report Abuse
Report article
Related Games
Natural Selection 2
Natural Selection 2 Multiplayer Real Time Shooter
Related Engines
Custom Built
Custom Built Commercial Released Sep 1, 2007
Related Groups
Unknown Worlds
Unknown Worlds Developer & Publisher with 5 members