Development Blog Update - Occlusion Culling

MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
Please post comments on the topic Development Blog Update - Occlusion Culling here
«13

Comments

  • DrownDrown Underwater Join Date: 2002-12-02 Member: 10392Members
    this makes me glad I chose a path in the liberal arts...
  • rsdrsd Join Date: 2003-02-11 Member: 13405Members
    Cool stuff, I enjoy the technical posts at least as much as ones related to gameplay/features.

    Thanks
  • PrefixPrefix Éirinn go Brách Join Date: 2006-12-31 Member: 59353Members, Constellation
    It's pretty cool to hear what methods you are using in the game engine, more like this tbh.
  • RideRide Join Date: 2003-11-11 Member: 22511Members
    Oh wow you linked to TU Wien =)
  • SlinkSlink Join Date: 2003-07-01 Member: 17829Members
    Nice, I like the choice for flexibility. I think that will grant more long-term usage.


    By the way, are you guys going to deal with the missing end of the latest podcast? I'd love to hear how the twitter feed has impacted your development process, unless of course it's proprietary information. I don't mind if it was just written up and edited into the news post or whatever.
  • GaidinTSGaidinTS Join Date: 2003-08-10 Member: 19319Members, Constellation, Reinforced - Shadow
    edited March 2009
    When you mentioned on the twitter feed that you were working on a generic octree implementation, and I've heard (perhaps incorrectly) that octrees can be used in occlusion culling. Where all are you making use of octrees?


    *edit*
    And one more thing, you vaguely mention other tricks you are using to speed up occlusion culling, are you willing to divulge them,<strike> like for instance, are you doing a quick view frustrum culling before you use this CHC++ algorithm</strike>?

    Ignore that last part, according to the pdf, this algorithm is even faster than View frustrum, which is impressive. I'm really excited to see this engine in action.
  • Evil_bOb1Evil_bOb1 Join Date: 2002-07-13 Member: 938Members, Squad Five Blue
    Nice to know mappers won't have to calculate vis anymore but this brings a little technical/design question.

    What happens when the player gets to the end of the corridor and turns the corner? Does occlusion-culling anticipate this and gradually shows whats going to come up next (so there's no burst of polygons to render), or are we (as mappers) still encouraged to use visibility hacks (like several bends, u-turns and so on) to ease the work of occlusion-culling?

    All in all does it affect the way maps are designed?

    Nice to see the engine evolving. I foresee great mapping moments.*....mmmmm.....nstr2....*
  • douchebagatrondouchebagatron Custom member title Join Date: 2003-12-20 Member: 24581Members, Constellation, Reinforced - Shadow
    <!--quoteo(post=1702038:date=Mar 5 2009, 04:33 PM:name=Evil_bOb1)--><div class='quotetop'>QUOTE(Evil_bOb1 @ Mar 5 2009, 04:33 PM) <a href="index.php?act=findpost&pid=1702038"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->What happens when the player gets to the end of the corridor and turns the corner? Does occlusion-culling anticipate this and gradually shows whats going to come up next (so there's no burst of polygons to render), or are we (as mappers) still encouraged to use visibility hacks (like several bends, u-turns and so on) to ease the work of occlusion-culling?<!--QuoteEnd--></div><!--QuoteEEnd-->

    it seems like yes mappers will have to use 'hacks' like bends and whatnot, but that's just good mapping, to prevent too much from being rendered. what this means team me is that mappers no longer need to worry about little hacks like making sure a floor brush is broken up in the right places to prevent a tri from extending too far.

    i believe in hl2 maps the VIS mentioned was calculated from a triangle, so if i'm standing in a specific triangle then everything visible from any part that triangle should be rendered. this caused a problem if someone was standing on a large triangle that saw where the player couldn't, unnecessary areas of the map would be drawn by the engine.



    one thing i notice about this, is that calculating this on the fly would be much more calculation intensive than precalculating it, and if it is going to be taking up a bunch of processing power i'm sure the team has a good reason to do it this way as opposed to precalculating it since they already expressed their desires to have this playable on a wide array of machines.

    now they've mentioned having changeable environments, but there hasn't been any detail on what that means. with a feature like this, it could mean as much as completely destructible terrain, similar to red faction. it opens up a lot of possibilities, and i'm excited to see where they take it.
  • FlayraFlayra Game Director, Unknown Worlds Entertainment San Francisco Join Date: 2002-01-22 Member: 3Super Administrators, NS2 Developer, Subnautica Developer
    One really cool side effect of doing occlusion culling this way is that it would work well for most any type of game or mod. Ie, it's not for first-person shooters - it would work well for other genres as well. So this should really benefit NS2 mod makers and help encourage them make totally different games.
  • ChromeAngelChromeAngel Join Date: 2002-01-24 Member: 14Members, NS1 Playtester, Contributor
    <!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->What happens when the player gets to the end of the corridor and turns the corner? Does occlusion-culling anticipate this and gradually shows whats going to come up next (so there's no burst of polygons to render)<!--QuoteEnd--></div><!--QuoteEEnd-->
    I'm guessing the occlusion culling is done each frame or every few frames at most. Am I right Max?

    <!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->or are we (as mappers) still encouraged to use visibility hacks (like several bends, u-turns and so on) to ease the work of occlusion-culling?
    All in all does it affect the way maps are designed?<!--QuoteEnd--></div><!--QuoteEEnd-->
    Well you'll still be wanting to use visibility blocks and doughnut hallways to prevent having lots of those dynamically lit polys in view. However this should mean movable things like, players, physics objects, infestation goo and doors will occlude what's behind them, unlike in HL, where such entities were not occluding. So you can just use a hallway with doors at each end to separate two hi-poly areas.

    <!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->we've chosen to use a hardware assisted occlusion culling method<!--QuoteEnd--></div><!--QuoteEEnd-->
    Interesting... That's a feature that is standard on all hardware of the previously mentioned minimum NS2 spec its it? It's not going to ties NS2 players to a particular chip set or brand is it?

    <!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->And finally the PVS method is not very good when it comes to outdoor scenes<!--QuoteEnd--></div><!--QuoteEEnd-->
    Still no plans for outdoor NS maps to take advantage of this though?

    Does it cope with transparent or partially transparent polys like glass OK?
  • KungFuSquirrelKungFuSquirrel Basher of Muttons Join Date: 2002-01-26 Member: 103Members, NS1 Playtester, Contributor
    All the existing visibility tricks are still good practice for both technical and gameplay reasons, but it'll also open up some options that weren't available before. It's definitely going to make life a lot easier. I'm even more excited about some of the other features that become possible thanks to this one, and I think you guys will be too. <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" />
  • AlignAlign Remain Calm Join Date: 2002-11-02 Member: 5216Forum Moderators, Constellation
    Well, as long as you're not making it different just to see if you can...
  • PlasmaPlasma Join Date: 2003-04-26 Member: 15855Members, Constellation, Squad Five Blue
    Interesting blog post Max, thanks!
  • AngeluszAngelusz Harmonic entropist Join Date: 2003-07-10 Member: 18072Members, Forum Moderators, Constellation, NS2 Playtester
    Strange, I always thought that PVS already occluded everything that is not in sight. The wireframe shows something else. What use would PVS (and the VIS tool) be if that didn't work at all before?

    Also, you say that the new occlusion system takes up resources, but that'd be <b>much</b> less than actually rendering all the occluded poly's, right?

    I'm probably being a total idiot not getting the point. <img src="style_emoticons/<#EMO_DIR#>/wink-fix.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink-fix.gif" /> Anyway, if this works properly it'd greatly increase the engine's performance, so keep it up!
  • Raza.Raza. Join Date: 2004-01-24 Member: 25663Members, Constellation
    <!--quoteo(post=1702049:date=Mar 5 2009, 11:08 PM:name=Angelusz)--><div class='quotetop'>QUOTE(Angelusz @ Mar 5 2009, 11:08 PM) <a href="index.php?act=findpost&pid=1702049"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Strange, I always thought that PVS already occluded everything that is not in sight. The wireframe shows something else. What use would PVS (and the VIS tool) be if that didn't work at all before?<!--QuoteEnd--></div><!--QuoteEEnd-->

    But it's precomputed, their implementation is dynamic (hope I got that right).
  • GaidinTSGaidinTS Join Date: 2003-08-10 Member: 19319Members, Constellation, Reinforced - Shadow
    edited March 2009
    <!--quoteo(post=1702054:date=Mar 5 2009, 05:55 PM:name=Razagal)--><div class='quotetop'>QUOTE(Razagal @ Mar 5 2009, 05:55 PM) <a href="index.php?act=findpost&pid=1702054"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->But it's precomputed, their implementation is dynamic (hope I got that right).<!--QuoteEnd--></div><!--QuoteEEnd-->


    That's exactly it. With GoldSrc (NS1) PVS is a precalcuated data set that basically says when the player is standing here, only render these triangles. What they are doing here is the same concept, just on the fly as the player moves through the level instead of calculated before hand.
  • Mr. EpicMr. Epic Join Date: 2003-08-01 Member: 18660Members, Constellation
    Max, did you try a different static implementation before choosing what you have now? Or did you kind of just get to it now?
  • Nima_Nima_ Join Date: 2007-08-30 Member: 62083Members
    Great read max, I really enjoy reading the technical posts. Keep it up if you have the time please <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" />
  • SqueeboSqueebo Join Date: 2008-02-04 Member: 63580Members
    This new engine of yours is one sexy piece of technology, I gotta say. Impressive stuff.
  • FraxinusFraxinus Join Date: 2008-03-02 Member: 63783Members, Constellation
    edited March 2009
    I was reading this on a mobile browser and zooming in and out while looking at the wire frame render was pretty trippy!anyways I'm glad you choose a route that would make outdoor maps more feasible. Very informative writeup.
  • PricePrice Join Date: 2003-09-27 Member: 21247Members
    Very good, so no area portals like in the source engine needed? *g*
    Good luck, i hope you can release it this year.
  • Thor_BishmarkThor_Bishmark Join Date: 2009-01-22 Member: 66151Members
    Sounds great! I do not understand much of all those line, but less line means a smoother running game, yay!
  • UncleCrunchUncleCrunch Mayonnaise land Join Date: 2005-02-16 Member: 41365Members, Reinforced - Onos
    I don't get why people say that making outdoor is impossible or difficult. this is just another room. It just has been decorated differently. Ok; a special texture for the sky. But nothing impossible (except for gameplay consideration)

    There are some question about the engine developpement:

    Is there a possibility to enable a ground grid ? For those who are moding: Some kind of Unreal of FarCry terraforming.
    Indoor map won't need it, so a systeme that enable / disable it would do the trick. And it won't require huge loads of code. Beside modder could explore more possibilities. Even in a indoor map like a remake of MineShaft that would require some smothly curved area.


    Is there a possibility to have occluder areas? (A simple paralepiped that forbid rendering polygon that are behind) Ok the selected system is dynamic but sometimes, help the system is really cool. Example : Farcry. I remember pushing up FPS by a factor 2 with some well located occuders. Despite the Cryengine was also dynamic, helping it was good for gameplay.


    I got designs (based on natural selection of course); how can i make sure they fit the engine needs and possibilities ?


    Thanks for reading.
  • EmanonEmanon Join Date: 2003-05-13 Member: 16254Members, Constellation
    gogo ns_eclipse, triad to SAA

    wheres my cookie
  • KuBaNKuBaN Join Date: 2002-11-16 Member: 8979Members, Constellation
    <!--quoteo(post=1702099:date=Mar 6 2009, 08:58 AM:name=UncleCrunch)--><div class='quotetop'>QUOTE(UncleCrunch @ Mar 6 2009, 08:58 AM) <a href="index.php?act=findpost&pid=1702099"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I don't get why people say that making outdoor is impossible or difficult.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Pretty sure they're referring to the difficulty of engines to render outdoor environments, specifically large, primarily uncovered expanses of land, as in such a situation there are very few walls or separations of the space, and therefor very few visleafs, which means the engine is rendering the entire area. No easy feat for engines specifically optimized for indoor scenes, or older engines in general.
  • steppin'razorsteppin'razor Join Date: 2008-09-18 Member: 65033Members, Constellation
    love the tech reads, please keep them up max
  • locallyunscenelocallyunscene Feeder of Trolls Join Date: 2002-12-25 Member: 11528Members, Constellation
    <!--quoteo(post=1702099:date=Mar 6 2009, 08:58 AM:name=UncleCrunch)--><div class='quotetop'>QUOTE(UncleCrunch @ Mar 6 2009, 08:58 AM) <a href="index.php?act=findpost&pid=1702099"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I don't get why people say that making outdoor is impossible or difficult. this is just another room. It just has been decorated differently. Ok; a special texture for the sky. But nothing impossible (except for gameplay consideration)

    There are some question about the engine developpement:

    Is there a possibility to enable a ground grid ? For those who are moding: Some kind of Unreal of FarCry terraforming.
    Indoor map won't need it, so a systeme that enable / disable it would do the trick. And it won't require huge loads of code. Beside modder could explore more possibilities. Even in a indoor map like a remake of MineShaft that would require some smothly curved area.
    Is there a possibility to have occluder areas? (A simple paralepiped that forbid rendering polygon that are behind) Ok the selected system is dynamic but sometimes, help the system is really cool. Example : Farcry. I remember pushing up FPS by a factor 2 with some well located occuders. Despite the Cryengine was also dynamic, helping it was good for gameplay.
    I got designs (based on natural selection of course); how can i make sure they fit the engine needs and possibilities ?
    Thanks for reading.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Technology-wise outdoor and indoor maps are very different. With indoor maps you see occlusion culling where large sections of the map are simply not rendered for individual players. For outdoor maps you either have to limit field of view artificially(old school thick fog) and/or render things with much less detail at a distance(the current preferred option). It's not that you can't do both outdoor and indoor maps, and Max mentions that this occlusion tech will work well with outdoor maps, it's that coding to render outdoor maps efficiently is non-trivial. This is especially true when you have interesting features like dynamic lighting and procedural textures/objects(the DI). NS2 is going to be a primarily indoor game. This isn't to say that it won't allow their engine to do outdoor levels, because it seems like they want the engine their building to do both well, but that's just what NS2's play style is and the engine will likely be optimised for. Unfortunately it's not as easy as slapping a sky texture on a big room.
  • kingmobkingmob Join Date: 2002-11-01 Member: 3650Members, Constellation
    Great update.

    I hope this dynamic occlusion means faster map compiling.
    although light was always the ######.

    -kingmob
  • ChromeAngelChromeAngel Join Date: 2002-01-24 Member: 14Members, NS1 Playtester, Contributor
    <!--quoteo(post=1702124:date=Mar 6 2009, 04:27 PM:name=kingmob)--><div class='quotetop'>QUOTE(kingmob @ Mar 6 2009, 04:27 PM) <a href="index.php?act=findpost&pid=1702124"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Great update.

    I hope this dynamic occlusion means faster map compiling.
    although light was always the ######.

    -kingmob<!--QuoteEnd--></div><!--QuoteEEnd-->
    You know of course that the maxx0r engine has real time lighting, so will be no RAD compile time either.
  • RokiyoRokiyo A.K.A. .::FeX::. Revenge Join Date: 2002-10-10 Member: 1471Members, Constellation
    Loved the update, thanks. Please keep up the tech-blogs!
Sign In or Register to comment.