-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terrain scene will not load #438
Comments
That sounds somewhat related to the years-long issue #232, but from your perspective the problem has happened already and you're only seeing a consequence. There is an infuriatingly elusive heisenbug in Godot that makes save/load randomly fail when GDScript plugins use custom savers/loaders. Godot is litterally failing to find the HTerrain loader (which is right here) and simply fails with an unhelpful, bogus message telling it expected However if you say you've been working on it for months, it definitely got saved at least once, so I wouldn't expect your work to be corrupted.
Regular terrain metadata may look like that, it's not empty.
Not sure what could possibly cause this, other than deleting some detail layers maybe, or changing the shader, though I understand you might not have done that.
It's not lost, the plugin doesn't delete things. It saves regular images next to your
Example of a terrain with multiple splatmaps and one detail map: {
"maps": [
[
{
"id": 0
}
],
[
{
"id": 0
}
],
[
{
"id": 0
},
{
"id": 1
},
{
"id": 2
},
{
"id": 3
}
],
[
{
"id": 0
}
],
[
{
"id": 0
}
],
[],
[],
[]
],
"version": "0.11"
} So maybe it could be edited to link back the images from your older version (if you use Git, it help). However if the plugin/Godot failed to save the terrain last time, then your progress might have been lost after you closed Godot last time. There is unfortunately nothing I can do to fix whatever issue it might be, especially without any way to reproduce this. Every time I see someone having issues loading/saving, I jump into my test project and try saving/loading a bunch of test scenes, and nothing ever goes wrong... I don't know what happened in your case. All the plugin does is listen to Godot requesting the HTerrainData resource to be saved, and similar in order to load. As mentionned in #232, the sparse evidence we have so far points towards a bug somewhere in Godot that happens randomly, making it incredibly difficult to know what is going on (asuming it is related). |
Thanks for the feedback. I will keep investigating. By the way, I really like this plug-in and thank you for all the time that you've spent working on it. And for getting back to me so quickly about this issue. |
Quick question... as I mentioned, I have an older version of this project on my computer. I believe most of the changes are not terrain related. If I drag my terrain data folder from the old version to the new version do you think that it should load? In other words, all terrain data is in the terrain data folder, correct? |
Yes. Properties such as selected shader or LOD distance are stored in the scene, but the actual terrain data such as heights, splatmaps or detail layer maps, are stored in the terrain data folder. |
Good news... I was able to get my terrain back. I was just about to give up and scrap the project and go back to my previous version, but I thought, "Let's try one last thing." I deleted the terrain addon and reinstalled... readded the hterrain node and there it was! Just needed to rescale and add reimport the textures. (The texture maps were there but everything was white - once I reimported the textures it filled in the map). Thanks again for your advice and help with this. |
Started this morning... I have been working on this terrain for months and now when I try to open the terrain.tscn I get the following error...
"No loader found for resource: res://terrain_data/data.hterrain (expected type: )"
I pasted the text of my data.hterrain file below... it looks empty. I opened an older version of the project and the data.hterrain is much larger... it looks like the attached file is corrupted???
Is it safe to say I have lost all my work since my last version save?
Here is the contents of my data.hterrain file:
{
"maps": [
[
{
"id": 0
}
],
[
{
"id": 0
}
],
[
{
"id": 0
}
],
[
{
"id": 0
}
],
[],
[],
[],
[]
],
"version": "0.11"
}
The text was updated successfully, but these errors were encountered: