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

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I fully understand that, i wish you all a great success :)

    We will see 5.6 if it works good, i am not using Speed Tree anyway.

    Why not , i would be interested to have a better quality example in the package.
    Actually World Streamer examples are all mobile examples, there are free quality textures, houses and rocks in the asset store that could be use to propose a desktop example.
     
    Last edited: Apr 20, 2017
    recon0303 likes this.
  2. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    First I will check if I have it and what assets i've used.
     
  3. laurallama

    laurallama

    Joined:
    Nov 28, 2016
    Posts:
    5
    Hello!

    I am considering purchasing this plugin but want to make sure it provides the benefits I am after.
    I have a large 150km scene, with 2400 2k textures and 150 260k polygon models. The scene also has a life-like skybox and ocean water. I want to fly through the scene smoothly with no lags, streaming in/out the models and their textures as necessary.

    I've tried to do this in two ways without success: With the first attempt I created a grid of box triggers that loaded neighbouring scenes containing the models using LoadSceneAsync() when triggered. Loading scenes in this way caused my game to lag when more than one scene was loaded. My second attempt used only one scene and instantiated game objects from the Resources folder (and destroyed them later). This didn't improve the performance at all.

    What is different about your method? Will it work on my scene with so many polygons and textures? Will the game lag when many models and textures are loaded? More specifically, as I want to make sure you are doing something new that I have not done yet, what Unity methods do you use for "loading"? I've also heard your plugin increases the executable size substantially (one user stated their 1GB grew to 7GB) - will my large game grow to be 7 times as large?

    Thank you very much for your help - I hope to hear from you asap as I would like for your plugin will be my solution!
     
  4. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    1GB grew to 7GB...


    Never seen this before and I develop for mobile and PC /Console with World Streamer a few years now... Also, I strip assets down to nothing, which alot of it has demo stuff, and many other things, that you don't use assets etc.. Again never seen it 7GB... WOAH..


    Your world is 150km scene?? Witcher 3 is around 135 KM. and GTA 81 I believe....



    Not saying its not possible ... But I personally wouldn't use Unity for a huge world like that .. Again it's possible, I work on larger worlds in many different engines, and Unity can be a real pain to deal with large worlds as it is.. and your making one 150 km .

    I will let Nature weigh in, as its his tool.

    I suggest using a tool like /granite/Graphine or Amplify Textures 2 for streaming textures. as World Streamer will take care of the terrains, assets such as models and other assets, but I suggest to have a tool streaming your textures if your world is that huge.. Also have one for grass, trees, etc, unless you made your own solution, if not I suggest Unature or InfiniGrass 1 , 2 will be out soon for the grass.

    Either way good luck.:)


    PS: 150 260k polygon models are these environments? and whole scenes, this matters, is any of it modular? So I suggest more information. because some many factors come into play here..
     
    Last edited: Apr 24, 2017
  5. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Such memory amount could show up if somone will make terrible mistake and save huge file for each scene... Basically each scene hold only references so it's few kb file + lightmap+ navmesh+occ so its very cheap. File size depends from amount references.

    Everything depends how much NEW data you load at once and number of layers. If you separate models from terrain it could be ok. Anyway as Recon said for textures its better to use amplify or graphine.

    \what is different? Our system is almost automatic and give you ability o change amount streamed data at runtime or easy chage streaming grids to bigger or smaller to adjust streaming to data amount. We stream milions of poligons like in scanned cloud point viewers, they are not the problem. Only textures are the most expensive thing. Mostly not at models but at terrain.
     
  6. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Today we upload new version with few fixes:
    1.9.2
    - Spliter fix for linux devices
    - Culling manager fix (some devs said that terrain is invisible in few situations)
     
    recon0303 likes this.
  7. laurallama

    laurallama

    Joined:
    Nov 28, 2016
    Posts:
    5
    Thank you @recon0303 and @NatureManufacture for your replies!

    The 1GB-7GB example I am referring to is from the top review on the World Streamer page on the Asset Store (by Pecek) - https://www.assetstore.unity3d.com/en/#!/content/36486

    Since 150km is so large, I will instead be working in 1/10 scale and will be flying through a world with the same 150 260k poly meshes, but this will fill only 15km. Do you believe this change will help my performance using your plugin?

    As for separating models from terrain, thank you for the suggestion and I do plan on doing this - my terrain is of lower resolution than my models so I want stream the terrain with less granularity - and not stream the skybox at all.

    To answer your question, my models are represent high quality chunks of the environment - they make up buildings/rock/trees etc.. I'm not building a game, but rather a realistic 3D world. Since my world is so large I want to view only the nearby models and unload the rest to save on performance - I still hope your solution will work for me but will look into Graphine and Amplify as well! Thank you for suggesting these.

    Still wondering which methods you are using for "unloading" content - are you destroying the objects, asynchronously unloading auto-generated scenes containing the objects, or something new?

    Thank you again!
     
  8. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Are each of your meshes 260k? If so, that will be a problem. Unity has a limit of 65k vertices per mesh. You should break them up into smaller meshes.
     
    recon0303 likes this.
  9. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Ya sounds like he said will pieces when I seen that I was concerned. 265k per model is a ton. But I figured it was environment pieces of sort which is what we do, the whole area is about that, so sounds like its in pieces, not just one model/ by the sounds of it. Which is common for games with higher poly scenes.. We do have pieces well over 500k, but they are not one model, some of it is modular buildings and assets alike . Where we can combine meshes,

    .
     
  10. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634

    That review is a year old the manual has been updates since and as far as 1- 7GB.... I been using World Streamer a few years....I have never seen any asset that was 7gb now 1gb sure some if they are full of huge DEMO's...Which aren't going in your game... But 7GB..... He must of had something else downloaded or going on..I know the few people I helped with World Streamer, it ended being user error...Not saying World Streamer don't even have issues, but some people in Unity asset store jump the gun to fast before asking for help or never asking... Again, I use this tool a ton, and never seen 7GB... I have seen 1GB a long time ago, and it was DEMO and other assets..But once we striped it down, to things we needed, it was nearly nothing but some scripts... Which wasn't that big at all.. The ones we needed... So keep this in mind... Also Unity drops in some stuff as well with Standard and other nonsense, which you can block from downloading some of it..

    PS: as long as you stay with it Unity's limits with terrain size and as Teila said. Poly count size for meshes, you should be able to do what you like with this tool. Keep in mind with building large worlds, it takes alot of patience and time, not saying you can't as I dunno your experience and if your doing alone or not. But I would consider, the world size , of 150 KM.. reason as I seen in Unity it being a pain with any tool... more tiles you use and assets.....

    I build many larger worlds, 8KM x2 - 60 KM X2. I don't use Unity for the larger size ones, due to performance issues.. and you need a beast of a machine, which I have but it still can cause you issues..Now if you have a ton of experience with this.. More power to you.. I personally would not build a scene that is 150km, in Unity .. Which is why games like GTA and Witcher 3 have there own..

    Not sure what the max is with Nature tool that he thinks you can do, which many factors will come into play poly count per tile, grass, trees, and as I said streaming textures.... I would consider using Unreal 4, for a scene like this but still use a smaller scene... more than 50KMx2 even then its pushing it.. From my experience. But Nature may think you can handle more..

    If does great, I like to see after your done, as I love seeing large worlds progress as that is where my interest is.

    This is what I would do, is make your game 1/10 scale, and test how big you can go with out any massive performance hits... That is what we do with mobile large worlds and any game really.. We test the crap out of it, to see what limits we can push.

    Either way love for you to keep us updated on your progress. If you buy this and I suggest you do , as 30 bucks is a steal and the best tool on the store for larger worlds like this.
     
    Last edited: Apr 24, 2017
  11. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    7Go is not a game ready asset.
    I would say it looks like a whole level made of unique materials and assets everywhere.
    Each house, roof, window , trees , plants etc ... each is a unique model, instead of using modular assets and prefabs.
    World Streamer won't help a lot for that type of asset.
     
    recon0303 likes this.
  12. recon0303

    recon0303

    Joined:
    Apr 20, 2014
    Posts:
    1,634
    Ya if they are unique assets and materials with no atlas's modular with a large models like that, I doubt that is game at all, that is why I asked for more info, as far as environments, modular etc..I agree with you.. Sounds like its not by what he said.
     
  13. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Can work in mobile? (performance)
     
  14. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Yes it works :)
     
  15. broesby

    broesby

    Joined:
    Oct 14, 2012
    Posts:
    118
    How does World Streamer work for a flying game??

    High up in the air more of the surrounding world must be visible. That means more chunks of terrain must be active than with ground based games... Ofc depending on terrain chunk size... ;)
     
  16. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    I think you should try like this:

    From 2:00 change terrain to low poly mesh and replace HQ terrain in far distance by LP. World streamer give you ability to do this.
     
    broesby likes this.
  17. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    When do we get rid of all the deprecation warnings? They are pretty annoying : D
     
  18. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Actual version ( updated 1 week ago) have only one warning which is fixed but i haven't got time to upload it.
     
  19. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Hmm, I just updated and have around 23?
     
  20. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    o_O. what unity version?
     
  21. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
  22. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Sorry, it seems like the asset did not update for some reason! False alarm : p

    Edit: Yeah, a lot better now! Only 3 warnings, i can live with that for sure . )
     
    Last edited: Apr 30, 2017
  23. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Send us image with them we will fix them aswell:)
     
  24. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Assets/WorldStreamer/Scritps/Physic/PhysicCullingSystem.cs(21,12): warning CS0108: `PhysicCullingSystem.rigidbody' hides inherited member `UnityEngine.Component.rigidbody'. Use the new keyword if hiding was intended

    Assets/WorldStreamer/Scritps/Streamer.cs(651,18): warning CS0618: `UnityEngine.SceneManagement.SceneManager.UnloadScene(string)' is obsolete: `Use SceneManager.UnloadSceneAsync. This function is not safe to use during triggers and under other circumstances. See Scripting reference for more details.'

    Assets/WorldStreamer/Scritps/Streamer.cs(706,19): warning CS0618: `UnityEngine.SceneManagement.SceneManager.UnloadScene(string)' is obsolete: `Use SceneManager.UnloadSceneAsync. This function is not safe to use during triggers and under other circumstances. See Scripting reference for more details.'

    Thanx : )
     
  25. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Hello. Just bought your package and I've already experienced a major problem. It takes a lot of CPU time while Async loading new scene. It's just immensely big. Tried it out on a demo scene, it all works good enough until the loading/unloading is triggered. CPU time quickly jumps from 5ms to 30ms. What can I do?

    EDIT: Sorry, my bad, it seems it affects Editor only, it works flawlessly in build. But still, is it okay for it to cause such a drop in editor?
     
    Last edited: May 3, 2017
  26. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    I dont think this is the fault of the asset. Overall everything takes more cpu when running in the editor regardless.
     
  27. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Manual manual manual:D Read it!:D Ok but without kidding, yeah unity doing many things at runtime which are made during build process like: batching, collider baking, tracking dependecies and much more. You could temporary fix some of them in editor - temporary means that you have to change this options back, if you want to build your game, because without this you will lose performance. Everything is manual:) - yes i will force everyone to read all pages of my "book" about streaming. Effect will be cool better performance = more space for details and heavy solutions.
     
  28. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Now I feel guilty about it. Sorry. Thank you for your help.
     
  29. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Hehe:D feel free to ask any question:) Everyone must read it and not because of questions which are nothing special but because everyone must catch idea behind system. This will really give you extra power not only beacuse streaming:)
     
  30. txarly

    txarly

    Joined:
    Apr 27, 2016
    Posts:
    197
    hi,

    Can the floating point fix manage the navmesh with the last versions of unity?

    thanks
     
  31. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Should as navmesh could be saved with an object. I must check but yes almost for sure.
     
  32. txarly

    txarly

    Joined:
    Apr 27, 2016
    Posts:
    197
    Perfect.When you check it, can you give a little guide or steps how to do it?May i have to navmesh each tile and make it child of every tile terrain? thank you very much
     
  33. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    I will try to do it until end of week. I must finish first something very important;p
     
  34. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Unity git with scripts for 5.6 https://github.com/Unity-Technologies/NavMeshComponents
    Thread: https://forum.unity3d.com/threads/welcome-new-navmesh-features-experimental-preview.438991/
    It works fine:) - Add Navmesh Surface script into terrain and click bake:) - btw check also other functions from their documentation
    Here is image how it works: https://gyazo.com/b3d333d57861324e0b28e17fc584e7e4
    We updated our manual
     
    Last edited: May 12, 2017
  35. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    I assume it works fine with multiple tiles and the off mesh links as well?
    Its a bit hard to see whats going on there : )
     
  36. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Yeap you can even move it:D so our floating point fix system supports also unity navmesh:)
     
  37. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Great! Time to upgrade to Unity 5.6 then : )
     
  38. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Just play with this and send me some feedback:) this looks superfast like in unreal engine.
     
  39. txarly

    txarly

    Joined:
    Apr 27, 2016
    Posts:
    197
  40. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    So I just purchased this a few days ago, but having some trouble figuring out how to do what I want with it. I want to stream in chunks of things, but not quite to the "normal" way. I have a player that moves in 3 dimensions, but along a known path. I have terrain and other objects at various manual LODs (not Unity controlled) that I need to swap in and out based on the player's position along this known path.

    Does WorldStreamer have some sort of API I can use to trigger streaming events from script as I need them? I couldn't find anything in the documentation.
     
  41. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    I thought a bit more about how I would work with this to do what I want, so let me clarify since that is always more helpful than vague queries :)

    Ideally World Streamer would do two things.

    First, allow me to manually select GameObjects in the hierarchy and make them World Streamer streamable assets. The auto grid system is nice, but requires a lot of setup and doesn't always work perfectly for me due to several factors. Being able to manually turn selected assets into streamable assets would be fine, and IMHO that is something that should be there regardless.

    Second, two simple API calls that can be called from C# scripts that would load or unload a List of World Stream streamable assets. I say a list because I would need to load and unload multiple assets at the same time, and presumably knowing the entire list at once is beneficial to your back end.

    Thanks!
     
  42. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    You could use ring streaming for manual LOD:). You always also have collider streaming which is based on trigger:) Asset are saved at scenes which holds only dependencies nothing more. There is not list of asset atm but list of scenes. List of assets could be too huge.
     
  43. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    Sorry when I say streamable assets I mean the scenes World streamer creates, but I don't understand how either of those could be used for what I need. The ring streamer just loads scenes a fixed distance from the object of focus which isn't what I need, and the collider I looked at but it seemed really complicated to get it to do what I want. I would need a very large amount of colliders, probably hundreds, which would take a lot of work to set up. Even then I don't see anything in the manual about how to make a collider trigger an unload of scenes.

    Is World Streamer not able to do what I need? It would seem like having an API call would be rather easy. Surely you there is something used internally that could just be exposed?
     
  44. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    "streamable assets" are just regular Unity scenes loaded additive, so should be pretty easy to just do that manually?
     
  45. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    I'm sure I could research i and figure out how to do it myself. But then why did I buy this asset?
     
  46. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    From your discription i really dont know what are you doing:p
    Ring streaming allow you to replace object by distance for example load LOD0 and unload LOD1 etc. Helpfull to replace HQ heavy terrain by LP meshes:) in far distance
     
  47. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    Let me try to explain it, but i'm not sure how well I will do.

    Think of a plane taking off and climbing up to 35,000 feet. The plane is heading East and you are in the tail of the plane looking backwards, so you are looking West.

    Initially while sitting on the ground, you won't be able to see West very far. What you can see is my initial Level 0 terrain.

    As you take off and start gaining altitude, you will be able to see farther West due to your increased height. Your horizon is farther away. So as you increase in height and the plane is moving East, you can see farther west, Initially this exposes another strip of land west of your initial positions which I have as a Level 1 terrain, so we need to stream that in. Now again the plane is going East not West, but you are looking West and you are able to see more not because the plane is traveling that way but because you are higher up.

    As the plane continues getting higher ands moving east your initial position which was Detail 0 is pretty far away now and can be swapped out for Detail 1. Additionally the original Detail 1 can probably be dropped to Detail 0, and even more further west of that is now visible due to your height so that needs to be streamed in. As you continue, the Detail 1 at your initial position can no be reduced even more to Detail 0.

    All of this occurs as the plane is moving Away from the terrain, but also moving Higher Up which is what allows you to see more.

    Does that make it more clear? As I understand it from the documentation, the Ring streamer works by streaming in assets in a given ring based on minimum and maximum distance from the player. But the player is going the opposite direction of what needs to be streamed. Is there a setting to have the ring streamer's min and max X/Z values to increase outward as the Y value increases?
     
  48. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    In re-reading my above explanation I think I made it more complicated than I needed to do, so let me try again talking specifically about how I understand the Ring streaming to work.

    Imaging you are in something like a rocket, or a super tall all glass elevator. Regardless, basically you start on the ground at Y position 0 and you move straight up. Now you have a Ring Streamer at your position that is set to stream stuff far enough out that it covers your visible horizon.

    Now as you start moving upwards, that ring stream would need to expand because your horizon is expanding and you can see farther out. Additionally the stuff below you could be reduced in LOD because as your Y position increases, you are getting farther from it.

    Does the Ring Streamer allow this?

    Now my situation is a bit more complicated because as I said I have a predefined path and I wanted to do something a bit more efficient that just a simple ring around the player, but if the ring stream has the ability to expand as the Y position increases, then maybe I can make that work.
     
  49. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Hello @NatureManufacture !!
    Threading Helper will add CPU multi-threading functionality. All I want is the codes of World Streamer which can be multi-threaded.
    Generally it should be "SeceneManager.Load..." but I don't want to mess up anything So I just ask if turning all of the "loadScene" functions into multi-threaded ones is recommended by you or not.

    This way I guess there would be no lag while streaming layers. So I'd be glad if you tell me where the codes of loading terrains in realtime are And also which one of them is for streaming what layer.
     
  50. imDanOush

    imDanOush

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