Zylann / godot_heightmap_plugin

HeightMap terrain for Godot implemented in GDScript
Other
1.67k stars 156 forks source link

texture can not paint second one #454

Open yythlj opened 1 week ago

yythlj commented 1 week ago

image image no error report

but once import the slot0,that become the global. and import second one to paint some where. do it get no effect, still use the slot0 every where

yythlj commented 1 week ago

when i click update collide shape res://addons/zylann.hterrain/hterrain_data.gd:501 - Assertion failed: Terrain image normal[0] resolution (513) does not match the expected resolution (2049). Did you modify it directly? Terrain image splat[0] resolution (513) does not match the expected resolution (2049). Did you modify it directly? Terrain image color[0] resolution (513) does not match the expected resolution (2049). Did you modify it directly?

can this fix?maybe because I use the external height.res. I create that with hterrain on a nother godot project.

yythlj commented 1 week ago

godot 4.3.beta2 windows forward+

Zylann commented 1 week ago

but once import the slot0,that become the global. and import second one to paint some where. do it get no effect, still use the slot0 every where

When you add slot 0 it shows everywhere because initially that's the only texture there is so it defaults to that. Adding another slot doesn't do that because that's where you have to start painting. But that works for me when I do this, I don't know what's going on in your case...

when i click update collide shape res://addons/zylann.hterrain/hterrain_data.gd:501 - Assertion failed: Terrain image normal[0] resolution (513) does not match the expected resolution (2049). Did you modify it directly?

What it says. Have you modified the files of the terrain directly? You seem to have changed them directly somehow and that prevents the plugin from working correctly because now you have inconsistent terrain maps. Either that, or some of the files were missing. They must have the same resolution, but for some reason the terrain's maps are smaller than the expected resolution. If you really just want to get past the error, you could try editing the PNG and resize them to the expected resolution (2049x2049 I guess?) then restart the editor, but you'll end up with a low quality normalmap (might be fixable by doing a large sculpting operation with very small opacity?). But the real problem might be something else you did, which I can't figure out from your post. It shouldn't be necessary do do these workarounds.

I create that with hterrain on a nother godot project.

You need to copy all files in the terrain data folder for this to work, not just height.res. Maybe you haven't done that properly? Usually it's best to dedicate a folder for just the data the plugin saves in it. This way you can just copy the folder around. If you chose a folder with other stuff in it, that makes it harder to pick the right files. In order to do that, you may copy the terrain data folder from the other project in the new project, let Godot import the textures, then create a new terrain node, and assign the data folder.

I can't really help more from this info, you seem to have messed with the files in the wrong way, and it's causing different issues. I don't even know if they are related or not, since you've described different problems. Maybe it would help if you can reproduce the issue from scratch and explain which exact steps you took for the issue to start happening (that's what the issue template means). I can only fix things if I'm able to reproduce the same issue following steps.