Search Unity

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

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

  1. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    Hi, thanks for the reply, Ive tried the advice you gave and here are my results:

    * All of my Portal-Sector connections are correct and my Doors are also connected to the correct Portals

    * When I disable the Door Loaders and the Start Loaders along with all the Group Loaders and just use a Neighbor Loader the Sectors on the other side of the loading door areas seem to load just fine, so I dont think its a Chunk export problem.

    * When I disable the Group loaders (as to just have the single sector on the other side of the loading door load) the Sectors on the other side of the loading doors still dont want to load but the loading doors still open and close automatically.

    *As for the included Stream/Door Demo, I exported it for streaming and everything seems to work perfectly fine in editor and in a standalone build, all the doors in the demo seem to stream the scene correctly.

    Hope the info was of some help, if there is any other info I can provide just let me know.

    UPDATE: Awesome, I was able to fix it. THe problem was that I didnt have the player layer included in the load layers for the loading doors so the palyer didnt cause a load.

    The doors still seems to open a bit prematurely as there is still a short moment where the sector behind the door is still blank before it pops up after about a second. This is a bit jarring, is there any way to fix this?

    UPDATE2: Even though the doors load the sectors correctly now, even the rest of the Sectors contained in the respective Group Loader List, there seems to be another major problem, as soon as I enter through the door it wont close no matter what, it also doesnt unload any sectors (on either of the side of the loading doors).
     
    Last edited: Dec 3, 2014
  2. aegget_

    aegget_

    Joined:
    Oct 30, 2012
    Posts:
    33
    Oh I was more thinking of adjusting the shuffle speed without altering the sound. I know it can cause cutting if it plays before the other sound finish playing but maybe a volume fade in/out parameter could fix that? I don't know, maybe its too much of a hassle to implement :)

    Yeah restarting Unity removed the error, thanks.
     
  3. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Calling SECTR_AudioSystem.Play multiple times in a row for the same cue won't cut it off. You cab see an example of that for foot steps in the included character audio component.
     
  4. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Glad you're making progress. The door never closing and opposite side never unloading is the same bug. The player needs to exit the door trigger for it to close. Is that happening? Also, try disabling the group loader to see if that makes a difference.

    On the pop after open, can you repro that in the door demo or only your scene? It definitely shouldn't happen as the door is designed to open only when the other side is fully loaded.

    Are you using Unity 4 or 5?
     
  5. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    @MakeCodeNow

    I am using Unity 4.5.5 on Windows 7 64 bit.

    As for the pop in no this doesnt happen in the door demo only my scene.

    As for the player entering and exiting the trigger correctly yes this happens as well as the entering and exiting still works if you enter and exit on the outside of the loading door (although the unload still doesnt want to work as the sector on the other side still stays there), this can be seen when moving in and out of the trigger but not crossing the portal, once the player is on the other side of the portal that when the door get stuck and doesnt want to close anymore.

    Another thing that I noticed is that when I use a Neighbor loader in order to circumvent group loaders and the pop in glitch I notice that the sector on the other side of the portal/door is still loading without the door opening even if I set the portal flag to closed (the door still opens if I set it to closed luckily, but it doesnt fix any problems with the door).

    I know that this isnt an interfering trigger either as I had other triggers at the loading door points that cancels the collsion detection between the player and the terrain so that the player can enter the cave systems, but even after disabling the terrain and these other triggers there still seems to be some kind of conflict and the door doesnt want to close or unload.

    Antoher thing that I noticed is that when ever I move in and out of the outside of the trigger (outside of the portal) but dont cross the portal itself the loading door opens and closes correctly, however once I cross the portal the door opens up completely, then jumps back to closed and opens again and after that it just get stuck and doesnt close or open anymore. I still need to test if this happens on the inside of the portal though.

    Hope that the info helps.
     
  6. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Very good info. I think you're looking at all the right things. The jump from open to closed to open is a good clue.

    Can you try using one of my doors in your scene rather than your own door? I wonder if there is a subtle mechanim setup difference.

    If you can put together a package that I can download, that's probably the easiest way for me to dig in.
     
  7. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    Thanks for the fast reply, I think Im going to try your advice on testing the demo loading door in your scene as I also suspect that it might be a mecanim setup problem.

    Otherwise I will try to get you a test scene, but it might be a bit difficult as my scen is quite big and complicated and Im using a lot of model packs that I bought off of the Asset Store and dont really want to give the respective developer's assets away.

    Another thing that I noticed is that the problem happens instantly on the inside of the loading door, if I set my player to start in the cave system and then I move towards the terrain sectors which is on the outside of the door (instead of the usual setup where I start on the terrain adn move towards the outside of the loading door) then I still get the glitch with the door opeing then snapping back to closing and opening again without me toughing or passign through the portal.

    I will try your suggestion with the demo door though and let you know what my results are.
     
  8. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    Awesome, finally got it to work, just set up my doors mecanim setup according to the basic loading door from the door streaming demo (not the spacedoor from the complete demo like before). I also just fine tuned the animation blending a bit to prevent any skipping and it seems to work fine now. Might need to set up some kind of work arounf for the group loaders but im pretty sure ill be able to figure something out.

    Thanks again for all the help and for creating SECTR, it really is an outstanding package.
     
  9. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Awesome. Good news!

    What Group Loader issue makes you think you'll need a workaround?
     
  10. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    I still need to test it (currently trying to figure out Mesh Baker and how to get the meshes/materials in my scene combined into clusters/atlases first), but I think the Group loaders might still cause the blank space before the sector on the other side of the loading door loads.

    So I might need to exclude the connecting sectors on each side of the loading doors from their group loaders so that they can load seperately and properly and then find another method to just load/unload at least one sector from the respective group so that the entire group can load/unload.
     
  11. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Sounds reasonable. If Group Loader is the cause of the gap lmk and I'll try to fix the bug.
     
  12. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    Thanks will do and thanks again for all the stellar support.
     
  13. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    Just did a few tests and it seems that the Group loaders are just fine, and that I dont get any popin/blank sector when the loading door opens or closes, so luckily that is also sorted out.

    Although my build does crash if I move to frequently and fast out of loading door zone ( as I notice there is a bit of obvious natural slowdown when the sectors in the respective group loaders load and unload), although I think this might be because I still need to combine some materials/meshes into altases/clusters because I have waaay too much loose materials/textures and meshes.
     
  14. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Can you send the crash log to support@make codenow.com? Or paste the stack trace here? I'll take a look if it's SECTR related.
     
  15. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    Awesome will do, just doing a few other tests, then I will send the error/crash logs through to you.
     
    Last edited: Dec 6, 2014
  16. SkermunkelStudios

    SkermunkelStudios

    Joined:
    Dec 29, 2012
    Posts:
    156
    Just sent the error/crash logs via email. Hope they are of some help.
     
  17. SpectralEdge

    SpectralEdge

    Joined:
    Sep 17, 2012
    Posts:
    33
    Is there a simple way to trigger an event when a sector is loaded with region loader? We have a mini map system that needs to regenerate its texture each time a chunk loads.
     
  18. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Yeah. Just hook into the SECTR_Chunk.Changed event.
     
  19. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    I just took a look and it appears that it's due to memory fragmentation. SECTR seems to be doing everything right, but eventually Unity tries to make a fairly large (2 MB) contiguous alloc, can't find that much free space, and then falls over. Not sure that you can do much about that except try to have more free memory so that things fragment less often. You can also try to make your largest assets (usually meshes and textures) smaller using compression and splitting.
     
  20. megisto

    megisto

    Joined:
    Dec 25, 2009
    Posts:
    127
    Hello. Looks like SECTR Complete is the solution for my project, but i have few questions:

    I am building a very large scenario with complex building, so i am already dividing it in different scene. My idea is to setup all the necessasy occlusion culling/LOD system per scene and then having a scene called MAIN in which i load everything runtime.

    So the first question is: I saw that SECTR works by dividing a large scene in chunks but will it work in reverse? I mean if the scene are already set can i use it to load it in the main scene?

    2 - I must tweak the terrain in the MAIN scene to fits buildings that are in other scenes, so SECTR works in editor too?

    3 - I plan to make the entire scene visible by very far distance, so almost everything should be loaded at startup and I plan to use very intense LOD system, from billboard to detailed versions, all those thing set in every single scene. Can i manage this kind of things using SECTR?

    Thank you for your time
     
  21. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    I think SECTR will be a perfect fit for what you are doing.

    1) It's possible to reverse engineer the main scene data by I don't recommend it, esp not your first time using SECTR. Instead, you should import the sub scenes into the main scene, make sectors for each and then reexport them. You can do that all at once or one scene at a time.

    2) Yes. That should be no prob. SECTR includes tools that let you reimport scenes as well as export them. You can go back and forth as much as you like.

    3) Yes. SECTR has a feature called a chunk proxy, which is a mesh that's displayed when a sector is unloaded but hidden when the Sector is loaded. Works great for distant geometry as you describe. You can also use the included event hooks to build your own systems on top of the streaming primitives.
     
  22. megisto

    megisto

    Joined:
    Dec 25, 2009
    Posts:
    127
    Thank you for the informations, it really looks like is the solution i need. There is just another question that comes in my mind after saw your tutorials. It seems that SECTR Core takes care of those loading/unloading using portals, but as my game is almost only exteriors i think that the best solution for me is to use proximity to the camera, instead of portals.

    Am i tied to portals or can I easly setup a proximity manager, using your tools?
     
  23. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    There's a component called a Region Loader designed exactly for that outdoor use case.
     
  24. megisto

    megisto

    Joined:
    Dec 25, 2009
    Posts:
    127
    Amazing, thank you.
     
  25. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    691
    One of the most common tasks my game needs to accomplish is to consult another method when a sector is loaded, obtain a list of every NPC in that chunk, spawn them accordingly, and despawn them once the sector is unloaded. Is anything messaged when a sector activates and deactivates, or would a gameobject inside the sector with the spawning run in OnEnable and OnDisable be my best bet?
     
  26. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Yep. Just use the SECTR_Chunk.Changed event.
     
  27. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    691
    Awesome, thank you! Sorry for being thick though, but how exactly do you subscribe to SECTR events? :)
     
  28. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    It's just a regular C# event.
     
  29. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    691
    Oh, awesome, thank you! :)
     
  30. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Can i use SECTR complete in a unity standard network game?
    I.e. for VIS when i go together with a connected player in a zone where an enemy is spawned, when i then go out of the VIS zone but the enemy is still hunting the other player or be hunted and i go back in the VIS zone, will i see the the orld enemy or will for a new enemy be spawned?
    Are there any other infos about SECTR complete and networking?
     
  31. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Yes. SECTR should work fine with pretty much any networking strategy.

    VIS just did occlusion culling so it won't create or destroy anything.

    STREAM does create and destroy objects but you have a lot of control of how that works and what objects are affected.
     
  32. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Ah, great :)
    Yeah though about what i see in the scene so choosed VIS but for sure it has to be STREAM.
     
  33. elusive52

    elusive52

    Joined:
    May 14, 2013
    Posts:
    38
    hi
    im thinking about purchasing sectr complete, please can you explain (for someone that knows very little about how all this works) how it is better or comparable to unity 5 (with its new asset streaming etc functionality). If i have unity 5 pro do i even need sectr complete? if so why.

    and also how does unity 5's new all in audio solution compare to yours? are there any advantages disadvantages with yours?

    many thanks in advance.
     
    Last edited: Dec 27, 2014
  34. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR is compatible with Unity 5 and will be for the foreseeable future.

    Unity 5.0 includes optimized asset streaming routines, but there are no new tools or features beyond the LoadAsync script functions. SECTR STREAM benefits from all of these optimizations, so it works even better in 5. Unity has had a blog post about a sub-scene system that will be part of a later Unity 5 update, but they didn't talk about any specifics or time information, so it's impossible for me to say more. When that comes out, if it comes out, I'll update SECTR as necessary.

    SECTR AUDIO has a lot in common with the new audio in Unity 5. Unity 5 audio has a more sophisticated mixing and effects bussing system, but that's about the only major advantage. SECTR supports clip randomization, bulk asset/project management, built in pooling, complex 3D sound sources, and, in the next release, per-cue parameters and effects. In short, SECTR has a more complete set of tools for creating game audio, and is probably better unless you need very complex mixing/busing.

    SECTR VIS is somewhat slower than the built in Pro OC (based on umbra) but is quite fast, handles dynamic scenes (which Umbra does not), and is actively supported.
     
  35. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    Have you tried WebGL with Sectr Complete? I would be very interested in seeing this work with the demo on your website instead of webplayer - webplayer is apparently being discontinued anyway so to see it in action with WebGL may really show off the asset and WebGL.
     
  36. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Good question. I haven't tried SECTR with WebGL in Unity 5. It should "just work" as SECTR is all C#, doesn't use exotic features like reflection at runtime etc. I'll give it a test soon and report back unless anyone else already has tried.
     
  37. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    FYI that I just did my first test and it seems to be working ok. Dynamic objects appear to have a culling bug in VIS and things stutter a bit at the start but then smooth out. I'll bang on it a bit more and post a demo on my site once I have all the kinks worked out.
     
    Ascensi and OnePxl like this.
  38. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    That's awesome that you've been testing out Sectr with WebGL! any updates on making it run smooth? I'm still having some audio issues.. Using your latest update, I've got the audio working again in the editor using Region Source but it wont yet play in runtime. I have added Unity's reverb to the prefab and you instructed to disable on load.. is this also true for the settings in the Hierarchy? ? . I hope in the future you could provide a video tutorial that would demonstrate exactly how you would set up a Character audio system and other sound sources (like volumetric) it would be a bonus if all done in WebGL, Many people these days it seems are looking to make their game compatible/run smooth across as many devices /platforms as possible.
     
  39. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    WebGL performance is mostly out of my hands. Unity is actively working on improving it (it's still a preview even in 5.x beta). My main goal has been to find and report bugs.

    I agree some more advanced character audio tutorials are needed. In the mean time, check out the COMPLETE demo scene. The CompletePlayer shows the basics of a character with surface aware footsteps, and the scene has RegionSources, AudioEnvironments, etc.
     
  40. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    In the import settings when viewing the audio does sectr complete modify these settings to be optimal for streaming.. for example it would adjust the audio file of a stream soundfx file to set it to streaming, compressed in memory or on load.. these are details and optimizations that could help performance and knowing which type is preferred. I know some footsteps should be compressed in memory and maybe your character audio system delegates these changes? I have been looking at the demo files and your videos to see what I've missed. Sectr is made t use any audio format Unity allows is this correct as well? thanks.
     
  41. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR will not modify the audio import settings. The SECTR audio window GUI does make it easy to bulk edit your audio clip settings.

    SECTR works with every Froissart that Unity supports in AudioClip.
     
  42. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.1.5 is now live on the asset store. Includes lots of audio improvements including beta versions of filters and parameter control, an open world VIS optimization, and various bug fixes.
     
  43. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    691
    Just to confirm, gameobjects that are not inside a sector, like game logic and UI, don't need any special handling to keep them from deactivating during play, right?
     
  44. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Correct. SECTR is designed to be conservative and will not touch anything unless you tell it to (by adding a component or parenting it under an object with a Sector or Member component).
     
  45. Sendatsu_Yoshimitsu

    Sendatsu_Yoshimitsu

    Joined:
    May 19, 2014
    Posts:
    691
    Outstanding, thank you! :)
     
  46. dbrian

    dbrian

    Joined:
    Jun 1, 2013
    Posts:
    32
    Restarting the editor doesn't seem to help with these null exceptions. As soon as I open freshly imported demo scene for COMPLETE, I get 999+ of these. In fact the editor becomes unusable. Is there a workaround?

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. SECTR_AudioSystem._UpdateAmbience () (at Assets/SECTR/Code/Audio/Scripts/SECTR_AudioSystem.cs:2205)
    3. SECTR_AudioSystem.LateUpdate () (at Assets/SECTR/Code/Audio/Scripts/SECTR_AudioSystem.cs:1894)
    4. UnityEditor.EditorApplication.Internal_CallUpdateFunctions ()
     
  47. dbrian

    dbrian

    Joined:
    Jun 1, 2013
    Posts:
    32
    By the way, this only happens with the COMPLETE demo. None of the other demos seem to have this trouble. I'm on 4.6.2 Pro for Mac. These aren't the only errors I get.

    Code (CSharp):
    1. transform.localRotation assign attempt for 'CompletePlayer' is not valid. Input rotation is { NaN, NaN, NaN, NaN }.
    2. UnityEngine.Transform:Rotate(Single, Single, Single)
    3. SECTR_CharacterMotor:FixedUpdate() (at Assets/SECTR/Demos/Core/Scripts/SECTR_CharacterMotor.cs:268)
    4.  
    Code (CSharp):
    1. !CompareApproximately (SqrMagnitude (q), 1.0F)
    2. UnityEngine.Transform:Rotate(Single, Single, Single)
    3. SECTR_CharacterMotor:FixedUpdate() (at Assets/SECTR/Demos/Core/Scripts/SECTR_CharacterMotor.cs:268)
    4.  
     
  48. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Sorry, that's due to a bug I introduced in 1.1.5. I've fixed it, but the update isn't live yet. Fortunately, you can work around it by just going into the CompletePlayer Prefab->SECTR Audio System component->Default Ambience property and setting the OneShots array to be size 0. As you can see it has a NULL entry in the OneShots array, which the new code doesn't like.

    I can't repro the other errors you're getting, but I'm on 4.5.5 not 4.6.2. They seem to be in the same spot of the character motor, so try again once you have the other bug fixed. If they keep showing up, it's probably a separate issue, due to physics changes between 4.5 and 4.6 (or something).
     
  49. Cargh

    Cargh

    Joined:
    May 17, 2011
    Posts:
    36
    MakeCodeNow,

    "SECTR STREAM makes it easy to save memory, increase performance, and decrease load times by splitting your scene into multiple chunks and streaming them in realtime."

    This ultimately means it is easier in many ways to make large scale environments, however there is still the problem of transform floating point accuracy precision with the very large scale environments.

    The current game I am working on requires FPS precision however a world size that is beyond 20km x 20km. At standard scale at under 10,000 in each direction from origin seems to work fine without jitter, but when pushing beyond that into the next decimal point accuracy is horrible. Is there any plans to integrate with SECTR Complete a method for resetting the position as you enter a new sector of a grid. Removing the floating point accuracy issues, but maintaining compatibility with other plugins and unity terrain.

    To me this seems within the scope of your suite of tools. Or is it not?
     
  50. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Good question. Its technically feasible but impractical due to performance issues. Unity has a bug in its async loading that builds static collision 2x if you try to move chunks post import, even if you import them deactivated. Until that is resolved the performance of streaming and shifting is too low to be worth supporting, sadly.