Zylann/godot_heightmap_plugin

Detail layers infinite synchronized clones.

TechnoLukas opened this issue · 11 comments

Describe the bug
When I place a few "details" on synchronized i see a lot of synchronized clones of it around current terrain.
I edit main one, and all of clones around it are edited simultaneously.

To Reproduce

  1. Create Terrain
  2. Set scale to 0.1, 0.1, 0.1 (With scale 1 ,1, 1 the bug will be less visible due to visibility distance)
  3. Add one detail layer
  4. Place few of "details"
    You will see a lot of clones around the terrain

Demo project:
heightmap_plugin_bug.zip

Expected behavior:
No "clones" around

Screenshots:
visibility 100:
image
visibility 500:
image
visibility 4337 (edited plugin max value)
image

Environment:

  • OS: [Windows 11]
  • Godot version [4.2]
  • Plugin version [1.3.7 dev]
  • Renderer used: [Compatibility & Forward+]

Apparently if you change map_scale after painting details, the problem disappears

No, it doesn't. Fly around and you will see that is it still there. It is just less visible due to visibility range. For debug purposes i set it up to 1000.

10.12.2023_18.25.49_REC.mp4

Yeah I noticed. It appears to fix it but it comes back later.

Should be fixed in 42b861e

Now there is no clones. So it is kinda fixed. Now there is a new problem:
When terrain scale is 0.1, 0.1, 0.1, newly created "detail layer" is not visible, i have to scale terrain to 1,1,1 and back to 0.1, 0.1,0.1 And i have to do it for every new "detail layer" .

10.12.2023_19.00.39_REC.mp4

How are you adding detail layers? It works when I use the Add button in the bottom panel.
It also works when I add a node instead, but keep in mind adding a node does not create a new density map. Nodes can share the same density map.
So actually I can't reproduce that second issue.

Yeah, same, I use the Add button in the bottom panel.

What i do:

  1. Create terrain with map scale 0.1 , 0.1, 0.1
  2. Add details layer
  3. Try to draw details, though they are not visible.
  4. Scale map to 1,1,1
  5. I see details are visible
  6. Scale map to 0.1, 0.1, 0.1
  7. Now they are visible too.

I can't reproduce it.

issue415_2_not_reproducing.mp4

Maybe restart the editor?

I think it happens because you also set the terrain to be centered.

The second issue should be fixed in f5707d3

Yes, every issue described above is fixed. Confirmed. 👍