Occlusion Geometry

SgtBarlowSgtBarlow Level Designer Join Date: 2003-11-13 Member: 22749Members, NS2 Developer
<div class="IPBDescription">How to go about it.</div>The new method will be comming soon but you can get started now. Creating the geometry in the group will hide it for now so dont worry about your level gettings messy before the new method goes in.

<img src="http://www.unitedworlds.co.uk/ns2/help/rockdown_occlusion.jpg" border="0" class="linked-image" />

Comments

  • zastelszastels Join Date: 2003-11-29 Member: 23731Members
    This is some great tech! Should allow us to pack in more details without having to fight with layouts.

    I must ask, doesn't using occlusion cost CPU resources? Is there diminishing returns if over used?
  • ThaldarinThaldarin Alonzi&#33; Join Date: 2003-07-15 Member: 18173Members, Constellation
    I always thought moving away from other techs and BSPs and Max's algorithm for occlusion culling was supposed to stop this extra work of level sealing?
  • w0dk4w0dk4 Join Date: 2008-04-22 Member: 64129Members, Constellation, Reinforced - Shadow
    edited May 2011
    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->I must ask, doesn't using occlusion cost CPU resources? Is there diminishing returns if over used?<!--QuoteEnd--></div><!--QuoteEEnd-->

    The current implementation uses the real geometry to cull objects (IIRC), so this should definately give a huge performance boost as long as you dont make the occlusion geometry as complicated as the map geometry.

    btw.: Thank god you are revising the real-geometry based culling, I think it makes sense to make the extra work on the mapping part to save performance.
  • ThaldarinThaldarin Alonzi&#33; Join Date: 2003-07-15 Member: 18173Members, Constellation
    You've never opened Tram before. That map has had occlusion as close as possible to the real-geometry for months now.
  • pSyk0mAnpSyk0mAn Nerdish by Nature Germany Join Date: 2003-08-07 Member: 19166Members, NS2 Playtester, Squad Five Silver, NS2 Community Developer
    That does look messy, but I like that you get more control this way.

    So once this is added usual geometry isn't used for occlusion culling at all or just after adding that special group in spark?
  • FuzionMonkeyFuzionMonkey Join Date: 2005-05-04 Member: 50889Members
    I think just a little map optimization is worth it if you can improve performance a lot.
  • Evil_bOb1Evil_bOb1 Join Date: 2002-07-13 Member: 938Members, Squad Five Blue
    And even if automated occlusion is cool, sometimes it needs a bit of human intelligence to help it out. Combined I think this can lead to great performance.
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    Hint brushing in my Spark? Ah well the human mind is still superior then artificial minds :P
  • 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
    <!--quoteo(post=1845468:date=May 11 2011, 11:08 AM:name=Thaldarin)--><div class='quotetop'>QUOTE (Thaldarin @ May 11 2011, 11:08 AM) <a href="index.php?act=findpost&pid=1845468"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I always thought moving away from other techs and BSPs and Max's algorithm for occlusion culling was supposed to stop this extra work of level sealing?<!--QuoteEnd--></div><!--QuoteEEnd-->
    The current system is all automatic, but the performance penalty is bigger than I'd like (and probably more than the players like too). This isn't like BSP/PVS system though and the geometry doesn't have to be sealed. It's also well suited for outdoor environments.

    In the future I will investigate making the generation of the occlusion geometry automatic.
  • SN.WolfSN.Wolf Join Date: 2010-03-29 Member: 71115Members
    edited May 2011
    <!--quoteo(post=1845557:date=May 11 2011, 04:03 PM:name=Max)--><div class='quotetop'>QUOTE (Max @ May 11 2011, 04:03 PM) <a href="index.php?act=findpost&pid=1845557"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->In the future I will investigate making the generation of the occlusion geometry automatic.<!--QuoteEnd--></div><!--QuoteEEnd-->

    So as a Custom mapper should the general population do this or just the official mappers and wait to see if it is possible to automate? Or is it to soon to tell if it's even possible or to put a time frame of how long before/after 1.0?

    Personally I would rather sit on my levels and have a late release than spend the hours implementing this.

    EDIT: The reasoning for rather waiting is that it may be like Collision_Geometry and be less important because of other changes.
  • 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
    <!--quoteo(post=1845566:date=May 11 2011, 04:01 PM:name=SN.Wolf)--><div class='quotetop'>QUOTE (SN.Wolf @ May 11 2011, 04:01 PM) <a href="index.php?act=findpost&pid=1845566"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->So as a Custom mapper should the general population do this or just the official mappers and wait to see if it is possible to automate? Or is it to soon to tell if it's even possible or to put a time frame of how long before/after 1.0?

    Personally I would rather sit on my levels and have a late release than spend the hours implementing this.

    EDIT: The reasoning for rather waiting is that it may be like Collision_Geometry and be less important because of other changes.<!--QuoteEnd--></div><!--QuoteEEnd-->
    When I said "in the future", I meant when we have flying cars and robot butlers.

    I would wait until the new system is released to start retrofitting your levels. Hopefully I will have this finished for the next patch.
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    edited May 2011
    <!--quoteo(post=1845568:date=May 12 2011, 12:15 AM:name=Max)--><div class='quotetop'>QUOTE (Max @ May 12 2011, 12:15 AM) <a href="index.php?act=findpost&pid=1845568"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->When I said "in the future", I meant when we have flying cars and robot butlers.<!--QuoteEnd--></div><!--QuoteEEnd-->
    This proposed future of yours is awesome, will you be the one programming our Matrix? It can only end in Max-imum win :P
  • SN.WolfSN.Wolf Join Date: 2010-03-29 Member: 71115Members
    Wait a minute.....I have a robot butler.....dumb as a box of rocks but he looks cool standing in the corner with dead batteries holding a bottle of crown royal.

    Thanks for clarifying on that, It actually doesn't look to complicated to implement. Basically just a box within your textured finished box with openings at doors and vents.
    Things like this put one click prefab shapes on my wish list. :) Click,place,extrude.....
  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    edited May 2011
    Is there a good link or can someone explain how occlusion/visibility calculations are done in the spark engine? My frame of reference is the source engine, which I more or less understand the basics (at least how to design a level to optimize performance). However, I'm having difficult understanding how the same things are done in spark.

    For example, if I'm standing in marine start on rockdown, which parts of the map are being rendered? How is the engine determining which parts to render? Since levels don't need to be sealed, what happens if I have a big, gapping hole in my geometry that lets players see into the void/other parts of the level that they shouldn't?

    Essentially, I'm looking for a comparable spark version of the example given for source here: <a href="http://rvanhoorn.ruhosting.nl/optimization.php?chapter=visleafs" target="_blank">http://rvanhoorn.ruhosting.nl/optimization...hapter=visleafs</a>
  • MOOtantMOOtant Join Date: 2010-06-25 Member: 72158Members
    Quake1 is rolling in the grave. :P
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    <!--quoteo(post=1845616:date=May 12 2011, 04:39 AM:name=ScardyBob)--><div class='quotetop'>QUOTE (ScardyBob @ May 12 2011, 04:39 AM) <a href="index.php?act=findpost&pid=1845616"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Is there a good link or can someone explain how occlusion/visibility calculations are done in the spark engine? My frame of reference is the source engine, which I more or less understand the basics (at least how to design a level to optimize performance). However, I'm having difficult understanding how the same things are done in spark.

    For example, if I'm standing in marine start on rockdown, which parts of the map are being rendered? How is the engine determining which parts to render? Since levels don't need to be sealed, what happens if I have a big, gapping hole in my geometry that lets players see into the void/other parts of the level that they shouldn't?

    Essentially, I'm looking for a comparable spark version of the example given for source here: <a href="http://rvanhoorn.ruhosting.nl/optimization.php?chapter=visleafs" target="_blank">http://rvanhoorn.ruhosting.nl/optimization...hapter=visleafs</a><!--QuoteEnd--></div><!--QuoteEEnd-->
    Try the <a href="http://www.unknownworlds.com/ns2/wiki/index.php/Console_Commands" target="_blank">wireframe console command</a> to see it's current implementation in real time

    cheats 1
    r_wireframe
  • 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
    <!--quoteo(post=1845616:date=May 11 2011, 08:39 PM:name=ScardyBob)--><div class='quotetop'>QUOTE (ScardyBob @ May 11 2011, 08:39 PM) <a href="index.php?act=findpost&pid=1845616"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Is there a good link or can someone explain how occlusion/visibility calculations are done in the spark engine? My frame of reference is the source engine, which I more or less understand the basics (at least how to design a level to optimize performance). However, I'm having difficult understanding how the same things are done in spark.<!--QuoteEnd--></div><!--QuoteEEnd-->
    What I am implementing is similar to what's described <a href="http://www.selfshadow.com/talks/rwc_gdc2010_v1.pdf" target="_blank">here</a>. The implementation is quite different but the setup is the same.
  • pSyk0mAnpSyk0mAn Nerdish by Nature Germany Join Date: 2003-08-07 Member: 19166Members, NS2 Playtester, Squad Five Silver, NS2 Community Developer
    Am I seeing this right that the OcclusionGeometry group has no effect whatsoever right now, except hiding the faces tied to that group in-game?
    If I tie that geometry to the CommanderInvisible group it does a good job in blocking vis, so why not make the OcclusionGeometry group invisible to everyone, but still blocking vis like the other group?
    I'm sure this is kinda the plan all along; just a suggestion in case that new system is not ready for the next patch.
  • SN.WolfSN.Wolf Join Date: 2010-03-29 Member: 71115Members
    edited May 2011
    I spent some time putting this in and it's really not to strenuous but i do have two questions.

    (1) Do i need to open up all parts that look out to sky-buildings?
    (2) How will the sky-box and sky-buildings be handled?

    <img src="http://www.super-nova-team.com/ns2/clandestine/occlusiongeometry.jpg" border="0" class="linked-image" />
  • WavesonicsWavesonics Join Date: 2006-12-02 Member: 58833Members
    Max what is causing the poor performance with your all-on-the-fly method? Did you notice it was NVidia cards that were struggling for the most part? Because I have a theory... ;)

    I had a NVidia 9800GTX+ up until it died a few weeks ago, and my performance was suffering, struggling to stay close to 30fps.

    When it died I replaced it with a Readon HD 6970 (Well it's a 6950, but I unlocked the extra stream cores, so now it's a 6970) and my performance more than doubled! Now yes the 6970 is a better card, but that was a HUGE gain.

    Now also a few weeks ago, I started mining Bit Coins using an OpenCL GPU miner. My old 9800GTX+ managed a respectable ~35 million hashes / second.

    However my new 6970 SMASHES it out of the park with ~350 million hashes / second!!

    Knowing the cards were not THAT far apart in performance (graphically), I looked into it, and NVidia cards have many fewer, but more complex stream processors, and AMD cards have much simpler, but many more stream processors.

    In graphics operations they are fairly matched, but in raw compute power for general computations like OpenCL, AMD cards BLOW NVidia out of the water!

    Just my 2 cents :)
  • ThaldarinThaldarin Alonzi&#33; Join Date: 2003-07-15 Member: 18173Members, Constellation
    So, I'm trying to put this in Laymans terms for myself here.

    What you're saying is Nvidia has a stupidly complex architecture making performance sucky for it? Where AMD made it simply and efficient and less bad?
  • WavesonicsWavesonics Join Date: 2006-12-02 Member: 58833Members
    edited May 2011
    Well it's not that NVidia is bad, they developed their design for graphics performance, and it's amazing at that. It's why they were king for so long!

    But for general compute performance (which is relatively new), it appears, that it isn't as efficient. Sorta like the difference between RISC and CISC I believe. Though admittedly I don't know enough about the stream processors to be an authority here...

    [edit] Hhhmmm... apparently I suck at putting thins in Laymans terms... [/edit]
  • kababkabab Join Date: 2003-12-15 Member: 24384Members, Constellation
    The answer i would hazard i guess being.

    With this new method you have heaps less geometry to do queries against would should reduce the occlusion queries and be far less taxing on the GPU..

    Good read how occlusion queries work;

    <a href="http://http.developer.nvidia.com/GPUGems/gpugems_ch29.html" target="_blank">http://http.developer.nvidia.com/GPUGems/gpugems_ch29.html</a>
  • KoruyoKoruyo AUT Join Date: 2009-06-06 Member: 67724Members, Reinforced - Shadow
    edited May 2011
    And i thought the last nvidia gpu generation was designed for computing.

    <a href="http://www.nvidia.com/object/fermi_architecture.html" target="_blank">http://www.nvidia.com/object/fermi_architecture.html</a>
  • SN.WolfSN.Wolf Join Date: 2010-03-29 Member: 71115Members
    edited May 2011
    <!--quoteo(post=1845440:date=May 11 2011, 06:32 AM:name=SgtBarlow)--><div class='quotetop'>QUOTE (SgtBarlow @ May 11 2011, 06:32 AM) <a href="index.php?act=findpost&pid=1845440"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The new method will be comming soon but you can get started now. Creating the geometry in the group will hide it for now so dont worry about your level gettings messy before the new method goes in.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Seems that when giving a way-point to a mac/drifter they go to the top of the Occlusion geometry. This geometry is invisible but i can't way-point through it. Do i need to add this to the Commander Invisible group also?
Sign In or Register to comment.