Search Unity

[RELEASED] SECTR CORE: Sector Creation Kit

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

  1. gstock

    gstock

    Joined:
    Feb 19, 2014
    Posts:
    10
    Hi I'm working on a game with an open map (Not Unity Terrain). I'm wondering if I'll be able to use Sectr to create Sectors of "arbitrary" map sections (Like squares on a grid I define). I've read in your replies that it works for open spaces, but I'm not sure if it's only when using Unity Terrains.

    Also, what will be the portals on an open map?

    Thanks!
     
  2. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR is not specific to terrains at all. There are just some extra tools that try to make it extra easy to setup terrain based open worlds. You could copy them if you need to; all source is included.

    Portals support a flag called pass through where they have a direction but no shape. That's what the built in tool uses. You could also make specific Geo if you knew that the connection between cells was a particular shape.

    Also, you can try a lot of this yourself if you download the free SECTR CORE module. It includes most of the authoring tools.
     
  3. Rico21745

    Rico21745

    Joined:
    Apr 25, 2012
    Posts:
    409
    Hey.

    I own SECTR COMPLETE and started finally playing with it yesterday. It looks great so far but I'm trying to come to grips with the workflow/definitions still so bear with me if my questions are noobish/weird:

    I have a large outdoor terrain split into tiles/sectors/portals using SECTR STREAM. Within the tiles/sectors are only the terrain tiles atm.

    On top of the terrain I have a bunch of geometry, including buildings of different varieties, some of which have interiors and some of which do not, of varying sizes.

    So my questions are as follows:

    1) Since I already have sort of like a square grid of sectors and portals from the terrain. I was wondering about further dividing things inside each terrain tile into sectors as well, and how you think I should be doing it for things to work correctly. For example, some of these building interiors are pretty detailed, and I'd like to cull/unload the interior until you get inside the building or at least get moderately close to it. With that said, how should I be setting up my Sectors for this scenario? Should I have another Sector that outlines the building interior walls/props, another one that's the hallway leading into the building, all of them inside that terrain tile's sector? So in essence, nested Sectors?

    2) I quickly tried SECTR VIS last night on that terrain but when I was setting up the Sectors using the Terrain tool, I selected 'split terrain" "include static" and "include dynamic". As a result, SECTR put most of the objects in the scene inside Sectors. Then I applied the VIS component to my camera as per the instructions and set up my terrain invisible layer as per the docs. The problem is that when I hit play to test the culling, the framerate took a major dive, worse than if I had not done any culling. (60 ms CPU in profiler being used by VIS_PreCull looks like)

    Is this the expected result? I'm unsure how the two "include dynamic and static" checkboxes are meant to be used. I was expecting the VIS culling to be overzealous since I didn't fine tune it or anything, but I wasn't expecting the huge CPU hit I was seeing. Any thoughts?

    So far though the toolkit looks pretty solid and looks to be money well spent. I'm already discussing with my team how we can use SECTR STREAM to generate procedural outdoor scenes. So if you have any ideas given we're using Terrain Composer to create our terrains already, we'd love any tips you can throw our way.
     
  4. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Hey! Good questions. I've answered them below, but there are similar threads in the STREAM, VIS, and COMPLETE forums that you might want to check out for more info.

    1) You can definitely have Sectors for building interiors. You set them up like any Sector but don't parent them to the terrain Sector (never parent Sectors to one another). Then you can export them like normal with the Stream Window. To load them, you can put them on a different layer than the terrain and use a Region Loader that loads the interior when they are nearby. Or you can create a portal at the door into the building, connect the interior and terrain Sector with it, and use a Door Loader. Or you can do something custom. It's designed to be flexible enough to allow different strategies for different games.

    2) It's not surprising that you saw a big hit. VIS can just blindly cull a huge scene, especially if each Sector has lots of children and is set up to Default/Individually cull everything. The VIS manual has a lot of info on how to optimize culling, which mainly revolves around using Sectors and Members to cull objects in groups. You can also try to enable Threaded Culling if you have enough CPUs to spare.

    PS - If you use SECTR for your game, it's licensed at one seat per team member (like all UAS Editor Extensions). There's no DRM or evil audit, but having teams buy one copy per dev helps me keep improving the product.
     
  5. Rico21745

    Rico21745

    Joined:
    Apr 25, 2012
    Posts:
    409
    Thanks for the info, I'll keep poking around for a while longer and see what kind of results I can get. I'm hoping to optimize my levels as much as possible so I can keep figure out the workflow for efficient levels.

    And yeah I understand about the licenses. I'm pretty much the Unity in my project atm but if we expand the team we'll definitely pick up licenses as needed to support the packages that will hopefully make the project possible :)
     
  6. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Sounds good. Lmk if I can help with anything else.
     
  7. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR COMPLETE is on sale now for 50% off as part of the UAS August Madness sale. Also, SECTR 1.1.0 is out, just in time for the sale.

    SECTR 1.1.0 Release Notes
    CORE
    * Added new Quick Start panel including live information on news, sales, and updates as well as quick links to useful videos, docs, and support.
    * Make sure to never double-add Sectors for Portal Determined Members.
    * Removed legacy Unity 3.5 code, added initial compatibility code for Unity 5.
     
  8. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Exciting news! SECTR is a technical achievement finalist in the 2014 Unity Awards! If you like SECTR, please take a moment to vote for it!
     
    Last edited: Aug 7, 2014
  9. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.1 is now out. Includes bugfixes for 1.1.0.
     
  10. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.2 is now live in the asset store. Includes small bugfixes for CORE.
     
  11. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.3 is now live on the UAS. Includes ability to create portal geo in terrain window plus some other bug fixes.
     
  12. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.4 is now out on the UAS. Includes AUDIO improvements, lots of bug fixes, and early Unity 5 compatibility!
     
  13. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    New SECTR update out now. Includes improvements to terrain splitting, plus some Unity 5 updates.
     
  14. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    1.1.4e is out now. Includes API fixes for U5 Beta 13.
     
  15. bluemoon

    bluemoon

    Joined:
    Dec 14, 2012
    Posts:
    84
    I'm currently considering updating to unity5 is there any issues with the new dynamic GI and Sectr Stream?
     
  16. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Good question. I hope so, but Unity is still changing the specifics of their integration of dynamic GI and lots of stuff isn't settled yet. There is a known issue that they can use up to 4 lightmaps per object, but only two are exposed to script. I've filed bugs and hope that others do, too.
     
  17. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    1.1.4f is now live on UAS. Includes fixes for U5 b14.
     
  18. odival

    odival

    Joined:
    Jun 11, 2014
    Posts:
    57
    I'm sorry if its a dumb question but I'm trying to wrap it up my head some of the level design implications of this system, but I'm kinda confused. So, it sectorize the terrain into chunks. But lets say someone is working on an island or continent scene. Like the example below:


    The land mass is surrounded by water. Then how would one make a ocean, if the world is sectorized? Im not sure ocean meshs with waves would allign between chuncks. There are ocean shaders like Scrawk's that creates a infinite ocean on the fly. But then any valleys into the island, lower than the sea level, would've been submerged. So whats the best aproach to implement both sectorized terrains and a ocean, while avoiding theses issues?
     
  19. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,922
    SECTR doesn't break the world up in to chunks. You do. You decide what all ought to be loaded in a group at one time for the player's experience, and what can be loaded at different times (say, if the player moves to an area of the game world that cannot be seen from the original area).

    Depending on how your island/ocean game is played, I could see you having that island broken up into as many small chunks as your memory restrictions require. The ocean area could be either shoreline parts of your island sectors, or additional sectors that are neighbor-loaded as needed, when the player moves around at sea.

    Also, you can have more than one sector in memory at one time. So you could have the sector where the player is, plus adjacent sectors loaded, memory permitting, and then as the player moves - say - out of the original sector and into the sector to the north, then SECTR can automatically adjust which sectors are in memory to drop old neighbor sectors that are no longer needed in the south and load in new sectors that neighbor on the north.

    Additionally, because you specify what goes into a sector, your sectors don't have to be of the same size or shape. They don't have to be terrain. They don't even have to be models. You could have sector objects that are sound files, for instance, that play when you load the sector that contains them.
     
  20. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    That's a very good synopsis.

    For the ocean specifically I recommend you use an infinite water system and disable it when you are not near the coast (maybe based on which Sector you are in) or when you are looking away from the coast. Then design your map so that you don't have spots where you can see both ocean and below sea level spots at once. That's essentially what we did for Brutal Legend.
     
  21. odival

    odival

    Joined:
    Jun 11, 2014
    Posts:
    57
    Thanks guys, this really makes sense, and seems very practical! =)
     
  22. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    That's the goal!
     
  23. voncarp

    voncarp

    Joined:
    Jan 3, 2012
    Posts:
    167
    The hibernator seems to have some features that I really could use.

    The hibernator is set to have the object hibernate when the sector is unloaded. Would you be able to guide me in a direction to use the hibernator in conjunction with the region loader?

    The hibernator seems to turn on when allSectorsFrozen is true.

    So when the hibernator enters the bounds of the region loader, I would need to grab the hibernator and set a boolean to false to enable the hibernator and then set it to true when it exits. Would that be an efficient way to use it? Do I need to modify the hibernator to inherit from Sectr_Member? I've tried sampling the hibernator by adding SECTR_Sector to it and tried to add it into a list as you do on the region loader with the sectors, but I can't seem to get it to register.

    I noticed in the sectr_member.cs you have

    Code (CSharp):
    1.     /// Setting to true will prevent this Member from joining any sectors.
    2.     /// Only to be used in very specific circumstances.
    3.     public bool NeverJoin
    4.     {
    5.         set { neverJoin = true; }
    6.     }
    Would this be a special case for this scenario?

    Am I way off track for this usage? Suggestions?
     
    Last edited: Jan 20, 2015
  24. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    The hibernator is designed to be based on Chunk/Sector loads, independent of what kind of loader caused it to load. Basically, as soon as any Sector that the Hibernator overlaps is loaded, it exits hibernation, and when none are loaded, it enters hibernations.

    If you want it to be based directly on the region loader (i.e. when the entity is close to the player) then just add a new public bool like "HibernateFromPlayer" and do something like this

    Code (csharp):
    1.  
    2. bool allSectorsFrozen = true;
    3. if(HibernateFromPlayer)
    4. {
    5.     RegionLoader playerLoader = ; // somehow get player's region loader
    6.     loadBounds = new Bounds(playerLoader.transform.position, playerLoader.LoadSize);
    7.     allSectorsFrozen = !loadBounds.Intersects(cachedMember.TotalBounds);
    8. }
    9. else
    10. {
    11.     int numSectors = cachedMember.Sectors.Count;
    12.     for(int sectorIndex = 0; sectorIndex < numSectors; ++sectorIndex)
    13.     {
    14.         SECTR_Sector sector = cachedMember.Sectors[sectorIndex];
    15.         if(!sector.Frozen)
    16.         {
    17.             allSectorsFrozen = false;
    18.             break;
    19.         }
    20.     }
    21. }
    22.  
     
    voncarp likes this.
  25. voncarp

    voncarp

    Joined:
    Jan 3, 2012
    Posts:
    167
    Thanks! Awesome response time.
     
  26. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.5 is now live on the asset store. Includes bug fixes to terrain splitting and some other code cleanup.
     
  27. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.5a is now live on UAS. It includes some bug fixes and a major reduction in garbage generated by Member update.
     
  28. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.5b now live on the UAS. Includes a critical bug fix for 1.1.5a.
     
  29. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.2.0 now uploaded to the UAS. Includes an Open World demo (finally!) and a native Unity 5 build.
     
  30. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    124
    hi. is it possible to hide sectors bounds? because its really annoying when making terrain and u see these blue lines everywhere.
     
  31. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Yeah. Just collapse the sector component in the inspector.
     
  32. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    856
    Hi, not sure where my last post went but I have 2 issues:
    1- duplicating point source doesnt work, new one doesnt play
    2- is there any way to not use circular shapes for the sounds in this? I want to use a cube really.

    Thanks!
     
  33. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Questions like this should go into SECTR AUDIO (where your previous post went). I'll reply to both questions there.
     
  34. Zireael07

    Zireael07

    Joined:
    Apr 27, 2016
    Posts:
    47
    I downloaded Sector Core and cannot figure out how to select the terrain to be sectorized in the open world demo scene. No matter what I do, I have the gray button 'select terrain to sectorize'.
     
  35. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    The demo scenes are already sectorized. If you want to do it yourself you need to unhide the original terrain and then select it and you should be OK.
     
  36. Zireael07

    Zireael07

    Joined:
    Apr 27, 2016
    Posts:
    47
    The terrain doesn't look hidden nor sectorized in that scene - there's only three things in it, Terrain, Player and Sun compared to the other scene which has loads of objects. Also the demo text says:
    'This is a simple open world scene. You can try using the Terrain window to sectorize or split the terrain.'
    If the scene were sectorized, why display such a message?
     
  37. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Sorry for the confusion. I was thinking of the open world scene in other posts of SECTR. I'm traveling today but will look into this more when I home.
     
    Zireael07 likes this.
  38. Zireael07

    Zireael07

    Joined:
    Apr 27, 2016
    Posts:
    47
    Thank you - it's amazing to see an asset supported years after release!
     
  39. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    345
    @MakeCodeNow I have a 610 tiles of terrains that are arranged and put near eachother (just like what Terrain Composer does) but it is not made by Terrain composer, Now the question is will Sectr automatically generate the sectors?.
    Thanks in advance.
     
  40. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    It won't, no. You could adapt the code from terrain window yourself but the automatic terrain sector and portal code only works on unity terrain or terrain composer.
     
  41. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    345
    I believe I didn't exactly get it as you said the term "Unity Terrain". They aren't meshes, they are 610 pieces of unity terrains that are put near each other. Now, I'd be happy if you say whether would it autogenerate sectors them or not.
     
  42. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Yeah. I mean that SECTR's auto sector and portal creation tool only supports a single unity terrain or a grid made with terrain composer.
     
    Mr_Dan_O likes this.
  43. Gregorik

    Gregorik

    Joined:
    Dec 11, 2014
    Posts:
    334
    Hi, I'm trying to create sectors with Core: it's a large urban landscape with skyscrapers, and seems Core won't handle very tall structures. When I select them and try to make a sector, Core encapsulates almost the entire area in its sector bounding box. Is there a way to solve this? Thanks.
     
  44. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR just uses the bounds information that Unity provides. I would guess that if you are seeing very large bounding boxes on certain objects, the mesh probably has an equally large bounding box. Maybe there are a few random triangles far away from the main structure?
     
    Gregorik likes this.
  45. piaodison

    piaodison

    Joined:
    Jul 27, 2017
    Posts:
    2
    Hi,I've been working PC games before, and recently I turned my focus to Unity. I was researching the scene management for Unity, and fortunately find SECTR in Asset Store.
    I've looked at most of forums and have some understanding about SECTR. At the same time, I have some question.
    1.Through your introduction, I know that the Sector is basic element and provide a tool(Terrain Windows) to slicing terrain and build sector.I would like to know whether there is a fixed interval averaging between the slicing terrain? Any GameObj(like model, effect, et) on the ground is sliced with this tools? If that's right,I have a big GameObj(longer than fixed interval),will it be included in a Sector through this tool?This is important in my research.
    2.Do you planed to provide the dynamic loaded navMesh?
    3.The culling and Lods is base on Sector or GameObj? If it's the former, can GameObj be processed?
    4.I might use Asset Blundle.Does this affect CPU performance(regardless of the load Asset Bundle)?
    I sincerely hope the SECTR and you answer can be help for my research~~ Thanks!!!
     
  46. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Good questions. I'll take them in order.

    Terrain slicing only slices the terrain, not game objects. This tool has the option to put game objects into terrain sectors but only if they fit into a single sector. Large objects need to be set up by the developer.

    Dynamically loaded nav messages are on the backlog but unlikely to be ready anytime soon.

    Culling can be done per sector or per game object. Lods are per game object.

    SECTR doesn't use asset bundles so I can't really say anything beyond what you can find in the unity docs.
     
  47. piaodison

    piaodison

    Joined:
    Jul 27, 2017
    Posts:
    2
    Thanks for you answer!!! I think this can help me a lot. Then I have one last question:
    As you say, large objects need to be set up by the developer. For example, let it belong to a neighboring Sector. This could change the size of the Sector(overlap, covering, etc), I'm not sure if it will affect SECTR's correctness and efficiency. Or there are other ways(not change Sector) I didn't see it.
     
  48. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    It's fine to make the sector larger.
     
  49. 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.
     
    mindfulmx likes this.
  50. voncarp

    voncarp

    Joined:
    Jan 3, 2012
    Posts:
    167
    Tears. Going to miss your presence on the forums. Best of luck.