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:
    2,026
    So what did you do with our neighbour script:D? or this terrain is in exception:D?
     
  2. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    No, i fixed that by removing it in the script, i prefixed the terrain and just removed any terrain with that prefix. Also, its disabled as soon as i start playing, so it should not be in the activeTerrains list.
     
  3. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    I can share the project if you need, just send me a pm.
     
  4. sowatnow

    sowatnow

    Joined:
    Jun 12, 2014
    Posts:
    309
    Hi there,

    I have around 7 layers. When I click on "Generate Scenes from Virtual Grid", it generate scenes for the first layer, and then immediately it clears scene split and doesn't generate any further scenes. Alternatively I am generating scenes for each layer individually.

    Is this a bug or am I doing something wrong?

    Cheers
     
  5. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Maybe we will send you this script with solution which you need + few fixes from upcoming version? Write to our mail:
    Naturemanufacture@gmail.com
    Um.... Hard to say I saw projects with such layer list but they normaly works hmm.. Do you have layer with empty prefix there?
     
  6. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Sent : )
     
  7. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    I know I was out of office until now. (meeting in other town far away) I will take care about this tommorow.
     
  8. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Np : )
     
  9. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    When does version 1.9 come out (the physics fix)? Since I don't have the asset, I want to know more about the physics problem, is it that much a serious bug? thanks in advance.
     
  10. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    No, there is no bug, its more of a feature to handling streaming of physics objects that cant be a static part of the scene (as i understands it)
     
  11. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    This is not a bug we simply add more features, not everyone need it. I would say not many users need that but anyway this will help a group of developers;) You could stream phisic movable objects but you have to save their position your own now. Most devs have own saving system.
     
  12. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    I was watching your video about changing terrains with low poly object in the distance. I was wondering how to do this easily if your terrains are textured using the Relief Terrain Pack (RTP) v3. None of the tools such as "Terrain To Mesh" can convert non standard shaders to textures. Is there some method to do this you guys know of??
     
  13. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Im not sure. Hmm do you really need rtp render in far distance? All additional efects will be invisible in far plane.
     
  14. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    No I assume it would be converted textures. But from what I understand RTP uses it's own tiling and placement method. So the textures would have to at least match or there would be a pop. But I Don't want to be hand painting thousands of low poly terrains to match. And Unity's Terrain shader is Unacceptable at best.
     
  15. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Hmm try to ask author about rtp maybe it's easy pie to add such support. This should be resonable from his point of view.
     
  16. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    I noticed on an earlier post that someone mentioned it would be nice to place items in at least 1 Unity Empty Object. I agree with this. Creating the "Work" File is awkward at best when you have 1,000's of objects and 1,000 of terrains. Things would be much more organized if this feature was added.
     
  17. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Yeah I know but you also have local area updater and this things:p Anyway we will probably add this feature (catalog option as alternative for layer object)
     
  18. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    You can use RTP on a mesh as well, so just export the the splat maps from your terrain and apply them to the mesh using the same RTP shader.
     
    EddieChristian likes this.
  19. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Here is a small utility script for renaming all children in a selected GameObject, can make the process a LOT faster : )
    I just set up 3 empty GOs that i nameLarge, Medium and Small. Then i just make sure correct asset goes into correct GO, and when im done i use this script to rename all objects and also move them out to the root. Saving time and making things more organized : )

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEditor;
    3.  
    4. public class RenameStreaming : EditorWindow
    5. {
    6.     private static string[] strings = new string[3];
    7.     private static int index = 0;
    8.     [MenuItem("Window/Victor/Rename")]
    9.     private static void Init()
    10.     {
    11.         // Get existing open window or if none, make a new one:
    12.         RenameStreaming window = (RenameStreaming)EditorWindow.GetWindow(typeof(RenameStreaming));
    13.      
    14.            window.minSize = new Vector2( 100f,100f );
    15.         window.maxSize = new Vector2( 200f,200f );
    16.      
    17.         window.autoRepaintOnSceneChange = true;
    18.            window.titleContent.text = "Rename";
    19.  
    20.         strings[0] = "Small";
    21.         strings[1] = "Medium";
    22.         strings[2] = "Large";
    23.  
    24.            window.Show();
    25.     }
    26.  
    27.     private void OnGUI()
    28.     {
    29.         index = GUILayout.SelectionGrid(index, strings, 2);
    30.         if(GUILayout.Button("Rename"))
    31.         {
    32.             Transform go = Selection.activeGameObject.transform;
    33.             if(go)
    34.             {
    35.                 int childs = go.childCount;
    36.                 for(int i = 0; i < childs; i++)
    37.                 {
    38.                     Transform current = go.GetChild(0);
    39.                     current.SetParent(null);
    40.                     current.name = strings[index] + "_" + current.name;
    41.                 }
    42.             }
    43.         }
    44.     }
    45. }
    46.  
     
    Last edited: Nov 30, 2016
    NatureManufacture likes this.
  20. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    So I am following the video and setting up my first world area. It runs fine but throws this error each time:

    Code (CSharp):
    1. ArgumentException: An element with the same key already exists in the dictionary.
    2. System.Collections.Generic.Dictionary`2[System.Int32[],UnityEngine.Terrain].Add (System.Int32[] key, UnityEngine.Terrain value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
    3. TerrainNeighbours.CreateNeighbours () (at Assets/WorldStreamer/Scritps/TerrainNeighbours.cs:91)
    4. Streamer.AddSceneGO (System.String sceneName, UnityEngine.GameObject sceneGO) (at Assets/WorldStreamer/Scritps/Streamer.cs:298)
    5. SceneSplitManager.AddToStreamer () (at Assets/WorldStreamer/Scritps/SceneSplitManager.cs:55)
    6. SceneSplitManager.Start () (at Assets/WorldStreamer/Scritps/SceneSplitManager.cs:42)
    7.  
     
  21. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    When it throws that error? You have more then one terran neighbour script at the scene? it should be only at streamer which stream terrains, nowhere else. It seams you duplicated something.
     
  22. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    I haven't added any terrain neighbors script at all.

    *** Never Mind I'm dumb there was an old terrain in the game scene file buried in a folder. Working perfectly now. :)
     
  23. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    :) I'm happy that you handle that:)
     
  24. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    So, im trying to lightmap some stuff but the maps dont seems to work, which is kind of expected i guess since they wont get packed with the scene. What are the steps to take to make lightmapping work?
    Edit: Doh! Just make the lightmaps in the appropriate scene of course : D
     
    Last edited: Dec 2, 2016
  25. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    Actually I would love to get some tips on using Enlighten, Light Probes, and Reflection Probes etc in a scene with spawning objects. Do I need to place all this in the work scene? Can I hide sections of terrains and process the lighting for just those objects, then unhide the rest? I noticed Unity crashes with 2048 terrains with the autobuild lighting turned on. If I save the scene under a new name do I have to recalculate all this. I'm not sure if all this data is stored in the objects or the scene file. And most articles assume that all the objects are already in the scene and Not spawned.
     
  26. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    You cant build lightmaps in the work scene since they will belong to that scene only.
    You need to bake each scene separately. Also, you need to make a bake in the game scene, or the lightmaps from the other scenes will fail to load.
    Baking in separate scenes can be an issue because all objects are not present though. So either you have to lift those objects in for the bake, or bake in the map scene and then copy over the lightmaps to the correct scene, which can have its own issues if the number of lightmaps does not match.
    Well, its a bit of a hassle : D
     
  27. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    I'm assume that Baking is different from the Pre-Compute that Enlighten is doing. I'm assuming the Precompute is for the Real Time Lighting. In that case do I still have to do this in all scenes. Because that would be over 1500 scenes already in my game. I am doing a large world with a Day/Night cycle.
     
  28. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    As long as you do any pre-calculation that ends up in some file thats connected to a scene, you cant do it in the build scene, cause the build scene is not loaded in to the game. Maybe its possible to somehow get that data to load in the game scene, but i kind of doubt it since the relevant mesh data is not there, but im no expert and dont really know how that stuff works under the hood.
    This is just what i found after quite a bit of experimenting.
     
  29. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    This is from the Unity Blog:
    Q: Can I download (stream) chunks of level additively?
    A: Yes, systems can be streamed in additively. The systems can be made so that they do not straddle your streaming chunks. This can be done manually or with scripting. (This feature should be available in 5.0.)

    Of course I can't find any NFO on exactly how to do it. :(
     
  30. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    That exactly what world streamer is doing.
     
  31. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    Except this is talking about the Real time version of Enlighten. It also mentions setting this up in code as well. But I can't find the details. I may have to write Geomerics to sort it out. They have several mentions of doing streaming worlds on their site. The even show an unreal video of this exact situation.


    Here is their blog post about Streaming Worlds..
     
  32. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Lightmap are stored in scene file. Hmmm there are 2 ways.
    a) Load all level and bake all of them - bake button. In unity doc there is info this solution should work properly.
    b) Load only areas that will affect current virtualgrid/scene and bake them one by one or in bigger groups. Something like this: https://gyazo.com/666b8d3e9b062d51fe53477c606e1ad2
    Probably as you said load everything at once and click auto button could be problematic for unity. Im sure they left a bug there:D You could bake the same version of realtime GI without auto button. Auto is used to refresheing data during workflow in my opinion.

    Yes we load level additively, that's why users will have smooth gameplay during streaming.

    We probably should create another tool only for light baking like hmmmm....
     
    Last edited: Dec 7, 2016
    EddieChristian likes this.
  33. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    Talking about Enlighten is always odd at best. The fact of the matter is that there are 2 options , The Precompute and the Baking of maps. Enlighten doesn't need the 2nd option at all. The baking of maps was stuck on for mobile games, from what I can tell. So NFO on the Precompute pass is most relevant to me. Weirdly Unity has very little in the way of controls for it, and it seems to be tied to the scene file instead of the objects themselves. So I am left wondering:
    Can I Precompute in sections or will that give seams in the lighting?
    When World Streamer splits everything to scenes is that data transferred to 2,0000 Terrain scene files?
    Or do I manually have to turn this on 2,000 times?
    From what I am reading using the Precompute Pass and Baking Maps is adding heavily to ram usage at runtime. So I am hoping to just use the Precompute pass for the Realtime GI..
     
  34. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Well, baking maps will give all objects an extra texture that needs to be loaded, but on the other hand, it removes the heavy light calculations at runtime, so we get a big performance boost from it. We only bake the interiors though, at least for now, so i have no idea about seams. But we bake each scene individually since, as you say, the lightmaps are tied to a scene. If you bake lightmaps in the build scene and split it, no lightmap data will be transferred.
     
  35. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    I think you miss something.
    Auto = precomputed realtime gi but it is refreshed during work. When you click build it will be builded with scene. This mean build process (I mean "game.exe" file with library) will take long time probably.
    Precomputed - you could click "bake" by button (bake it before "game.exe" build process). This light/GI will be used at builded game and you will not waste time during build "game.exe" process.
    This both options are realtime GI/light. It save some files at the scene anyway. Try to precompute some scenes and test quality. I'm not sure if this is clear;)

    Edit
    Check this: https://www.assetstore.unity3d.com/en/#!/content/73563
    This iwll help you with GI and streaming.
     
    Last edited: Dec 10, 2016
  36. Maximilious

    Maximilious

    Joined:
    Nov 29, 2016
    Posts:
    28
    I am using time of day with this asset and it works perfect... I have it so the sky dome is in the "gameplay" scene as well as my ocean.

    I have a question tho,

    In my world I have more than one "water" plane, I have the ocean which I play on the gameplay scene (Aquas) and I have another aquas waterplane in top of the mountains as a large lake, making a waterfall then small river off the mountain into the land.

    I tried putting the second waterplane on the gameplay scene but sometimes it changed location as scenes are loaded and unloaded, so I was wondering if you had any suggestions on how I would go about this

    Thanks

    By the way, asset works beautifully... Increased my fps alot on a 8km x 8km island which was originally 16 tiles made in World Machine

    PS

    I have been trying to use the _World_Mover, but sometimes is does not spawn scenes and I end up fallling forever, does anyone have any ideas on what I might be doing wrong? it works without the world mover but I wanted to test it out.
     
    Last edited: Dec 10, 2016
  37. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    It's hard to say what happend. I've streamed by world streamer about 20k water tiles (all were in small parts). Do you use world mover? If yes maybe they are static batched?
    If you have only 8kx8k world you shouldn't use world mover. Umm does scenes have been loaded ? Maybe it take more time to load with world mover and you have to stop or move a bit in Y position your player. Also if objects are static batched we are not able to move them. You could batch them by custom system but basic static batching block object position and we are not able to move them.
    Thanks for good words! Don't forget to rate asset:)
     
  38. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    We just updated our manual. Just info, links and we removed old sentences about cpu spikes because current world streamer version removes all of them even if it stream huge amount of data.
    We also put info about that we support unity occlusion culling in 5.5+ unity version.
     
  39. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    Thanks for the link. One of the Unity bugs I have found is that if you turn on real time lighting but turn automatic Off, It still runs something in the background and bogs down your machine to near uselessness. What I feel I need from World Streamer is an option panel for all the lighting settings for both Real-Time and Light Mapping. And then have World Streamer apply them to all the Split Scenes.
     
  40. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    We will add this in 1.9v,
     
    EddieChristian likes this.
  41. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Just bought your "Landscape Ground Pack 2" and its one of the best stuff i have ever bought. The textures are amazing and the heightmaps especially i think are really well made. This + RTP makes it looks really realistic.
    To anyone reading this and looking for a good terrain texture pack, no need to look any longer : D
     
  42. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    EddieChristian likes this.
  43. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Looks amazing : D
     
  44. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Hello.
    I recently got WorldStreamer but I can't do anything with it. Here is the problem. there is 651 tiles of terrains. I did renamed all of them to terrain_... and then I used scene spliter to make the scenes and I generated the scenes. All okay but when I go to the "play" scene and test it. It first loads the scene and then removes the scene and next loads one of the generated scenes instead. Therefore I see "No full screen camera" error in the scene view. But when I use the example scenes, everything is fine. what the freaking problem could be? I spent full 10 hours and regenerated the scenes and no luck so far.

    Unity 5.3.6p2 is the version of the Unity I use.
     
  45. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Hi.
    Please send us screen with world streamer setup. Maybe you type some values wrong.
     
  46. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Will be sent within an hour via PM.
     
  47. NatureManufacture

    NatureManufacture

    Joined:
    May 20, 2014
    Posts:
    2,026
    Ok we will take a look on it;)
     
    imDanOush likes this.
  48. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Any news about the next version? : D
     
    imDanOush likes this.
  49. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Thank you. The problem is now fixed. This asset is indeed great.
    Two questions:
    1) Is it bad to have one "Major Streamer_terrain" for terrains and one bigger "Major Streamer" for AI and Traffic stuff?.
    2) The "Player" of my project is spawned after a while and is not in the hierarchy in the editor mode. ( I mean it will come up in the hierarchy only in play time after a while), How would I assign it to a streamer? And also how to keep it not fall under the terrain - in case if the terrains get loaded after the player has been spawned?.

    Thanks in advance.
     
  50. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Check out the teleport and ui script. They can be used to place the player after the terrains are done loading. One of them have a callback function when load is done.
     
    imDanOush likes this.