Code Monkey home page Code Monkey logo

Comments (5)

rslonake avatar rslonake commented on September 24, 2024 1

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.

from godot_heightmap_plugin.

Zylann avatar Zylann commented on September 24, 2024

No loader found for resource: res://terrain_data/data.hterrain (expected type: )

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 "" (empty string). (assuming you didn't see any other errors in your log?).
To this day, he cause still hasn't been found (and to my knowledge nobody is investigating it).

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.

I pasted the text of my data.hterrain file below... it looks empty

Regular terrain metadata may look like that, it's not empty.

I opened an older version of the project and the data.hterrain is much larger

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.

Is it safe to say I have lost all my work since my last version save?

It's not lost, the plugin doesn't delete things. It saves regular images next to your data.hterrain, so if you still have them, then your work isn't lost. All data.hterrain does is to reference those images under specific IDs matching a naming convention of the images:

image

id is used to decouple the file itself from its ID in terrain data. id is incremented by 1 if you have multiple maps (like multiple splatmaps or detailmaps), except in eventual cases where you could have deleted one in the middle, in which case the index in the array will not match with id (this removes the need to rename files or remove them just because you might have reordered layers or removed a layer).

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.
If the images themselves have reverted, then unless you have them versionned somewhere, they might be lost. The only way I know that this could happen, is if you actually overwrote them with a new terrain (but who knows, I've seen fuckups happen in Godot where it's half of the time user's fault without noticing, and other half Godot being buggy or error-prone). Again, versionning is very important to prevent this.

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

from godot_heightmap_plugin.

rslonake avatar rslonake commented on September 24, 2024

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.

from godot_heightmap_plugin.

rslonake avatar rslonake commented on September 24, 2024

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?

from godot_heightmap_plugin.

Zylann avatar Zylann commented on September 24, 2024

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.

from godot_heightmap_plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.