Search Unity

[RELEASED] World Streamer ! Forget about your game memory usage and create big world!

Discussion in 'Assets and Asset Store' started by NatureManufacture, May 13, 2015.

  1. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    - If you have no info, that mean you have an empty sector (you removed things from it and didn't remove sector)
    - If you have error with tag - add correct tag to the streamer
    - You also could have streamer that is connected with loading screen and without sectors to load (not added)
    - If you have error with build settings you should add this scenes to build settings (simply click on streamer and there is a button that will add all scenes)
    Btw attach an error if you get any.

    Check this few things, this will take few seconds. Ofc if you need you could contact me at skype but I could take a look in monday.
     
  2. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    810


    got transform position y strange on X0 y0
     
  3. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    810
    hum yes any helper for zone in api i hope config amplify color or ambiance more easy ?

    any info about lightmap how it's work when you got 50 scene like this ?

    need how fix for player position at start with raycast
     
  4. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    Anyone else getting this error:

    Code (CSharp):
    1. Initialize engine version: 5.2.3f1 (f3d16a1fa2dd)
    2. GfxDevice: creating device client; threaded=1
    3. Direct3D:
    4.     Version:  Direct3D 11.0 [level 11.0]
    5.     Renderer: NVIDIA GeForce GTX 680 (ID=0x1180)
    6.     Vendor:   NVIDIA
    7.     VRAM:     1989 MB
    8. Begin MonoManager ReloadAssembly
    9. Platform assembly: F:\DeleteMe\Build\Test_Data\Managed\UnityEngine.dll (this message is harmless)
    10. Loading F:\DeleteMe\Build\Test_Data\Managed\UnityEngine.dll into Unity Child Domain
    11. Platform assembly: F:\DeleteMe\Build\Test_Data\Managed\Assembly-CSharp.dll (this message is harmless)
    12. Loading F:\DeleteMe\Build\Test_Data\Managed\Assembly-CSharp.dll into Unity Child Domain
    13. Platform assembly: F:\DeleteMe\Build\Test_Data\Managed\UnityEngine.UI.dll (this message is harmless)
    14. Loading F:\DeleteMe\Build\Test_Data\Managed\UnityEngine.UI.dll into Unity Child Domain
    15. Platform assembly: F:\DeleteMe\Build\Test_Data\Managed\UnityEngine.Networking.dll (this message is harmless)
    16. Loading F:\DeleteMe\Build\Test_Data\Managed\UnityEngine.Networking.dll into Unity Child Domain
    17. Platform assembly: F:\DeleteMe\Build\Test_Data\Managed\UnityEngine.Networking.dll (this message is harmless)
    18. Loading F:\DeleteMe\Build\Test_Data\Managed\UnityEngine.Networking.dll into Unity Child Domain
    19. Platform assembly: F:\DeleteMe\Build\Test_Data\Managed\UnityEngine.UI.dll (this message is harmless)
    20. Loading F:\DeleteMe\Build\Test_Data\Managed\UnityEngine.UI.dll into Unity Child Domain
    21. Platform assembly: F:\DeleteMe\Build\Test_Data\Managed\System.Core.dll (this message is harmless)
    22. - Completed reload, in  0.054 seconds
    23. desktop: 1920x1080 60Hz; virtual: 3840x1080 at 0,0
    24. <RI> Initializing input.
    25.  
    26. <RI> Input initialized.
    27.  
    28. <RI> Initialized touch support.
    29.  
    30. Platform assembly: F:\DeleteMe\Build\Test_Data\Managed\System.dll (this message is harmless)
    31. Shader warmup: 22 shaders 278 combinations 0.059s
    32. Setting up 2 worker threads for Enlighten.
    33.   Thread -> id: ee60 -> priority: 1
    34.   Thread -> id: ed8c -> priority: 1
    35. UnityException: Tag: SceneStreamer is not defined.
    36.   at (wrapper managed-to-native) UnityEngine.GameObject:FindGameObjectsWithTag (string)
    37.  
    38.   at SceneSplitManager.AddToStreamer () [0x00000] in <filename unknown>:0
    39.  
    40.   at SceneSplitManager.Start () [0x00000] in <filename unknown>:0
    41. (Filename:  Line: -1)
    42.  
    43. UnityException: Tag: SceneStreamer is not defined.
    44.   at (wrapper managed-to-native) UnityEngine.GameObject:FindGameObjectsWithTag (string)
    45.  
    46.   at SceneSplitManager.AddToStreamer () [0x00000] in <filename unknown>:0
    47.  
    48.   at SceneSplitManager.Start () [0x00000] in <filename unknown>:0
    49. (Filename:  Line: -1)
    50.  
    51. Unloading 6 Unused Serialized files (Serialized files now loaded: 0)
    52.  
    53. Unloading 9 unused Assets to reduce memory usage. Loaded Objects now: 548.
    54. Total: 0.545600 ms (FindLiveObjects: 0.053288 ms CreateObjectMapping: 0.015155 ms MarkObjects: 0.378400 ms  DeleteObjects: 0.093377 ms)
    55.  
    56. Unloading 0 Unused Serialized files (Serialized files now loaded: 0)
    57.  
    58. Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 548.
    59. Total: 0.572977 ms (FindLiveObjects: 0.119288 ms CreateObjectMapping: 0.022000 ms MarkObjects: 0.422888 ms  DeleteObjects: 0.003422 ms)
    60.  
    61.  
     
  5. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    810
    got somethink's like this one time yes
     
  6. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    810
    Alerte red compile on mobile loading don't start ^^ fixed !!

    now i have somethink's very strange !!! <>
    player resest position evry time
     
    Last edited: Feb 28, 2016
  7. Neo-Gamefactory

    Neo-Gamefactory

    Joined:
    Oct 18, 2012
    Posts:
    141
    If i convert my Terrain to a mesh, for better mobile performance, can i also use world streamer with automatic tiling options? or is it only working with terrain?
     
  8. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553

    At this error you can see that you forgot to add SceneStreamer tag to streamer object.


    Yes. You could use low resolution terrain or terrain as mesh. Streamer is streaming objects,models,particles,lights, etc etc everything. Everything also can be looped.

    Lightmaps are working normaly and they will be loaded async with sectors but only at unity 5.2+

    Please check distance in sectors after which, you reset player position.
     
    Neo-Gamefactory likes this.
  9. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    I downloaded this off the asset store. I checked that exact problem. The tag is there on those objects, and in the tags list.
     
  10. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    From error I get info about missed tag. Just contact me at skype.

    Edit: FIXED Unity haven't refresh missed tag in project.
     
    Last edited: Feb 29, 2016
  11. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    354
    Hi, I have a scene with 5x5 terrains in. I would like to split the large scene so I can stream different terrains. I am just getting one scene generated which contains all of the terrains and nothing else. I was expecting to get more scenes generated as the total size is around 4km x 4km

    Here is my hierarchy showing everything is disabled apart from the terrain game objects:



    Here's the steps I carried out:

    Created a layer and set the GameObject Prefix, clicked on Split Scene:



    This put the Terrain hierarchy into a new game object and added the Scene Split Manager script:



    I checked the Assets/SplitScenes/ folder existed and was empty, then clicked on Generate Scenes

    This created the folder SplitScenes/Test Terrain and created the prefab and scene:



    This scene contains all 25 terrains. What am I doing wrong please, I was really expecting more than 1 scene!
     
  12. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    Please move your terrains from mother object "Terrain" that have pivot (0 0 0 position) to outside.
     
  13. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    354
    Thanks :)
     
  14. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    You're welcome :)
     
  15. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    354
    I've split the levels now, and followed the instructions to create a new scene with player and streamer, including setting the Tag. I've linked the SC_Test Terrain in the scene collection. When I run the scene, the player can move but no scene is loaded. I'm sure it's my fault but what else do I need to do to make the scenes load please? :)

     
  16. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    Check if that scene collection object (prefab) have any scenes. There should be list of scenes that are connected to your scene collection.
     
  17. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    354
    The Scene Array is populated with 25 scenes (which matches the number of terrains), but the key lookup is failing as the numbering system is different. The scenesArray goes in multiples of 50 so -2,-2,-2 is never found

     
  18. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    Deos the sector size match terrain size in unity units? I see 10 , 0 ,10 there. You said your terrains are 4k x 4k
     
  19. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    354
    Ahh sorry I didn't realise the link. Each of my terrains is 1000x1000 so I set this in the splitter, it is working now sorry for my confusion :)
     
  20. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    726
    I'm interested in possibly purchasing this asset. I have a bit of questioning though first... I saw the functionality for looping worlds...how does that work? I would think it would include the transform correction for floating point errors, does it by chance do more than just loop the terrains? Does it contain a system for enemies to detect which side is closer for navigation? What else does it do exactly except for the looping terrain itself.
     
  21. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    It loop everything that you hold in your scenes. If you put asteroids model or particles on looped layer they will be looped, ofc other models don't have to be looped. Looping just load the same scenes if you are far enough. You could use floating point fix but you dont have to, everything is optional. Pack is not contain any AI system.
     
  22. Snownebula

    Snownebula

    Joined:
    Nov 29, 2013
    Posts:
    174
    Can I use this to move around in a large scene and press a button to spawn a boat I can walk around inside while it moves in the bigger scene?
     
  23. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    Yeap. Simply add "object to move" script to the boat and connect it with world mover.
     
  24. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    354
    Hi I am getting an error when generating the split terrains:

    UnityEditor.DockArea:OnGUI()SceneSplitterEditor:OnGUI() (at Assets/WorldStreamer/Scritps/Editor/SceneSplitterEditor.cs:219)SceneSplitterEditor:GenerateScenesMulti(SceneCollection, Int32, Int32) (at Assets/WorldStreamer/Scritps/Editor/SceneSplitterEditor.cs:768)UnityEditor.SceneManagement.EditorSceneManager:SaveScene(Scene, String)Cross scene references are not supported: 'Terrain_x0_y0' in scene has an invalid reference to 'Terrain_x1_y0' in scene Test1. This reference will not be saved in the scene.

    I get this once per terrain tile it seems, with different numbers. If I load a split scene, the level name does not match the terrain name and it makes it difficult to edit terrains when they don't match the scene name

    Am I doing something wrong?

    thanks!
     
  25. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    On which scene have you load your splited terrains? At empty scene? I mean you want to edit and save scenes by local area updater?
     
  26. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    354
    I started with a new scene, created 5x5 terrains all 1000x1000 size. When I split the terrains to scenes I get the error.

    I want to use the main scene with the streamer to load the terrains. They are loading at runtime ok but the names are mixed up
     
  27. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    I would love to take a look on this by skype:). Probably it's a wrong value or something small but I would love to take a look. My skype: dahrrrr
     
  28. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    354
    Ok i will contact you after work :)
     
  29. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    354
    I've sent you a contact request :)
     
  30. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    354
    OK so this was my misunderstanding, Terrain Composer creates a bunch of terrains with a different naming system using X and Y, but really this should have been X and Z as Y is upwards. Scene Splitter creates proper names, putting each terrain in a new scene and the names of the scene and terrain end up being different (not incorrect, just different)
     
  31. p10l1n

    p10l1n

    Joined:
    Mar 9, 2016
    Posts:
    3
    That's look interesting.
    I buy the asset, then i can read the manual, and watch de videos, but what i want is not run the test scene. I want use it with my own scene.
    I have a too big scene, with too many things on.
    In my scene i create a very big terrain (with Terrain Composer) with 256 tiles (16 X 16 tiles 60 units each) and some buildings (one of them for example with 110 columns inside) i wish to learn how to set up to be sure the buildings far from player don't use memory, or the terrain tiles far from player.
    I try to do exactly what i see on video tutorial, but don't function (may be some steps before i didn't make?
     

    Attached Files:

  32. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    What problem you exactly have?
     
  33. p10l1n

    p10l1n

    Joined:
    Mar 9, 2016
    Posts:
    3
    Wich layers i have to create? with wich names?
    should i edit by hand the layers of all my gameobjects?
    The scene i wish to stream should i include in build settings?
    After do this, then i should execute click on the buttons to split scene, then generate scenes and then include to build settings?
     
  34. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    Names and layers are your decision but here is few advices:
    1 layer - terrains
    2 layer - buildings and far view models objects
    3 layer - small objects like crates, particles, lights, lamps etc
    It's good to have good prefix names on objects to use fast sorting. I mean prefixes: terrain, farview_modelname, shortview_modelname
    Please move your objects from parents, because streamer will not searching in parents. If you have all models in few catalogues, you should move them outside.
    All scenes that are generated by world streamer should be included in build settings. Btw Streamers have red error info, if some scenes that they use ,are not included in build settings.
    Step by step:
    - Rename your objects to have clear situation.
    - Split your scene using this layers
    - Generate scenes
    - Go to the scene with your player add streamer objects and attach scene collections.
    - Click add to the build settings button at your streamers.
    - Chose best settings for you (size of streaming area) and setup the player.
    - Click play

    Tips at screen:
    No folders in hierarchy and streamer will take correct pivot position of your objects at the scene.
     
  35. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    810
    question about mobile it's can be better perf too use pool of prefab ?
     
  36. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    Pool? you mean use the same terrain many times? You will save only memory. Cpu usage will be the same. Loading is faster when you are loading scenes with terrains.
     
  37. sowatnow

    sowatnow

    Joined:
    Jun 12, 2014
    Posts:
    303
    Just started playing around with world streamer, found it not user friendly. Maybe it's just me.
    Followed the steps in the manual, yet didn't see any new scenes being created etc.

    Can you please write a simple quick start up tutorial for a scene that contains a terrain and objects such as buildings, trees, and props?

    thanks
     
    runningbird likes this.
  38. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    Can you write step by step what have you done? This will help us to track what is unclear for you as a user. Most problems are when peoples don't read whole manual before start or they don't read anything. Ofc something could be unclear for user. We are devs, we know that system and maybe we haven't focused on part of tutorial that could be important for you. We will fix that, but first we have to know where is the problem. If you have problem to split your scene, please fill prefix and layers in scene spliter. Prefix - the name of the object that system will search in your hierarchy. When object will be found, scene spliter will put it in correct layer and sector. If you will left empty prefix, system will take all objects in your hierarchy. Layer order in layer list is important. For example first layer terrains will take all objects that are named terrain_ and second layer with empty prefix will take all objects that first layer left unsorted
     
  39. runningbird

    runningbird

    Joined:
    Sep 3, 2009
    Posts:
    374
    I'm a dev as well been one for well over 20 years and after going over the documentation it feels like there is some assumptions on familiarity with your process.

    If one has already done a ton of work on a scene your manual says to create a new "Work" scene then copy everything over to it etc.

    Also what does the X size and Y size values do?

    In your example the terrain X and Y size are 30 but the Layer for Models is set to 10?

    The next section Find your objects: is a bit confusing as well.

    "This is some kind of filter for system to find objects that will be streamed"
    Did you mean that this "is" a filter for the objects you want streamed?

    How would you use this prefix do I have to give each object in the streamed area a prefix of say x0y0_gameobject1?

    The best way would be to have a very simple example from scratch, or at least make some more step by step documentation for each step that must be done to get your world streamed.

    Just my thoughts after reading the documentation.

    I guess I'll have to tear apart the demo scene and hope to understand it fully before I start blowing up my own project.
     
    Pequisto and sowatnow like this.
  40. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    Ok so lets answer your questions carefully.
    When I said as I'm a dev i mean: I develop this and I could be blind for some deficiencies in documentations. Some topics could be too short for someone. Basically in manual I have to show idea of streaming. This is always diffucult.

    Yeah I prefer to make a coppy of the scene before experiment, to avoid any destructions.

    X , Y , Z is the size of streamed sector. I attach an example image:


    Lets take a look on blue colour - as you see when you click at the objects after split, you can see white boundaries of the sectors. I will call that a pack of memory, which will be loaded in background. For terrain I used 30x 30 because terrains are 30x30 units size. Only for terrains sector must be the same as the terrain chunk size. It could be 1k, 2k etc, but it must be the same as terrain size.

    "Find your objects: Fill your "Game Object Prefix" which will allow you to segregate objects in to sectors" - System is moving object into correct layer and sector by prefix. Yes, all of your terrains must for example have "terrain" sentance at the beginning of the name. Like Terrain_Aaaa, Terrain_Bbbb. If you not fill any layers and prefix, system will segregate all object into one layer. All your models at the scene also need prefix. If models will not have it, they only could be segregate/moved to correct sector by layer with empty prefix. Look at green arrows at the screen. Cubes have been caught into sectors by empty prefix, terrain have been segregated by "terrain" prefix. This small x17 and z17 values are the numbers of sector row and column.

    Why we should you use prefix in models? Basically if you will create 2 layers for city:
    - "Big" as objects that are visible in long range like buildings
    - "Small" as objects that are visible in short range like lanterns and other small objects.
    In this construction you will get cool performance. You have buildings on the horizon but details are loaded only if you are close enought. Whole details are removed from cpu,gpu, vram, ram, if they are too far.

    Models in hierarchy before split should look like:
    -Big_BuildingA
    -Big_BuildingB
    -Big_BuildingA
    -Big_BuildingH
    etc
    -Small_Trash
    -Small_Bench
    -Small_Latern
    -Small_ParticleA
    etc.
    After split - Red lines at the screen. Your objects will get parent with layer name and x,y,z row and column position.

    I really appreciate the attention, this kind of questions help us to make doc better and better. Like I said: I made this and I could be blind for some problems.
    I hope this help, if you have any questions feel free to ask me here or by skype.
     
    John-G likes this.
  41. runningbird

    runningbird

    Joined:
    Sep 3, 2009
    Posts:
    374
    I got all the way to the Terrain Neighbours... couldn't find any where you tell how to set that up?
     
  42. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    "Terrain LOD is automatically synchronized if there is a terrain neighbour script at your not destroyable object in scene."

    Simply add it into any gameobject at the scene. Info is at 9. TIPS and additional info about unity. Our script automatically recognize fresh loaded terains. I could move this to other section and write few more words:)
     
    Last edited: Mar 14, 2016
  43. sowatnow

    sowatnow

    Joined:
    Jun 12, 2014
    Posts:
    303
    I did what you have written in the manual.

    To be honest, it seems like the manual is written for yourself, not for a new user. Few written lines in the manual doesn't make sense and refers to existing scene you have created.

    The manual should be structured such that it gives quick snap of shot of what is needed for world streamer to work, and step by step guide from start to the end, like create a game scene first or work scene first, give all objects a layer etc and so on. Also how it would work with a scene that doesn't have world streamer etc.

    Maybe I am expecting too much, but I bought it thinking i would set it up in 5 mins as you have advertised it.
     
    John-G likes this.
  44. tapticc

    tapticc

    Joined:
    Jan 16, 2014
    Posts:
    354
    I found watching the YouTube videos more informative and used the manual to fill in any gaps, might help :)
     
  45. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    Soon we will add more videos and rebuild the doc.
     
    John-G likes this.
  46. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    280
    cant wait to use world streamer with the new Terrain Composer 2 (once its out - April)

    could be the perfect combination
     
  47. newonelei

    newonelei

    Joined:
    Mar 15, 2016
    Posts:
    2
    Does it work with light probes for each splitted map?
     
  48. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,553
    I tested now and it works with light probes and ofc lightmaping
     
  49. Gabo_campitelli

    Gabo_campitelli

    Joined:
    Oct 17, 2012
    Posts:
    282
    Hi

    I purchased World streamer but can't seem to get the scene split to work properly. I use World composer for the base terrain mesh and satelital image. So say my terrain tiles are 1k wide. so i input 1000 in the scene spliter and everything seems to work fine when hitting split scene. I can see the terrains properly rearranged with the new structure. Each holding the terrain tile perfect.
    But then i hit generate scenes and what happens is that each created scene contain all the tiles. So basically all tiles contains all the terrain tiles.
    BUT i also hit cancel during a scene generation proces and U5.3 showed all the scenes loaded until then and they were fine. Aparently at the end of the generation process somehow all tiles are put back together in the scenes?
     
  50. runningbird

    runningbird

    Joined:
    Sep 3, 2009
    Posts:
    374
    So I'm confused I've got the streamer partially working

    I took a 2048 x 2048 terrain and split it into 512x512 tiles for a total of 16 tiles.

    I made sure that my terrain that would be for the x0_y0 was set to x0 and z 0
    I then split my scene generated the scenes etc.

    upload_2016-3-15_15-22-50.png

    I then open my "World" scene with the Streamer object with the Streamer script
    upload_2016-3-15_15-24-13.png

    But when I hit play the x0 y0 terrain is wrong is there something I'm missing?

    upload_2016-3-15_15-25-26.png