Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

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

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

  1. Tom_Timothy

    Tom_Timothy

    Joined:
    Nov 21, 2013
    Posts:
    85
    seems if I save setings in chuncks it is working
     
  2. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Do you mean if you just open the scene and then save it it's fine, or if you open the scene, re-apply RTP to the terrain in the chunk and then save it's fine?
     
  3. Tom_Timothy

    Tom_Timothy

    Joined:
    Nov 21, 2013
    Posts:
    85
    half to remake terrain sector them flat then make it in terrain composer apply RTP on the chunks not in main sence.
     
  4. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Hmmm... I don't use RTP myself, so I'm not sure what the issue is. I bet that RTP is saving some textures into the main scene instead of into the project and they get lost in the SECTR export. Is there an option to have RTP make its textures as independent files?

    Alternatively, you can send a link to a project that reproduces the problem to support@makecodenow.com. I'll download it and try to figure out what the issue is, though officially SECTR is only supports Terrain Composer (i.e. it's the only one I code and test against).
     
  5. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    Now this might be a dumb question.. I assume you just load up the scene normally ...after its done making chunks for the scene?..

    I am wondering because the scene runs just as crappy before ... before I set up SECTR stream I was getting around 30FPS ...AFTER setting it up I get the same FPS...nothing seems to have changed.. but the chunks are there...

    I assumed it would run a lot better...what am I missing?

    I have 1 region loader in the scene, 20 chunks each 50,000 in size ...I assumed that would be enough to take "the edge off" to bring up the FPS a bit...
     
  6. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    There could be a few issues. In general to improve performance you need to know what's taking the most time. If you don't speed that part up you won't see any gain in frame rate. Have you used the profiler to see what is taking the time? Feel free to post a screen shot of the profiler here.

    Make sure vsync is off when profiling. When vsync is on going from 31 fps to 59 fps will look like 30 fps.

    Are you using VIS and stream out just steam? If using VIS, try disabling it.

    Lastly always profile in standalone. The editor has a lot of costs that SECTR can't avoid.
     
  7. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    Sorry ...I forgot about the profiler ... I figured out what it was ... an asteroid field I placed in the scene was doing 12,000 calls... I removed it and FPS went up to around 70 ..
    The point is that I don't want to remove it... and making the mesh low quality it looks very crappy ... I will keep messing with it to find a happy area..
     
  8. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    Why do I get this error?
    It leads here:
    Code (CSharp):
    1.  chunkRoot = GameObject.Find(NodeName);
    in SECTR_Chunk.cs

    The error happens when I use this code:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class SplashScreen2: MonoBehaviour {
    5.     public float timer = 2f;
    6.     public string levelToLoad = "";
    7.  
    8.     // Use this for initialization
    9.     void Start () {
    10.         StartCoroutine ("DisplayScene");
    11.     }
    12.     IEnumerator DisplayScene()
    13.     {
    14.         yield return new WaitForSeconds (timer);
    15.         Application.LoadLevel (levelToLoad);
    16.     }
    17. }
    It will fail to load the specified scene and sit there with a black screen ..the scene uses SECTR stream with a region loader and Neighbor loader on the main camera..

    But the Main Menu code that I used to load the scene will load the scene just fine ...and it uses this code to load the level:
    Code (JavaScript):
    1. Application.LoadLevel(mainMenuSceneName);
    ....so I am confused as to why its throwing errors with the splash screen code...
     
    Last edited: May 9, 2015
  9. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    That's Unity being dumb. I doesn't want users to call Find() during a level load, but there's no way to check to see if a level is being loaded :p There are a few possible fixes:

    That code is actually a backwards compat path for data that was exported a while ago. If you have a reasonably up to date version of SECTR and re import/export your chunks, it should go away.

    Alternatively, you can loop through all of the chunks just before you call LoadLevel and set their enabled to false. Then load the level and you'll be g2g.
     
  10. truefx001

    truefx001

    Joined:
    Jan 30, 2013
    Posts:
    100
    Hi MakeCodeNow,
    I saw your open world terrain really impressive.
    I upgraded my game to Unity5
    I have few questions do , I don't know if you can remember we where talking about open world city with stream.
    So my question is in my open world they are bridges,streets,rivers and other stuff which has to overlap many areas,
    will this stream function work with those too?
    And one more thing, I have cars driving around the city following a simple path they have box colliders where the mesh is deactivated so the box is normally not visible , but after couple of rounds of them driving the boxes are visible and at couple more rounds I only see the boxes moving around :)
    Last issue I had and it's bugging me is that in my multiplayer game , when a different character is approaching the area where for example pedestrians are and my character is outside this area , the pedestrians become visible to me again.
    Again thank you in advance
    Zvonko
     
  11. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Ok, let's try to tease apart these issues.

    1) You can handle large objects like bridges by creating their own Sector/Chunk for them. You can take a similar approach for roads and rivers or you can split them up along Sector boundaries or just keep them global.

    2) I remember this issue but there's no bug that I'm aware of in SECTR that would cause it and I need more information on the SECTR components you were using on the cars. If you can get me any kind of repro project, or send me a video of the issue in action, or something that would be helpful.

    In general, though, most open world games don't have traffic all across the map that gets enabled and disabled. Usually the better approach is to have a system that creates traffic in a sphere/bubble around the player.

    3) I'm not really sure what's going on here as SECTR doesn't do anything multiplayer specific, and it's up to you to setup the players appropriately, determine which elements should be client specific, etc. It sounds like you're saying that the other player is affecting your game in ways you don't expect, in which case you should control which SECTR components are created on each player. Maybe some should be client side only, not on all players on all machines.
     
  12. BES

    BES

    Joined:
    Feb 26, 2013
    Posts:
    212
    <---using SECTR_Stream and SECTR_Audio
     
  13. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Looking awesome!
     
  14. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    341
    Good afternoon . I just bought your Asset . Prompt how better to implement open world ? Using SECTR STREAM is better to do a lot of little kuskok cards or use fewer pieces but big? On the stage is a large number of objects. And is it worth doing batching static and dynamic objects ?
     
  15. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    The right granularity depends a lot on your game. I recommend that people start with larger chunks and then go to smaller chunks if you need to save memory. Fewer chunks is easier to work with and usually there's not a huge difference in performance one way or the other.

    Batching has the same benefits with SECTR as without. SECTR STREAM will decrease the number of objects loaded, which will reduce your batch count, but static and dynamic batching will of course reduce further on top of that.
     
  16. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    FYI that SECTR 1.2.0c went live on the UAS. It enables streaming optimizations and audio filters for non-Pro Unity 5 users.
     
  17. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    526
    ^hi guys could you make new tutorial the one from youtube are outdated and they are very different from the first one i bought
     
  18. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    What would you you like to see covered in a new tutorial?
     
    blackbird likes this.
  19. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    526
    well i want to see how to use it with terrain and explaining the new features that you included i used the old one and now i updated i found out that many things changed i felt lost little bit and can you go further about the cpu multi-thread feature and how to change the script so i can offload the cpu work on console or android
     
    Last edited: May 30, 2015
  20. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Yeah, the original tutorials are all still accurate, but I should add more to cover the new behaviors.

    Regarding multi-thread stuff, in SECTR STREAM the async loading is automatically much faster in Unity 5. In SECTR VIS the threaded culling is sadly pretty badly impaired due to a bug in the version of Mono that Unity ships on. I've left the code in, hoping that Unity eventually fixes the bug, but for now you just have to try setting it to a low number, like 1 or 2 threads in culling camera, and then do a lot of testing to see if it actually improves performance.
     
    blackbird and hopeful like this.
  21. bluemoon

    bluemoon

    Joined:
    Dec 14, 2012
    Posts:
    84
    I'm sorry if these are obvious questions I'm more of an artist than a programer and I'm a bit over loaded so I haven't been able to experiment with sectr as much as I should have yet.

    I've messed around with Sectr complete and love it so far. I noticed streaming no longer supports light mapping due to a unity not supporting lightmaps in aysnc loading.

    Is there more information on this somewhere?

    Is it just additive level loading that is broken or all aysnc loading?

    Does this includes dynamic lightmaps as well?

    Is there a way to only stream in some of my sectors?

    I was thinking I could stream in non light mapped objects but I would like to still sector the rest of my objects to take advantage of vis etc.

    I originally had planed to stream in my most of my game world but I don't want to give up lightmapping. To get around not being able to stream in lightmaped objects I was considering creating levels with overlapping areas and replacing the level when the players are in the overlapping areas. I figured I could use some kind of false origin in each level as a position reference for moving objects from one level to another. Just like how HL2 did things.

    When using stream how should non sectr stream level loading be handled? Should I just Load in the main levels I've created my sectors in as a normal levels?

    Thanks
    Travis
     
  22. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Lightmapping and streaming still work in Unity 4.x, just not Unity 5.0 or 5.1. It's due to the way Enlighten is integrated into Unity, the short version of which is that it doesn't play nice with additive level loading or the tricks I used to make things work in 4.x.

    It is possible to split your scene such that you only stream non-lightmapped stuff, but I've been working closely with Unity to get this issue resolved and we're making good progress. If you can sit tight for Unity 5.2 or 5.3, then you things should "just work" again.
     
    boysenberry and hopeful like this.
  23. bluemoon

    bluemoon

    Joined:
    Dec 14, 2012
    Posts:
    84
    Thanks for getting back to me so fast. That's great news. I can work on other areas and hold off on level design for a while. I've only gray boxed so far but by the time I redesigned things it sounds like it will be fixed anyway.
     
  24. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    120
    Good Morning,

    I am testing this amazing software with my project but I am encountering some problems :

    Stream
    My scene is pretty simple, the rooms are made by primitive cubes (shaped as walls) and I connect the rooms as shown in the guide (sectors and portals). Anyway when I use Stream I notice a sensible hitch in the scene (even if my framerate is still high). I use Unity 5.1 Free.

    Vis
    By using only Vis and applying the culling component to my MainCamera I have better performance than STREAM (no hitches) but I notice that sometimes the shadows and part of walls tends not to be correctly culled.
    To be more clear I notice that are culled when they should not because in the range of the camera.

    I really hope you could give me some suggestions how I can fix these issues.

    Regards
     
  25. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    For the stream issue, make sure to get latest SECTR from the store. That includes a fix that caused hitching for Unity 5 personal users.

    For the vis issue, do you mean that objects are culling when they should be visible or that they are visible when you think they should be culled? If it's the latter, it's probably ok as the culling in SECTR uses some approximations for speed and we'll always err on the side of culling too little rather than too much.
     
  26. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    120
    WOW very quick answer!
    I have the latest version, but now that I think my project folder is a bit messy and I will re-import the asset and see how it is.

    Concerning STREAM. Sorry for my poor explaination :
    I mean that the objects should be visible but are culled for few fractions of second before are again rendered. This effect is very evident with the shadows (directional and point ones). Am I missing something?
     
  27. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    If the stream problem persists after a reimport, please test in a standalone build. Streaming perf is always worse in editor.

    For vis, directional shadows require special hookup on each sector and member. See the vis manual for more details. Not sure what would be causing issues with point lights. Try fixing the directional shadows first and if the problem persists, some screenshots would help.
     
  28. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    120
    Thanks! As soon I go back from Work I will try :)

    So If I understood correctly the last version is optimized even for the Unity 5 Personal right?
     
  29. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    120
    It worked! Thanks :)
     
  30. bryantdrewjones

    bryantdrewjones

    Joined:
    Aug 29, 2011
    Posts:
    147
    Hi MakeCode! :)

    I *just* purchased the Complete package. Thank you for the awesome tools! :)

    I have a few dumb questions for you, if you don't mind. :oops:

    1. My project is a 2D open world-ish game. I'm going through the process of splitting it up into sectors now, and I'm a little confused about where I should be placing the portals. Almost all of my sectors overlap like this:



    For cases like this, does it matter where the portal is positioned? Just as long as it's somewhere within that overlapping area? Or should it be aligned perfectly with the edges of one of the connecting sectors?

    2. My game uses asset bundles to support multiple resolutions. For example, I have asset bundle variants with textures at full resolution for 4K displays, variants with textures at 50% resolution for 1080p displays, etc. I mostly bought the Complete package for the streaming capabilities, but I'm not totally sure how to connect my asset bundle workflow with SECTR STREAM. STREAM will take my huge open world scene and break it up until multiple sub-scenes, correct? And the loading is done through the LoadLevelAdditive API? Do you think there's a way for me check what asset bundle dependencies each sub-scene has before the scene is loaded? The Asset Bundle API has a way of checking for dependencies on the bundles themselves (AssetBundleManifest.GetAllDependencies), but I'm not seeing a way to connect that to STREAM :(

    Sorry for all of the questions! I appreciate the support!! :D

    Cheers!

    -Bryant
     
  31. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,283
    does streaming the lightmaps works with with unity 5.1?
     
  32. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Hi, Bryant. Thanks for supporting SECTR!

    1) Unless you are using VIS culling (which I assume you aren't), then you can actually make portals w/ out a mesh and put them wherever you think best. You still need to link the sectors, but the Portal geometry and exact position don't matter. If you want to avoid Portals entirely, you can try just using a Region Loader. Sneaky, but should "just work".

    2) This is tricky. Are you using asset bundles because you want to download the textures after the user installs the app or is it just to manage what set of textures is loaded based on display type? In general, Asset Bundles and streaming using LoadLevelAdditive don't play super well together. If it were me and I wasn't planning to download assets after install, I would recommend that you do this:
    * Build the game world once using the full resolution assets, export using SECTR, etc.
    * Write a script that goes through each sub-scene and makes a duplicate for each texture set you need to have. Modify the objects in the scene to use those textures. Make sure these duplicate scenes are included in the BuildSettings. You could possibly do this step as an AssetPostProcess.
    * Modify the logic in SECTR_Chunk code so that it loads the right sub-scene based on user display or whatever logic you use to chose your texture resolution.
    * Ship it!
     
  33. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    No. It may be in Unity 5.2, but I'm not sure yet if they will support both loading and unloading of that data in 5.2, in which case it may not be until 5.3.
     
  34. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    526
    you still didn t update the tutorial videos you promised that before but still today nothing
     
  35. bryantdrewjones

    bryantdrewjones

    Joined:
    Aug 29, 2011
    Posts:
    147
    Thank you for the super quick response! I feel less confused about the Portal workflow now! :D

    The solution you proposed makes a lot of sense, and it would be pretty straightforward to implement! That may actually be all I need for the SD/HD texture setup. Can I run one other possible solution by you? I feel like I'm going to have a hard time avoiding downloadable asset bundles in the future. Do you think this would work?
    1. Place each sub-scene/chunk in its own asset bundle so that the dependencies can be determined by looking at the asset bundle manifest.
    2. Modify the loading behaviour in SECTR_Chunk like so:
      1. On _Load(), first load the sub-scene's asset bundle manifest
      2. Check the manifest for any asset bundle dependencies. For each dependency, load the relevant asset bundle (and modify the asset bundle path to include the variant name, if applicable).
      3. After all dependencies have been loaded, load the sub-scene's asset bundle
      4. Once the sub-scene's asset bundle has been loaded, call Application.LoadLevelAdditiveAsync()
    3. Modify the unloading behaviour in SECTR_Chunk so that the chunk's asset bundle dependencies are also unloaded (assuming no other chunk depends on those bundles being loaded).
    Definitely more complicated, and I know it would affect the streaming speed... But if I load the chunks far enough in advance, maybe it will be okay?
     
  36. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Yes, that will work. As you say, the main thing is that you'll need to make sure the asset bundle is loaded before the Chunk actually needs the data in it.

    The main downside of this approach is that asset bundles will, by default, include copies of all assets they depend on. That means that if you have, say, a tree texture that you re-use everywhere, a copy of that texture will be in every scene AB. If players are downloading each AB, they'll be downloading a lot of duplicate data. There are various ways to fix this, but it's complex and very game dependent.
     
  37. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    PS - If you do this, you'll probably want to make the AB loading part of what Chunk does. Just add a new function like "Preload" and then update the internal logic such that it does the right thing when you call AddReference for the first time but the data isn't done preloading.
     
  38. bryantdrewjones

    bryantdrewjones

    Joined:
    Aug 29, 2011
    Posts:
    147
    Hi MakeCode!

    I really appreciate the detailed support :) I think I'll give the AB loading a try...what you described doesn't sound too painful. Your code is super clean and easy to follow!

    Thanks again!

    -Bryant
     
  39. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    Cool. Please post again once you've tried it and let us know what worked (or didn't work!).
     
  40. kilju

    kilju

    Joined:
    Nov 4, 2013
    Posts:
    124
    Hello guys. i have bought sectr and its really nice still learning :)
    now i was wondering is it possible to make 2 scenes and load them on fly?
    im making open world game and using rtp3 and it allows me to use only 8 textures on my terrain in one scene. so i started to think if this kind of thing is possible?
     
  41. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    This question has been asked a lot on this thread already, so look around for more info. The short version is use Terrain composer + RTP to create your world and then use the SECTR Terrain Window to sectorize it and the SECTR Stream Window to export it for streaming.
     
  42. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    526
    why you still didn t update the video tutorials why there is no tutorial about the terrain which you promised long time ago ? i really feel like you don t care about your customers after they bought your stuff that's not professional i could write a bad review and go on i will not care if will hurt your sales or not
     
    Last edited: Aug 2, 2015
  43. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    I care very much about my customers, which you'll see clearly from SECTR reviews, and the many posts here. If you have specific questions/issues, please ask them and I will be more than happy to answer them.

    As for the new tutorials, if you re-read my post I clearly said that I "should" update them not that I "would" update them. I never made any specific promises nor did I give any specific timeframe. I also updated all of SECTR with open world demo scenes, which were the most commonly requested additional "tutorial" feature.

    To be clear, I prioritize my work based on the needs of the users of SECTR, and the majority of people are more interested in improvements, Unity 5 specific updates, etc. rather than new tutorials. Threats of bad reviews do not impress me, and I will stop responding to your posts if you continue in this fashion.
     
  44. Mikeedee

    Mikeedee

    Joined:
    Jan 5, 2015
    Posts:
    42
    uuuh "be careful ill post a bad review hurr durr"
    Oh jesus how old are you, twelve? He is only one guy and just because you paid for the asset, doesn't mean he suddenly works for you and has to ignore everyone else who also bought the asset to comply to your demands.
    As if threatening with bad reviews wasn't cringe worthy enough, now you are trying to paint a bad picture of the asset on the basis that not having up to date tutorials proves it was only made for small scenes.
    Not really worth replying to your ridiculous tirade, but its worth noting sectr was used in open world games likes firewatch, the scenes in that game are definitely not small.
    It also works great and I haven't stumbled upon any bugs, and not only that it's really easy to set up. Easily one of the best assets on the store, well worth the price.
     
    hopeful and MakeCodeNow like this.
  45. Shawn67

    Shawn67

    Joined:
    Jan 2, 2014
    Posts:
    2,196
    I haven't had any issues either other than the growing pains of learning to use / integrate such a comprehensive asset. There is no easy button and with an asset like this, it would be impossible to make one that fits everyone's needs. Just because you purchase something that you don't understand doesn't make it right to jump in here and demand that the author cater to your needs. Personally I haven't had any issues yet that I haven't been able to overcome and have found the support to be awesome. Maybe try spreading some honey instead of dumping demands with spit and vinegar everywhere... ;)
     
    Howard-Day, hopeful and MakeCodeNow like this.
  46. passerbycmc

    passerbycmc

    Joined:
    Feb 12, 2015
    Posts:
    1,470
    Is there anyway to prevent multiple chunks that use the same Lightmap snapshot from creating duplicates in the LightmapSettings.lightmaps array. While having new chunks that are loaded use the existing lightmaps in the lightmap array?
     
  47. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    In Unity 4.x, SECTR will automatically make sure the lightmaps array elements are re-used. In Unity 5, SECTR doesn't support lightmap streaming because Unity broke it as part of the Enlighten integration. It looks like it may be fixed in Unity 5.2, but I haven't put the new API through its paces yet.
     
  48. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,919
    If people are being immature or difficult, please use report post button, and don't feed the trolls. I've deleted his post. Thanks. There's a way to communicate and that wasn't it.
     
    Shawn67 and hopeful like this.
  49. Falagard

    Falagard

    Joined:
    Jan 8, 2014
    Posts:
    43
    I'm planning on using AssetBundles as well for my assets. My primary reason is to download assets after the game releases without requiring patching.

    However if I used Sectr Stream I'd need to do something similar to what was mentioned above - modify the loading of Sectr Stream to pull down AssetBundles and dependencies.

    I'm happy enough to download all asset bundles prior to loading a scene though.

    Any luck getting this working, Bryant?
     
  50. MakeCodeNow

    MakeCodeNow

    Joined:
    Feb 14, 2014
    Posts:
    1,246
    SECTR 1.2.1 is now live on the asset store. Includes mutli-scene lightmap baking and streaming in Unity 5.2 (plus a number of bug fixes).