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] 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. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    I just want to help, the ultimate answer is always written by @NatureManufacture . So I also answer here,too. My answer to your question is No, it can't do that. And there is no need for doing that unless the objects are too much (which shouldn't be as "ring streamed objects" ideally should be very very low poly and only have 1 drawcall). Just expand the loading range of the "ring streamer" as much as if player were in the maximum height position, then you should add a fog effect to "blend" the "ring streamed" objects with the empty screen. You may also be able to dynamically increase/decrease the range of a ring streamed layer by a custom script based on the player position, but I'm not sure if changing loading range is possible or not at this time. That is a good solution I guess.
     
  2. hollegar

    hollegar

    Joined:
    Nov 15, 2011
    Posts:
    30
    We load scene in Streamer.cs - LoadLevelAsyncManage method with SceneManager.LoadSceneAsync.
     
  3. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    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
  4. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    661
    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.
     
  5. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    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
  6. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    661
    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.
     
  7. NatureManufacture

    NatureManufacture

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

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    661
    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.
     
  9. Fr2

    Fr2

    Joined:
    Jan 19, 2013
    Posts:
    22
    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.
     
  10. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
    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.
     
  11. Fr2

    Fr2

    Joined:
    Jan 19, 2013
    Posts:
    22
    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.
  12. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
    Cool;)
     
  13. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    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
  14. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
    Images are invisible.
     
  15. Mr_Dan_O

    Mr_Dan_O

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

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
    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.
     
  17. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
    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
     
  18. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    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.
     
  19. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
    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
     
  20. Mr_Dan_O

    Mr_Dan_O

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

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

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
    Looks like too big splatmaps. Anyway test it at build.
     
  22. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    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.
     
  23. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
    Screens was without heightblend.
     
  24. Mr_Dan_O

    Mr_Dan_O

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

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
    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/
     
  26. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    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
  27. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,961
    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.
     
  28. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
    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)
     
  29. Mr_Dan_O

    Mr_Dan_O

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

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
    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
     
  31. Mr_Dan_O

    Mr_Dan_O

    Joined:
    Oct 12, 2013
    Posts:
    347
    Yeah I've read that. I should have mentioned that it was for the Editor, anyways No problem.
     
  32. 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
  33. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
    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
     
  34. xAvatarchikx

    xAvatarchikx

    Joined:
    Aug 17, 2012
    Posts:
    60
    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
     
  35. NatureManufacture

    NatureManufacture

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

    xAvatarchikx

    Joined:
    Aug 17, 2012
    Posts:
    60
    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
  37. NatureManufacture

    NatureManufacture

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

    xAvatarchikx

    Joined:
    Aug 17, 2012
    Posts:
    60
  39. NatureManufacture

    NatureManufacture

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

    xAvatarchikx

    Joined:
    Aug 17, 2012
    Posts:
    60
  41. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
  42. xAvatarchikx

    xAvatarchikx

    Joined:
    Aug 17, 2012
    Posts:
    60
    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
     
  43. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
    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.
  44. xAvatarchikx

    xAvatarchikx

    Joined:
    Aug 17, 2012
    Posts:
    60
    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. ?
     
  45. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
    We cannot give demos with third party assets like curved world. Yeah cts will work;)
     
  46. YamiuchiProject

    YamiuchiProject

    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.
     
  47. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666
    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.
  48. 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
  49. Stanchion

    Stanchion

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

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    1,666