Search Unity

[RELEASED] SECTR COMPLETE: Spaces, and the Connections Between Them

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

  1. Cargh

    Cargh

    Joined:
    May 17, 2011
    Posts:
    36
    Thanks for the response. Is this bug also present in Unity 5? Is this a known bug, and do you know if the fix has been scheduled for any particular patch?
     
  2. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    AFAIK it's in 4 and 5. No idea if/when they'll fix it. They don't share that kind of info with me :)
     
  3. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    in the demo Sectr Complete, when i profile the scene there is 157 kb of GC generated per frame from Sectr_Member script, is there any plans to fix this?
     
  4. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    That seems quite high. What Unity version are you using? In general the goal is for SECTR to be as close to zero garbage as possible. I'll take a look later today.
     
  5. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    i used 5.0 rc1
     
  6. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Cool. I can repro in 4.5 too. It's all in get component :p I have a fix in progress.
     
    hopeful likes this.
  7. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    FYI that I have this fixed locally. It now produces about 4KB garbage in editor and 0 KB in standalone. Fix will be in the next update, but email support@makecodenow.com if you want an early patch.
     
  8. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,315
    thanks ! how do you know the standalone gc generated?
    also on the complete demo scene there is bug with audio, it generate missing reference everyframes
     
  9. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    The only garbage comes from code that is inside #if UNITY_EDITOR :)
     
  10. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    The missing audio bug is already fixed in 1.1.5a which will be out in a few days.
     
  11. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Two questions about the portal inspector:
    1) Can you elaborate on the various types of flags?
    2) What is "Hull Mesh"?

    thx
    Dave
     
  12. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    The portal flags represent some extra state that you can apply to the portal. Right now the only ones that are used are Closed and PassThrough. Closed is set by the Doors. When that flag is set, VIS will cull objects on the other side of the portal, even when the portal itself is visible. PassThrough makes the portal act as if it has infinite extents and is used in some special cases. You can add your own flags to support any game logic you want, like "locked" or "dangerous" or whatever.

    Hull Mesh is just the name of the attribute for the mesh that defines the shape of the portal. It will be auto-populated when you draw a mesh but you can use any convex, planar mesh that you like.
     
  13. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Okay, so for normal usage, I'd set the portal flag to "Nothing" or "Everything"? (Why one vs the other?)
     
  14. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Just leave it at the default (nothing). Everything is just something Unity auto adds for all flag attributes.
     
  15. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.5a is now live on UAS. It includes some bug fixes, major reduction in garbage generated by Member update, and an optimization to how STREAM reclaims memory.
     
  16. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    691
    I hope you don't mind a couple of extremely simple questions-

    First off, I'm going through the CompleteScene demo and trying to pick it apart piece-by-piece to teach myself how I can use every single feature SECTR provides to hyper-optimize my levels as much as possible, and I noticed that the player's gameobject only has a start loader, and it appears as if the rest of the internal sectors are managed by door loaders: does this afford a significant performance increase over using a neighbor loader?

    Closely related to that, it looks like the complete package is incredibly easy to deploy: after breaking levels into sectors and portals, adding a culling camera, manually marking occluders where necessary, and ensuring some system of loaders enables and disables sectors correctly, are there any major additional steps that can be taken to further optimize performance, or is that where you get into smaller things like manually marking static objects and finding child hierarchies that can be culled as groups within each sector?

    Finally, I know that VIS has tools to toggle LOD based on the screen size of an object, but do you have any advice for rendering long horizontal scenes like http://resources0.news.com.au/images/2012/11/15/1226516/671700-gta-v-street.jpg ? One idea that occurs to me would be to include manually rendered, low-resolution, low-texture versions of the buildings in the sector, and juggle LOD so only one version of the building is rendered at each LOD level, but that would potentially inflate the total file size and feels a bit hacky.
     
  17. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Start + door loader is just a bit smarter than neighbor loader as it allows you to only load sectors as you get close and to hide the loading behind the site animation. You can design the game such that you never have more than two sectors loaded at once.

    I think you understand basic and more advanced optimization pretty well. VIS has the most complexity for optimization but it's pretty well documented in the manual. In general, start simple, profile, and refine :)

    Professional open world games use lod trick in the book. Usually it's a mix of traditional model swapping (ala SECTR LOD) and custom Geo for distant objects (ala SECTR chunk proxy) plus game specific tricks like impostors, terrain LOD, etc.
     
  18. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    691
    Awesome, thank you for the quick reply! SECTR's ease of configuration is definitely to your credit- it's rare to find effective optimization that is essentially plug and play :)
     
  19. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    That's the goal :)
     
  20. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    Hi, there seems to be a bit of a severe bug in the latest version of SECTR, I upgraded my project to version 1.1.5a, a few days ago and got a bunch of errors relating towards the SECTR Member component (apologies I forgot to copy the error before my project crashed completely, I will try to get you the specific error tomorrow).

    Another strange thing that I noticed with this bug is that it keeps increasing the Scene's size on disk upto the point where the scene crashes and breaks so badly that when you try to re-enter the entire scene is corrupt and unaccessible (my scene file actually jumped from 22MB to 1.9GB)

    Hope that his can be sorted out ASAP as I really need the latest version of SECTR as the old SECTR Member structure is causing some nasty performance drops in my game (with the SECTR_Member.LateUpdate taking upto 15% in my Profiler).

    Just let me know if you need some more info on the matter and I will try to get you a copy of the bug ASAP.
     
  21. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    I'm trying to repro now but please paste those errors if you have them.

    Also, regarding SECTR_Member.LateUpdate taking up a lot of time, this will help but also check out the previously existing BoundsUpdateModes. The defaults are the most conservative, but also most expensive. For many objects you can get the same quality and a lot of benefit by using Start or Movement.
     
    Nateply likes this.
  22. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    The bug is incredibly dumb. New version going up now. In the mean time, in SECTR_Member.cs replace this:

    Code (csharp):
    1.  
    2.   childTable[childTransform] = newChild;
    3. }
    4. children.Add(newChild);
    5.  
    with this:

    Code (csharp):
    1.  
    2.   childTable[childTransform] = newChild;
    3.   children.Add(newChild);
    4. }
    5.  
     
  23. 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.
     
  24. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    Thanks so much for the fast reply, glad to hear it wasnt too big of a problem to fix. I will give the new version a try tomorrow. Its bit late over on this side and I want to make a backup first before I import the latest version of SECTR.
     
  25. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    691
    SECTR assembles a complete node graph at runtime, right? How is the graph formatted? I've attached custom classes to the base Sector and Portal class representing rooms and doors so my AI can "see" level geometry even when it isn't rendered, and I'm trying to figure out whether or not I can dump SECTR's graph into a simple algorithm to draw something like http://webmathematics.net/images/six nodes.jpg .
     
  26. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    There is already code that will write your graph out to a .dot file. Check out SECTR_Graph.GetGraphAsDot(). You should be able to easily modify that to handle your custom classes. Please post cool graphs if you make them!
     
  27. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    691
    Sheesh, I already have this working perfectly: I think every single time I've asked "How would you suggest doing <obscure utility feature>" the immediate answer has always been "Use the functionality already in the API to make your problems go away". Thank you! :)
     
  28. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    That's the goal! I really wrote the dot exporter for myself. I love visualizations like that.
     
  29. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    691
    Me too, it's incredibly powerful even when just used as a dev tool- I'm building a system to build the dot export into an in-game map right now... my main intent is giving myself a tool to keep an eye on the AI and spot any weirdness in their behavior, but I'm having so much fun that I'll probably be considering ways to make this an in-game feature all the way through alpha.
     
  30. super-cypher

    super-cypher

    Joined:
    May 10, 2014
    Posts:
    117
    hi

    Please could you tell me, is there a demo scene (and/or tutorial video) anywhere for how sectr complete works on an open world scene? (for 'mobile' that is)

    thanks
     
    Last edited: Mar 2, 2015
    OnePxl likes this.
  31. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    There is not a good tutorial yet but I am working on one. The basic idea is this:

    Make a terrain in Unity. Then use the SECTR terrain tool to slice it into a grid with sectors. Alternatively, use terrain composer to make the grid then use the terrain tool to make sectors our of that grid.

    Add a region loader to the player.

    Export the sectors for streaming using the stream window.

    Run the game!

    If desired, add a culling camera to the player so that you get occlusion culling. Trends to help more as you have more complex scenes.

    Note that there is no requirement that you use terrains or that they be in a grid. Games like Fire watch use SECTR on a world that's build out of an ad hoc collection of terrains and meshes.
     
  32. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    143
    Hi there!
    First of all amazing software :) I will buy it this week.
    I´ve just one question :

    From the quick start videos on your website I´ve realized that when the Sectors are unloaded the AI/NPCs get frozen.
    For example a NPC if is located in a non loaded chunk/sector will be frozen. Is it correct?
    I would like to avoid to find the NPCs all the time in the same position when I load/unload sectors.

    I hope I was not confusing and thanks in advance for the answer.
     
  33. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR doesn't force NPCs to be frozen. It just gives you that option.

    If you want NPCs to still move around when their sector is unloaded, you can do that but you'll need to write that logic yourself.
     
  34. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    143
    very quick answer! thanks.
    That´s no problem I use Rain as AI and their path/waypoint route is defined.
    I was worried that the NPC was simply "falling away" due to the unloaded sector.
    So As far I got Sectr hide the Sector but is still there. I know is a simplification, but just to understand.

    Thanks again
     
  35. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    I don't know how Rain works but to move in unloaded sectors you may need to put them in a mode where they follow the path but without being affected by gravity.
     
  36. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    143
    So the Gravity is gone when the sector is unloaded right?
    are the colliders / Navmesh gone too?
     
  37. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR includes a hibernator component which will disable physics on itself when the sector is unloaded. Colliders in the sector are unloaded when the sector is unloaded. Nav mesh is always in the master scene as it cannot be split or streamed.
     
  38. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    Currently I don't use this asset even though I bought it...since I am working on other parts of my game right now and plan on streaming my scenes together when I am finished...
    BUT I randomly try it out after updates and stuff to see if everything still works ...
    Unity version 5.0.1f1 and SECTR Complete 1.1.5b .... the demo scenes in the core, stream,vis folders ..the doors wont open when I know they should ...
     
  39. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Very odd. I test entirely in Unity 5 and haven't seen that. Do you see any compile errors out warnings when you import SECTR? Can you try importing it into a fresh project to see if you still get the bug?
     
  40. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    I still get the same problem with a fresh project.... doors dont open on any of them except the "complete" demo ... audio,vis,stream,core ..doors wont open..
    Also I only get a warning after installing the package:
    I am using the 64bit only install of Unity 5.0.1f1 and I have the editor set to DX9 mode ...if that matters
     
  41. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Bizarre. The doors are the simplest thing in the demos.

    Thanks for the info. I'll try to get a figure out what's going wrong tonight.
     
  42. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    Yeah I figured it out I think... the part on the door that says "Can Open Param" its empty ...I typed CanOpen into that empty space and now the doors open ...but I get like 1000 warnings about:
    It seems random ...sometimes they work sometimes they don't ...its one of those very odd ones...
     
  43. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    That's bizzare. Sounds like something got messed up but I have no idea why. My local data works just fine. I'm going to upload a 1.2.0 soon and that'll include a custom Unity 5 package, so hopefully that'll fix your issues.
     
  44. 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.
     
    hopeful likes this.
  45. Tom_Timothy

    Tom_Timothy

    Joined:
    Nov 21, 2013
    Posts:
    132
    Having trouble with terrains losing RTP settings on inport export function can you explain how to get around this please.
     
  46. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Are you applying them using the terrain window or are they already split (using terrain composer)?
     
  47. Tom_Timothy

    Tom_Timothy

    Joined:
    Nov 21, 2013
    Posts:
    132
    already split using terrain composer
     
  48. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    What settings are being most? If you check the exported chunk is it OK there or broken? Also, what specifically is broken? And is this in Unity 4 or 5?
     
  49. Tom_Timothy

    Tom_Timothy

    Joined:
    Nov 21, 2013
    Posts:
    132
    all of the rtp settings are being lost the normall maps the higthmaps this is in untiy 5
     
  50. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    If you open a chunk file are they correct there?