Jump to content

Not all terrain tiles showing.


randolphjand
 Share

Recommended Posts

On multi-terrain tile with 512 tiles, only 4 are visible in the editor and not all show in game.  I did not change any settings.  

Unity 2021.2.7 and latest Gaia Pro 2021

Link to comment
Share on other sites

Hi, it sounds like you are using terrain loading - per default Gaia will only load in a couple of terrain tiles around the center of the world. There are multiple ways to influence that, you can unfold the panel on the top to enter a different loading range or change loading to happen around the scene view camera, and you can also set up the Gaia tools like stamper, spawner etc. to load terrains around them. You can find more information about this in our article on terrain loading:
https://canopy.procedural-worlds.com/library/tools/gaia-pro-2021/runtime-objects/terrain-loading-in-gaia-pro-gaia-pro-2021-r64/
 

 

Link to comment
Share on other sites

I discovered in the terrain loader I can load all terrains in editor at once or pick and choose which ones but that does not explain why they are not showing in game.  If I load terrains in the terrain loader settings, it will show only those in game play.  Those do not load in and out, they stay regardless of where the player goes.  It is worse with the fly cam than with the first person controller.

Link to comment
Share on other sites

You can switch the loading range to work with the "World Origin" (which is whatever your scene is being centered on, usually X=0, Y=0, Z=0) or with the "Scene View Camera". The latter will apply the loading range around the scene view camera which can be useful if you want to navigate the scene while the terrains load in around you.

I have tried the loading range at 0 which was the default and I set it to 640 but it will not load terrains in as I move the scene view camera around and does not load any terrains that were not visible in scene view before pressing play.

 

Link to comment
Share on other sites

Please note that in your last screenshot it still says "Center Loading On" = "World Origin" on the right hand side in the terrain loader manager, so depending on how large your world is that what is seen in the scene view could still be correct? What happens if you switch it to scene view camera there?
What you also could do to test if terrain loading is not working during design time: Create an empty object and attach a terrain loader component to it. Set the Mode to "Editor Always" and make the bounds large enough so that e.g. one terrain can fit inside, then move the game object around in the scene - it should load everything it "touches" with that bounds.
Same with the loading during runtime - does the flycam or what you use as player type does have the terrain loader component attached to it and is it set to "Runtime Always"?

Link to comment
Share on other sites

I wish there was a good tutorial for creating and working with large worlds. 

I saw the option to use Scene View Camera in the docs but I did not understand exactly what it meant or that it would need to change for multiple tiled terrains.  Unfortunately something is wrong.  I created a new project to test and first loaded runtime setup and chose the fly cam, the fly cam settings were all at 0.  I created a 7x7 terrain and not all tiles would show in the editor even with load on scene view camera checked and I raised distance to almost 1000 but still not all tiles loaded.  I chose editor always and that did not help.  I even tried Load All but not all of the tiles loaded.  I have a Ryzen 7 with 32gb ram and it does not seem that there are any memory problems.  Some of the tiles that do show up in the editor do not have the default texturing on them.  I did not bother running the biome spawner so I could keep memory down while trying to figure this out.  In runtime,  some terrains will load but some do not.  

Link to comment
Share on other sites

That sounds like some of the terrains might not have been generated correctly - Could you please try to select the terrain loader manager under Gaia Runtime and load all terrain tiles from the Terrains panel? This would force a load on all the terrains, so you could see if some are missing.
If they are, could you please check in the "Terrain Scenes" folder of your session if the scene files for these terrains have been generated?

Link to comment
Share on other sites

I clicked back to world generator and generated it again.  Still flycam for some reason the first time was not set correctly but I discovered that if I chose first person and ran that then chose fly cam again, the setting corrected.  I re-spawned the textures and that corrected the tiles with no textures.  This was all after having closed Unity down for about the 4th time and waiting a day before being willing to try again.  

It all works now as far as I can tell, but have not tried generating another larger world yet.

I appreciate your help even for what may turn out to be a strange Unity thing.

 

Link to comment
Share on other sites

20 hours ago, randolphjand said:

I clicked back to world generator and generated it again.  Still flycam for some reason the first time was not set correctly but I discovered that if I chose first person and ran that then chose fly cam again, the setting corrected.  I re-spawned the textures and that corrected the tiles with no textures.  This was all after having closed Unity down for about the 4th time and waiting a day before being willing to try again.  

It all works now as far as I can tell, but have not tried generating another larger world yet.

I appreciate your help even for what may turn out to be a strange Unity thing.

 

Yes and please let us know if it starts acting up again. 
From the sounds of it, it seems to be a weird Unity issue. 

I did make a tutorial for worlds streaming over the weekend, just need to clean it up and it should be posted soon! 
 

Link to comment
Share on other sites

  • 1 month later...

Im currently investigating a similar problem whereby a tile is greyed out in the hierarchy and does not appear in runtime. I can click the "set active" option next to its parent folder and it will appear but this is the only way the tile appears in runtime. 

If I don't do anything the character falls off the world so its not a case of being loaded only when needed. 

Ill add back here anything I find but if anyone has any suggestions in the mean time I'd be grateful. 

Thanks

Link to comment
Share on other sites

Running 3.2.0, I'm getting the following error which may be relevant to the missing terrain tile:

 

TerrainCollider: MeshCollider is not supported on terrain at the moment.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Gaia.TerrainScene:UpdateLoadState (System.Collections.Generic.List`1<UnityEngine.GameObject>,Gaia.LoadState&,bool&,bool&,bool) (at Assets/Procedural Worlds/Gaia/Scripts/MultiTerrainSystem/TerrainScene.cs:262)
Gaia.TerrainScene:AddRegularReference (UnityEngine.GameObject) (at Assets/Procedural Worlds/Gaia/Scripts/MultiTerrainSystem/TerrainScene.cs:144)
Gaia.TerrainLoaderManager:UpdateTerrainLoadState (Gaia.BoundsDouble,Gaia.BoundsDouble,UnityEngine.GameObject,single,single,single,single) (at Assets/Procedural Worlds/Gaia/Scripts/MultiTerrainSystem/TerrainLoaderManager.cs:1034)
Gaia.TerrainLoaderManager:RefreshSceneViewLoadingRange () (at Assets/Procedural Worlds/Gaia/Scripts/MultiTerrainSystem/TerrainLoaderManager.cs:1227)
Gaia.WorldOriginEditor:CheckForSessionManager () (at Assets/Procedural Worlds/Gaia/Gaia Pro/Scripts/MultiTerrainSystem/Editor/WorldOriginEditor.cs:30)
Gaia.WorldOriginEditor:RenderSceneGUI (UnityEditor.SceneView) (at Assets/Procedural Worlds/Gaia/Gaia Pro/Scripts/MultiTerrainSystem/Editor/WorldOriginEditor.cs:118)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...