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. hollegar

    hollegar

    Joined:
    Nov 15, 2011
    Posts:
    34
    We load scene in Streamer.cs - LoadLevelAsyncManage method with SceneManager.LoadSceneAsync.
     
  2. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Okay cool. Thanks.

    Update: I just checked them, looks like it is well optimized. There is no need for me to add another multi threading option to it. So it's fine.

    Update 2: If some of the WorldStreamer users use RTP Relief Terrain shader, They better not to worry if "ReliefTerrain.Awake()" gets 80% CPU load when playing in the editor in the "play mode". That spike will - theoretically- fade away once you build your game and you'll no longer in the editor. And remember to always use threads and dispatch they do add performance to your game specially for high end mobiles and PCs.
     
    Last edited: May 20, 2017
  3. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    I'm not sure what you mean. If I set the ring streamer to what would be seen from the maximum player height, then I will have everything loaded and nothing streamed.
     
  4. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Let me tell you with a help of a picture. Here in the picture below I tried to describe it.
    We assume that the player is at the center of the black rectangle.

    IMPORTANT NOTE:
    This is only a top view image of the World Streamer concept with no grids shown for the sake of simplicity. Which means this concept is 3D and not 2D.
    What I meant in my previous post is to make the orange layer (the ring streamed layer) bigger. And don't forget to add a fog effect to blend the empty scene with the ring streamed layer.


    (An image from the World Streamer manual with a little bit editing - The Ring Streamed layer)​

    Hope that helps.
     
    Last edited: May 20, 2017
  5. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    Thank you for the picture, I see what you mean. Unfortunately I don't really have any low poly layers, but instead have three levels of details that I need to stream in and out based on altitude and distance. But even the lowest level detail is still multiple unity terrain tiles. So what you propose above would essential end up with what I already have done manually.
     
  6. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Each layer could have different size so you could use huge 1 tile at the end instead of many smile.
     
  7. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    My tiles are created by WorldComposer, so I don't have a lot of control over what I have. I have three levels of detail terrain and I just want to swap them out because otherwise texture usage gets too high.
     
  8. Fr2

    Fr2

    Joined:
    Jan 19, 2013
    Posts:
    39
    Is "Terrain to Mesh" is compatible with World Streamer when used to split a terrain? For example, if I start with a Unity terrain of 500 x 500, and use T2M to split the terrain into 4 mesh chunks, I've noticed that each mesh chunk generated has a position of 0,0. When using the WS Scene Splitter, the scenes are not created correctly.

    Using SplitTerrain.cs each terrain chunk appears to have the correct position (e.g 0, 250 etc) and I can then use a custom script to convert each of these terrains into meshes, and scene splitter then works as expected.
     
  9. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Yes we even use it i our tutorial video for ring streaming. Hmmm we must check but maybe you could move your terrains by 0.0001 and everything will be split correctly.
     
  10. Fr2

    Fr2

    Joined:
    Jan 19, 2013
    Posts:
    39
    I made a quick editor script to move each of the mesh chunks into their "correct" positions (e.g. 0, 250) and also to iterate over each of the mesh vertices, removing the offset value for each (e.g. 250). Seems to work fine with WS now.
     
    Last edited: May 25, 2017
    NatureManufacture likes this.
  11. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Cool;)
     
  12. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    I have set the WorldStreamer to load terrain chunks like this:
    Then when I hit play, everytime a terrain is being loaded a huge spike occurs (Image below). Would be glad if you advice me what to do for removing the spike? I've put RTP.awake() methods in a coroutine function. But that apparently doesn't
    help.
     
    Last edited: May 26, 2017
  13. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Images are invisible.
     
  14. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Yup, sorry. Just edited the post. Please refresh this page to check the images out.
     
  15. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Did you tried at build? Splatmap resolution at terrain is? how big terrain is?
    Too big splatmap texture (this which manage masks at terrain) could generate GC and this spikes.
     
  16. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Btw open this rtp arrow:) to check what is inside rtp spike.
    There is better and faster shader then rtp for AAA quality:) CTS - available in 1 week I made it with Adam Goodrich. Its even faster then unity terrain and with AO and Heightmaps it take same memory amount as albedo and normal. It supports also substances. Thats why im overloaded in last day
     
  17. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    No I didn't tried at build. Splatmap res is 2048. the terrain is 500x500.

    I've used a high res splat map for paiting the terrain in detail Therefore I would no longer make meshes as decals for the terrain(s). I was on the opinion that this way I'd use less meshes therefore more performance would be added to the game.
     
  18. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    2048 splatmap for 500x500? Hmm it should be like 256, 128 or max 512. This is RGBA uncompressed texture which you have to load in background.
    This is cts usage: Crow1.jpg Crow2.jpg
     
  19. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Oh okay cool.
    Here you are.

    All these three spikes in the profiler are the same.
     
  20. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Looks like too big splatmaps. Anyway test it at build.
     
  21. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Okay thanks. Fortunately I have a cool script that lets me change the splat res of all these 651 tiles at once.
    I'll try it to see what will happen. I then inform you.
    Okay. And cool screenshots. Correct me if I'm wrong, I feel Height Blending needs a bit of work.
     
  22. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Screens was without heightblend.
     
  23. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Gotcha!! Very good. Does your game have a website? looks cool.
     
  24. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    This is not mine game:) I just give them shader before it's release. Its huge mmo game with 12mln budget: https://www.crowfall.com/
     
  25. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Cool.

    EDIT: Reduced the splat maps from 2048 to 512 and now the spikes are less noticable, still there are though. Have a look at the image below. Thanks for the note, though.
     
    Last edited: May 26, 2017
  26. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Any ideas on how to handle saving of object states? If i for example in one of the scenes mine some ore, then goes somewhere else so it gets unloaded and then when i get back, it will load the same scene again and suddenly the ore vein will be un-mined again.

    Ofc i can track all object changes, but how to make sure that i can access that exact same object again? There seem to be no unique ids that i can use thats persistent enough through scene loading/unloading.
     
  27. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    You probably have heavy texture somewhere at RTP which system loads with terrain.
    Online or offline game? Maybe you should have id per object and check state when it have been loaded.
    - 1 script which hold ID and state
    - 2 script which check own state by id when it have been started (loaded object)
     
  28. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Actually the spike gone after I "build" the game. So only in Editor it shows up.
     
    Last edited: May 31, 2017
  29. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    We mentioned that many times in manual - edittor makes many additional operations at runtime and memory acces is slow. I thought you show this from build;p
     
  30. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Yeah I've read that. I should have mentioned that it was for the Editor, anyways No problem.
     
  31. lawsochi

    lawsochi

    Joined:
    Oct 24, 2016
    Posts:
    107
    Hi, i'm interested in buying your product.
    I have a scene of 6x8 km, but very saturated with objects and npc. So I think I need a dynamic download. But, I'm noob, and I have a question:
    1. I have about 500 npс (ICECreatureControl) on the scen, and I want them to do their own things (go, fight, hunt, search corpses, etc.) regardless, on any distance are they from the player. Ideally, grids, textures and animations should be unloaded at a certain distance from the player, but logic should work.
    2. After certain intervals of playing time, I have to remove corpses, add nps, and at any time in any place of the map, I should be able to place any game object, again regardless of the location of the player.
    question. Is there any technical obstacle from your product to the realization of these conditions? I skimmed through the documentation, including sections 9 and 10, but never came to understand.
    Thank you.
     
    Last edited: Jun 9, 2017
  32. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Nope just we things have to be done. There are few things:
    a) navmesh which you couldn't unload because npc probably need reference for movment
    b) you could but you dont have to: at far distance is good to replace your whole npc by markers with the same properties but you reduce gameobjects alot (GC is cheaper)
    c) with such small world you dont need floating point fix
     
  33. xAvatarchikx

    xAvatarchikx

    Joined:
    Aug 17, 2012
    Posts:
    69
    Hi! How to build a tutorial under webgl, I do not see the landscape when uploading, although the character is there but it flies to the bottom
     
  34. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    It works at unity editor?
    - do you have scenes in build settings?
    - do you have all tags included in manual in all prefabs?
     
  35. xAvatarchikx

    xAvatarchikx

    Joined:
    Aug 17, 2012
    Posts:
    69
    In the editor work, scenes are added,
    In the webgl scene is loaded but the landscape is not loaded
    Could you build a webgl with a fps counter?
     
    Last edited: Jun 20, 2017
  36. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    How about tags? They create such problem. Without them it could work editor but not at build.
     
  37. xAvatarchikx

    xAvatarchikx

    Joined:
    Aug 17, 2012
    Posts:
    69
  38. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    could you create dev build with console and check if there is any error or warning?
     
  39. xAvatarchikx

    xAvatarchikx

    Joined:
    Aug 17, 2012
    Posts:
    69
  40. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
  41. xAvatarchikx

    xAvatarchikx

    Joined:
    Aug 17, 2012
    Posts:
    69
    It worked! Simply the character fell through lanshaft, the character had to be placed higher, so that the landscape will be loaded in comfort, or add a button to the ui start, or somehow monitor that the landscape is plunged
     
  42. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    You could manage that in loading screen script:) Anyway this shoudn't happend:)

    BTW this week we release this:

    In co-op with @AdamGoodrich
     
    Teila likes this.
  43. xAvatarchikx

    xAvatarchikx

    Joined:
    Aug 17, 2012
    Posts:
    69
    Hello! And under the webgl will work "CTS"? And you would not be able to share a demo World Streamer - an example of a small planet. ?
     
  44. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    We cannot give demos with third party assets like curved world. Yeah cts will work;)
     
  45. YPGames

    YPGames

    Joined:
    Mar 14, 2015
    Posts:
    7
    Hi!
    Although it is compatible with Occlusion Culling, it does not apply even if you play it with "GamePlay" Scene after Bake on "Work" Scene.
    With it
    Currently, I am creating a terrain other than "UnityTerrain".
    Since "Terrain Culling System" script can not be used, I think that "Object culling system" script described in Update "1.7.4" is present, but it does not seem to be so.
     
  46. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    It works with occ, but you have to bake occ and it should be loaded with scene like navmesh and other things that are saved in scene file. Anyway only new unity versions support occ loaded in background.
    Terrain culling and object culling system is not equal to occlusion culling it's just a helpfull cripts but not occ. Occ should be baked at scenes and loaded with scenes.
    During weekend we release this with Adam Goodrich
     
    red2blue likes this.
  47. lawsochi

    lawsochi

    Joined:
    Oct 24, 2016
    Posts:
    107
    Looks great, bravo!
    Plea, think about the opportunity to help unity and develop a normal system of grass and trees (especially Speedtree). They can not))))
     
    Last edited: Jun 23, 2017
  48. Stanchion

    Stanchion

    Joined:
    Sep 30, 2014
    Posts:
    269
    Has anyone use WorldStreamer with multiplayer? Please message me
     
  49. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
  50. chiefarchon

    chiefarchon

    Joined:
    Jun 22, 2009
    Posts:
    80
    Hi there

    Unity 2017 is due out in July, but betas have been available for testing.

    • Have you had a chance to test your product on the Beta?
    • Will Your product be ready for this release (Unity 2017)?
    I would like to use your product in my new project but I will hold off from starting till Unity 2017 is released as I have heard that upgrading a project can be difficult at times and I want to avoid this for as long as possible.