Zylann / godot_heightmap_plugin

HeightMap terrain for Godot implemented in GDScript
Other
1.73k stars 160 forks source link

TerrainDetailLayer instances dissapear when I save a different scene then come back to the main scene. #179

Open tobenaii opened 4 years ago

tobenaii commented 4 years ago

TerrainDetailLayer instances dissapear when I save a different scene then come back to the main scene while an InstanceMesh is defined.

Steps to reproduce the behavior:

  1. Create a HTerrain with a detail layer and set the Instance Mesh property to any mesh.
  2. Draw some terrain instances
  3. Create a new scene and save it.
  4. Go back to the first scene, and the painted instances dissapear.

Environment

Zylann commented 4 years ago

Does this happen in Godot 3.2.1? Any errors in the console?

tobenaii commented 4 years ago

It does happen in 3.2.1. The only output I get when it happens are these warnings

core/image.cpp:1890 - Loaded resource as image file, this will not work on export: 'res://Terrain/normal.png'. Instead, import the image file as an Image resource and load it normally as a resource.

core/image.cpp:1890 - Loaded resource as image file, this will not work on export: 'res://Terrain/splat.png'. Instead, import the image file as an Image resource and load it normally as a resource.

core/image.cpp:1890 - Loaded resource as image file, this will not work on export: 'res://Terrain/color.png'. Instead, import the image file as an Image resource and load it normally as a resource.

core/image.cpp:1890 - Loaded resource as image file, this will not work on export: 'res://Terrain/detail.png'. Instead, import the image file as an Image resource and load it normally as a resource.

modules/gdscript/gdscript_functions.cpp:817 - hterrain_data.gd: Map detail[0] loaded as format 4, expected 2. Will be converted.

Zylann commented 4 years ago

I followed your steps, on a brand new terrain and on an existing terrain, I could not reproduce it.

tobenaii commented 4 years ago

Hmmmm weird, I'll do some investigator investigating to investigate this investigation.

endlesstravel commented 4 years ago

It's true that sometimes it's lost, and I've run into an even stranger bug -0--> it's impossible to specify layers for drawing, only a second layer can be used for paint. i think this bug may be by Influenced https://github.com/godotengine/godot/issues/37144

So TerrainDetailLayer doesn't work for me at all. But it's still really wonderful tool for work!

Zylann commented 4 years ago

@endlesstravel it's definitely possible to have multiple detail layer nodes and draw on them. I'm not sure to understand the bug you linked. If you have a problem with this you may have to create a different issue with detailed reproduction steps.

endlesstravel commented 4 years ago

ok, Maybe it's because my project is too messy. I'll investigate it again