Search Unity

[RELEASED] SECTR VIS: Dynamic Occlusion Culling

Discussion in 'Assets and Asset Store' started by MakeCodeNow, Feb 21, 2014.

  1. zornor90

    zornor90

    Joined:
    Sep 16, 2015
    Posts:
    163
    Awesome! I will make a note of that, one final question for now - if a sector disables itself completely when I'm between two of them (inside the portal mesh of the door that connects them), does that mean I should extend the sector some or is something else going on?

    upload_2018-7-13_19-58-44.png

    -1 sector on the left, invisible until I move a bit to the left or right

    I really appreciate the support, this tool has made all the difference for our game!
     
  2. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    That probably means that the sectors have a gap or somehow you're able to get in a spot where you overlap one but not another. You can probably fix it by making the bounds overlap. However, an easier fix might be too set portal determined to true in the cameras member component (add one if it doesn't exist).
     
  3. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    BTW - would you mind positing a short video of of it working once you have the last issues sorted out? I love seeing SECTR work in real games.
     
    hopeful likes this.
  4. zornor90

    zornor90

    Joined:
    Sep 16, 2015
    Posts:
    163
    Absolutely! Anything in particular you'd like in the video?
     
  5. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Just like the screenshots you posted - a cute that shows the game in a view where you can see the culled rooms turning on and off.
     
  6. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Hi, everyone. I wanted to share some very good news - SECTR is joining the Procedural Worlds family of products and is now a sibling to great packages like Gaia and Pegasus. Adam and his team at Procedural Worlds are have some very cool ideas about how to evolve things like Gaia and SECTR together.

    For my part, I'll still be active here, providing support and answering questions until the Procedural Worlds team is fully up to speed on SECTR.
     
  7. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,623
    Hey everyone,

    We are very excited to have SECTR joining the Procedural Worlds family today!

    Over the next few months we will work together with the author of SECTR to familiarize ourselves with the code base and ensure that the same high standard of customer support that both SECTR’s existing customers and Procedural Worlds customers enjoy is maintained.

    For existing SECTR customers, please be assured that your investment is in good hands! We are working with Unity to migrate SECTR over to the Procedural Worlds publisher account. Your existing purchase is safe and when the migration is complete the changeover will be seamless.

    Moving forward, we will continue to develop SECTR, and will also integrate it into our suite of products as part of our commitment to continually enhance the Procedural Worlds content generation and delivery pipeline.

    You can learn more about Procedural Worlds at our web site here: http://www.procedural-worlds.com/

    Cheers,
    Adam.
     
    hopeful likes this.
  8. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,623
    SALE SALE SALE!!!

    All Procedural Worlds Assets Are on Sale for 25% off - Including our recent SECTR acquisition!!

    Plus - to sweeten the deal - we also have a stellar bunch of updates!!

    Gaia 1.8.0 update is live:
    • Added Mac 16 bit raw import
    • Added 8 bit raw file import
    • U2018 related fixes due to changed API's related to spawning prefabs
    • Turned off automatic lightmap baking when creating news scenes
    • Improvement to bounds based collision checking
    • Added Terrain Utilities to Main menu to highlight it
    • Reorganised More menus to make them more understandable
    • Minor usability tweaks
    GeNa 2.0.0 Upgrade is live ($20 for purchases > 90 days ago, free otherwise):
    • Paintbrush painting mode
    • New layer based spawning system & improvements
    • Vastly improved bounds based collision checking
    • Vastly improved rotation algorithm when doing fences
    • New Min and Max spawn height capability & visualizations
    • Height offset modification for collisions
    • Seamless support for SECTR
    • Preliminary Vegetation Studio support
    • Improved help system
    • Fully 2018.x compatible
    • Better defaults.
    CTS 1.8.0 update is live:
    • New material & shader caching system
    • Use of material enable materials shared between terrains
    • New cached shader id system to speed up updates
    • Better registration / deregistration system for multitile
    • Component menu workarounds : CTS moved to GameObject menu
    • Terrain now world space instead of vertex space (prelude to mesh blending)
    • Improved terrain normals generation
    • Moves shaders from Resources to Shaders directory to stop excessive compile times . Reorganised texture and profile directories
    • Latest shader updates / amplify bug fixes
    SECTR will be updated in next few days (currently in test)
    • Seamless support for Gaia terrains
    • Seamless support for CTS
    • New suite of Video Tutorials
    With all this new coolness, a bunch of new video tutorials will also come out later this week...

    HUMBLE BUNDLE SALE

    If you haven't already heard about it then do yourself a favor and check out the amazing Humble Bundle Sale! $15 gets you a bunch of cool games, a set of game dev courses valued at $600, and a whole bunch of premium unity assets.
     
    Last edited: Sep 7, 2018
  9. thonk

    thonk

    Joined:
    Nov 28, 2012
    Posts:
    6
    Hello! Apologizes if this has been answered already, but does SECTR VIS work with multiple additive loaded scenes?

    For example, we've split our levels into different layers (each a different scene) so programmers, artists, and designers can work together on one level at once. These scenes are all additively loaded on start.

    I'm under the assumption that SECTR VIS can't really cull things in different additive scenes right? You would need multiple overlapping Sectors to do that?

    Thanks in advance.
     
  10. attaway

    attaway

    Joined:
    Nov 12, 2014
    Posts:
    34
    Last edited: Sep 26, 2018
  11. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,881
    Ambient occlusion and occlusion culling are two completely different things.

    Ambient occlusion has to do with making tiny, detailed, fake shadows on objects to make them seem a little more realistically lit.

    Occlusion culling is where meshes that are not currently visible to the camera are turned off so they don't have to be rendered. (No reason to tell the computer to render things that can't be seen.)

    VIS is the latter type. GTAO is the first type. Completely different things.
     
  12. attaway

    attaway

    Joined:
    Nov 12, 2014
    Posts:
    34
    Ah ok. Thanks!!
     
  13. zornor90

    zornor90

    Joined:
    Sep 16, 2015
    Posts:
    163
    Just so you know, there seems to be an issue with cloth and sectr.

    We added a flag to one of our sectored room prefabs with a skinned mesh renderer and a cloth component. Upon loading into the game inside that room, we discovered that the cloth did not appear to move in the game view, but was in the editor window. Upon disabling the sectr culling camera, it started to work just fine.

    I tried everything including setting a member component on the flag, increasing the bounds to ludicrous size, etc. The only fix was to run a coroutine and disable the renderer for one frame, then re-enable it. That seems pretty hacky, any chance of getting an official fix?

    Thanks!
     
  14. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    385
    Thanks for reporting! We did not run into this issue yet, so we need to try to reproduce & investigate a bit, I created a ticket for this in our support system so this won't get lost in the forums. I will get back to you once I know more regarding this issue.
     
    zornor90 likes this.
  15. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    385
    @zornor90 Sent you a direct message with a possible fix. ;)
     
  16. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    385
  17. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    209
    How well would sectr vis work on open worlds? And very roughly how would that be set up? Just make a bunch of 50x50 sectrs all over the place?
     
  18. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    385
    Yes, you would indeed need to set up sectors in a grid pattern to get vis working in an open world scene. However, it is not recommended to use Vis in an open world scene in general, as you would basically set up manually what the built-in occlusion culling of unity would do for you anyways in the baking process. The Sectr Vis manual has the following on comparing Vis wiht the built in occlusion culling (Umbra):

    ● SECTR VIS is designed for indoor and hybrid-outdoor games, where Umbra works for fully outdoor and fully indoor games. Umbra is especially effective where SECTR VIS is weakest - fully outdoor environments of the kind you see in open world games.
    ● Umbra requires a baking step. While this has gotten much better since 4.3, it can still take time on large scenes. SECTR VIS requires no baking at all.
    ● Umbra has some dynamic elements (if you use their helper components), but they are not well explained and they have dependencies on some of the static, baked data. SECTR VIS is completely dynamic, so if you can create it, you can change it during the game.
    ● Umbra does not work with scene streaming (as implemented in SECTR Stream). SECTR VIS does, for obvious reasons.
    ● Umbra is implemented in C/C++ and has access to native Unity code. SECTR VIS is implemented in C#, and does not have super low level access to engine or hardware. While Umbra and SECTR VIS perform comparably in many test cases, Umbra's baking step and low level access mean it will likely always have the raw speed advantage.
    ● Umbra is closed source to Unity developers, while SECTR VIS includes all source as part of its license.
    ● Umbra is designed to be an auto-magic solution. It requires nothing more than a button press to get working, but it can be difficult to control if that auto-magic solution does not produce the results you want. SECTR VIS requires some human work to setup, but once set up does exactly what you tell it to. The products make different tradeoffs here, and which is right for you, only you can say.
     
  19. drcrck

    drcrck

    Joined:
    May 23, 2017
    Posts:
    279
    upload_2019-3-20_11-52-3.png

    How do you cull the built-in Terrain's chunks?
     
  20. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    209
    ok, right on. so out of sectr stream, Vis or anything else, if you were to put together a city block with about 20 houses, all with interiors, sectr vis would probably be beneficial for that. as I see with sectr stream, seems more open world larger area style, and both these could be used together?
     
  21. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    385
    Those are culled by treating each chunk as a sector. When you split up at terrain with Sectr into chunks, it will set them up as sectors with portals in between them so they can be culled by Sectr Vis. But this is what I mentioned in my post above, at this point you are basically imitating with Vis what the built-in occlusion culling can do for you automatically via baking.
     
  22. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    385
    The main difference between Vis and stream is that Vis will evaluate which Sector is visible at the time for the player by looking at the Sector portals in between the player and the renderer in question.
    Stream will create separate unity scenes for each sector and will actually load & unload these scenes around the player while they move through the game world. It is possible to combine the both, e.g. have Stream load in a sector with a house and its interior, and then still cull the interior sectors with Vis as long as they are not visible.

    One more thing regarding the limitations of Vis in an open world scenario, I'm not sure if I did explain this well: Vis relies on the scene being divided into sectors and portals that connect those sectors. In this screenshot the player stands in the blue room at the camera gizmo and Vis knows that the walls of the red room and orange room are visible for the player at the moment by evaluating the connection between the rooms (blueish vision cones)
    vis.jpg
    This setup is something you more or less got anyways in an indoor scene - you already got rooms and doors, vents, elevators etc. in between them, so setting up portals and sectors will be no big deal. The more "outdoorish" your scene becomes, the more time consuming it will be for you to set up these sectors and portals so that you get an advantage out of it.
     
  23. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    8,138
    Has anyone tried SECTR VIS on Oculus Go? I'm thinking about trying it for a dungeon crawler. But the Go's CPU is rather weak (basically mobile phone hardware), and it's absolutely essential to maintain 60 or 72 FPS. So I worry about the culling taking too much time.

    In a large level, does the CPU time taken depend on how many sectors are culled, or how many are in view? There would typically be only a handful of sectors in view, but a large number not.
     
  24. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    385
    The CPU time taken would rather depend on how many sectors are in view. Per default VIS deactivates all renderers and only activates those which can be seen by evaluating the connection between the sectors (see the screenshot I posted in my last reply above)
     
    JoeStrout likes this.
  25. zornor90

    zornor90

    Joined:
    Sep 16, 2015
    Posts:
    163
    Hey, I recently added some code so that sectr would have the ability to ignore some objects

    In SECTR_Member.cs, I created an ignoreTransforms list:
    Code (CSharp):
    1. public class SECTR_Member : MonoBehaviour
    2. {  
    3.   /// <summary>
    4.   /// SECTR will ignore these transforms and their children
    5.   /// </summary>
    6.   [SerializeField] private List<Transform> ignoreTransforms;
    Then, I modified _AddChildren so that if ignoreTransforms contains a transform it will not be added to the member's data:
    Code (CSharp):
    1.     private void _AddChildren(Transform childTransform, bool dirShadowCaster, Vector3 shadowVec)
    2.     {
    3.         // We always stop the descent when we encounter another SectorMember
    4.         if(childTransform.gameObject.activeSelf &&
    5.            (childTransform == transform || !allMemberTable.ContainsKey(childTransform)) && ignoreTransforms != null && !ignoreTransforms.Contains(childTransform))
    6.         {
    Would there be problems with this? If not, could it be added to the main sectr code in an update? (Noticed that one was planning on getting released soon)
     
  26. PWPeter

    PWPeter

    Joined:
    Dec 16, 2018
    Posts:
    385
    In general I don't think there should be problems with this, obviously the ignored childs would not influence the boundaries of the sector anymore etc., but that is probably the point ;)
    How do you add something to the list though, when it is set to private it seems like you have additional changes for that as well?
    Regarding the check in AddChildren I would rather add it as
    Code (CSharp):
    1. // We always stop the descent when we encounter another SectorMember
    2.         if (childTransform.gameObject.activeSelf &&
    3.            (childTransform == transform || !allMemberTable.ContainsKey(childTransform)) && (ignoreTransforms == null || !ignoreTransforms.Contains(childTransform)))
    4.             {
    In case ignoreTransforms actually is null - should never happen in theory, but still - we don't want all childrens to be ignored.
     
    zornor90 likes this.
  27. zornor90

    zornor90

    Joined:
    Sep 16, 2015
    Posts:
    163
    Ohhh right, yeah I edited SECTR_MemberEditor to DrawProperty("ignoreTransforms")
    Code (CSharp):
    1.         if(SECTR_Modules.VIS)
    2.         {
    3.             DrawProperty("ChildCulling");
    4.             DrawProperty("DirShadowCaster");
    5.             DrawProperty("DirShadowDistance");
    6.       DrawProperty("ignoreTransforms");
    7.         }
    And your edit to the if statement makes sense
     
  28. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,623
    Hey everyone,

    We are very pleased to announce the next iteration in the life of the SECTR suite with the release of SECTR COMPLETE 2019.

    After observing the way in which SECTR was being sold and used, we have decided only to continue only with a SECTR COMPLETE package, and to deprecate the others. There were not enough sales of the other packages to warrant the overhead of keeping and supporting them as separate packages, however, they are still actively being supported as part of the new SECTR COMPLETE SUITE.

    We have invested considerable time and effort into upgrading, adding support for the changes imposed by changes in the engine, and in particular have focused on improving and expanding on streaming and large world support, as this fits perfectly with our world creation suite of products.

    The biggest new features and enhancements in the latest version include:
    • Unity 2018.3 and Unity 2019.x support
    • Floating Point Origin Support (extra large world support)
    • Orders of magnitude improvements in the speed of the sectorization process
    • Seamless integration with Gaia, GeNa 2 and CTS (end to end integrated world building)
    • Many easy of use enhancements
    • Many documentation enhancement (including a terrain streaming guide).
    For a more detailed description of all the enhancements we have made please check out the release notes on the asset itself.

    In line with our commitment to continue to develop and our ongoing support the SECTR suite of products we will be charging a nominal upgrade fee. This fee is not being taken out of the business, it is ALL being invested back into growing the Procedural Worlds team, and pays for our development support resources.

    Upgrade pricing is:
    • SECTR Core -> SECTR COMPLETE 2019 $47
    • SECTR Audio -> SECTR COMPLETE 2019 $17
    • SECTR VIS -> SECTR COMPLETE 2019 $17
    • SECTR STREAM -> SECTR COMPLETE 2019 $17
    • SECTR COMPLETE -> SECTR COMPLETE 2019 $17
    And for anyone who purchased in the past 90 days, the upgrade is free.

    In addition to the enhancements we have made to the documentation we are also in the process of making a bunch of new video tutorials, and these will come online in the next few days and weeks.

    We hope that the community sees the upgrades we are making and change in direction to be the positive thing it is for the future of the SECTR Suite of products.

    This forum will no longer be actively monitored - for updates please head over to the SECTR COMPLETE forum.

    Cheers,
    Adam.