Jump to content

Gaia terrain not visible in editor after Stamper undo function


Liam Visionary
Go to solution Solved by Peter,

Recommended Posts

Hi, I recently played with terracing my terrain, and not quite pleased with my result, I pressed undo to revert the changes. The whole terrain then disappeared in the editor. I ran playmode, and my initial terrain was there. The undo function worked as expected. However, even upon exiting playmode and restarting my unity editor, my Gaia terrain remains not visible in the editor. I've set my loading range to 1500 from the Scene View Camera, but to no avail.

 

 

2022-01-10 (2).png

Link to comment
Share on other sites

To me it looks like the terrain is not loaded. You have several terrain scenes, is it maybe in one of them? Or is it in the main scene? Try to load all terrains in the terrain loader. 

Link to comment
Share on other sites

4 minutes ago, MiTschMR said:

To me it looks like the terrain is not loaded. You have several terrain scenes, is it maybe in one of them? Or is it in the main scene? Try to load all terrains in the terrain loader. 

Thanks for the response -- I followed your advice by first unloading all terrains and imposters, then loading them all, but still no terrain visibility 😕

Link to comment
Share on other sites

1 hour ago, Liam Visionary said:

Thanks for the response -- I followed your advice by first unloading all terrains and imposters, then loading them all, but still no terrain visibility 😕

Possibly check your Terrain Loaders on the terrain manager. 
Your tools should be set to editor always. 

Link to comment
Share on other sites

1 hour ago, Bryan said:

Possibly check your Terrain Loaders on the terrain manager. 
Your tools should be set to editor always. 

Like so? Still not visible. Is it possible that I'm missing a terrain loader?

I've also tried with Camera set to editor always, but that doesn't work either (from my understanding, thats's for the runtime terrain loader)

2022-01-10 (4).jpg

Edited by Liam Visionary
Link to comment
Share on other sites

So let me try to explain how this all works a bit. 

When all your terrains are unloaded they will still be unloaded until a few actions are taken. 
1. Using the stamper or biome / spawners will activate the terrains under the spawner range. 
2. Going into the terrain manager and loading in some or all terrains. 
3. The character controller is activated in the scene. 

All of these loaders can be adjusted: 
image.png

  • Editor Selected - will load terrains as long as the tool is selected in the Scene Hierarchy / Inspector
  • Editor Always - will keep terrains loaded even when not currently selected
  • Runtime Always - will load terrains during runtime (usually used on game objects like the player rather than tools)
     

So when you don't have one of the Terrain Loaders selected in the Hierarchy the terrains will not load in unless you load them in via Terrain Loader. 

Again there is a difference between the Imposter terrains being loaded in and the normal terrains. 
Additionally you need to make sure that both your terrains and imposter terrains are in the build settings. 
This can be done easily by going to the terrain loader manager and select Add scenes to build settings. 

image.png

Hopefully this helps! 

Link to comment
Share on other sites

2 hours ago, Bryan said:

So let me try to explain how this all works a bit. 

When all your terrains are unloaded they will still be unloaded until a few actions are taken. 
1. Using the stamper or biome / spawners will activate the terrains under the spawner range. 
2. Going into the terrain manager and loading in some or all terrains. 
3. The character controller is activated in the scene. 

All of these loaders can be adjusted: 
image.png

  • Editor Selected - will load terrains as long as the tool is selected in the Scene Hierarchy / Inspector
  • Editor Always - will keep terrains loaded even when not currently selected
  • Runtime Always - will load terrains during runtime (usually used on game objects like the player rather than tools)
     

So when you don't have one of the Terrain Loaders selected in the Hierarchy the terrains will not load in unless you load them in via Terrain Loader. 

Again there is a difference between the Imposter terrains being loaded in and the normal terrains. 
Additionally you need to make sure that both your terrains and imposter terrains are in the build settings. 
This can be done easily by going to the terrain loader manager and select Add scenes to build settings. 

image.png

Hopefully this helps! 

Hey Brian, thanks for the detailed explanation. I've went and loaded all my terrains and imposters through the terrain loader manager, then pressed 'Add Scenes To Build Settings, but I still cannot see my terrains. I want to believe I'm doing something wrong here -- but I believe this is a bug with pressing Undo on a Spawner action in the latest version of Gaia Pro 2021. 

Edited by Liam Visionary
Link to comment
Share on other sites

4 hours ago, Liam Visionary said:

Hey Brian, thanks for the detailed explanation. I've went and loaded all my terrains and imposters through the terrain loader manager, then pressed 'Add Scenes To Build Settings, but I still cannot see my terrains. I want to believe I'm doing something wrong here -- but I believe this is a bug with pressing Undo on a Spawner action in the latest version of Gaia Pro 2021. 

I have been trying to reproduce this bug to no avail. 
Seems to be something with the project, do you have a backup? 
You could potentially try to replay the session again. 

I would make a backup before replaying the session. 

Link to comment
Share on other sites

50 minutes ago, Bryan said:

I have been trying to reproduce this bug to no avail. 
Seems to be something with the project, do you have a backup? 
You could potentially try to replay the session again. 

I would make a backup before replaying the session. 

Just tried, I'm getting an error saying my scene is invalid. It's possible they got deleted during the Spawner undo operation *sigh* 

Where are Gaia terrain scenes saved by default?

Edited by Liam Visionary
Link to comment
Share on other sites

17 minutes ago, Bryan said:

It would be in your GaiaUserData

 

Seems like all my terrain scenes are in tact, so out of desperation I uninstalled and reinstalled Gaia, went through the maintenance step again, reinstalled the shaders, and yet my terrains are still not rendering in the scene view. Only during playtime. I'm not sure how I can continue using Gaia if I can't even see the terrains in edit mode...

Link to comment
Share on other sites

@Bryan 

EDIT3: 🤦‍♂️ the issue was that there were two terrain loaders in the scene. I'm not sure why the Undo operation created another earlier today, but as soon as I deleted it a few minutes ago, my terrain popped right back into view. Perhaps a warning or error could be present in the console if more than one terrain loader is present?

 

I believe I've figured the issue, although I don't know how to fix it. It seems at runtime, Gaia is loading up the session from 01/02 (Jan 2nd), but the editor is trying to load 01/10 which doesn't exist in my Gaia user settings -- it must've been created when I stamped the terrain, and deleted when I pressed undo. However the editor may not have updated it's reference back to the previous session 01/02. Would you know how I can restore this? I've tried "Playing back the session," and restoring, but neither option worked out.

 

EDIT: Also have no problem dragging all the terrain scenes onto the hierarchy to load them all up. But all editor terrain loader functionality is busted for me

EDIT2: In the terrain loader manager, unloading them all removes them just fine, but loading them all does not open the terrain scenes in the hierarchy, 

 

2022-01-11 (2).jpg

2022-01-11.jpg

Edited by Liam Visionary
Link to comment
Share on other sites

  • Solution

@Liam Visionary I read through the thread and I had a few notes / found a few things that might give a clues what is going on:
 

  • Having multiple terrain loaders should not be an issue, they were specifically designed this way so you could have e.g. multiple objects loading terrains during runtime.
  • I noticed that some of the screenshots show the terrain scenes in the scene hierarchy being in a weird state: It shows them listed, but with the term "(unloaded)" being added - this is not a state that Gaia should leave them in normally. The terrain loading in Gaia does know 3 states:
    1. Unloaded (the scene is not listed in the scene hierarchy AT ALL)
    2. Cached (the scene is listed, but the terrain object inside is deactivated)
    3. Loaded (the scene is listed, and the terrain inside is active & visible)
    I know you can bring a scene into this "(unloaded)" state by right clicking on it and selecting Unload, but this is not something Gaia would do normally. Could it be there is another tool in the project that might deactivate / unload scenes for any purpose? I could imagine that if it is , or if those scenes have been put into this state manually it might disturb the loading process in Gaia.
  • There is an error message at the bottom indicating that it is trying to load a scene file that does not seem to exist, this is an indicator that scene data might be lost or the terrain loader manager is using wrong / outdated data
  • This overlaps with the thing you found regarding the scene loading up the wrong session - I think this might be a key factor to all of this, if the terrain loader manager is referencing the wrong data from another session for some reason, this could lead to all kinds of issues.

Before continuing, I would suggest to fully unload all scenes to make sure it is in a neutral state and none of these "(unloaded)" entries mess with anything. To do so, you can open the terrain loader manager under Gaia runtime, and unload all terrains from the terrain panel. That might not get rid off those "(unloaded)" scenes, you might need to remove them from the scene hierarchy manually by selecting them, right clicking, and select "Remove"

When this is done, please select the Gaia Session Manager and check which session file it references - it should point to the session file that was used to create your scene initially. You can check if that is the case by the date / time in the session file, or by the contents of the associated session folder.

image.png

Next. please select the terrain loader manager and check the Terrain Scene Storage object in there. This is a little database that contains information about the terrain scenes that can be loaded - this needs to point to the correct terrain scene storage object of the correct session, otherwise loading will not work correctly.

image.png

You can additionally take a peek in the terrain scenes object if it references the correct scene files, and you can take a look into the terrain scenes folder to see if those scene files exist as well:

image.png

When this information / these associations are all correct, and the session manager points to the correct session file, the terrain loader manager points to the correct Terrain Scene Storage file and the information in there checks out and the scene files themselves exist as well, there is no reason why the loading should not work.

  • Like 1
Link to comment
Share on other sites

@Peter Thanks for the detailed outline, Peter. I wish I could go through the steps and verify this solution for my particular case, but as soon as I deleted that extra terrain loader instance, the terrain loading began working as expected and those unloaded terrain scenes disappeared. I suspect it was in fact that the deleted terrain loader was referencing a non-existent session which was causing the terrain loading to not work. To corroborate this a bit, I added a new terrain loader to the scene and it did not cause any issues. So it seems that there really was an issue with the previous loader manager.

 

As I can't test the solution, and I do believe the solution is in your answer, as I highly believe the issue lied in a no-longer existing reference, I've marked your response as the solution.

 

I appreciate you and Bryan for your time 🙂

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
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...