alpapaydin / Godot4-3D-Smooth-Destructible-Terrain

A basic demonstration of procedural smooth terrain generation in Godot 4 in 100 lines.
MIT License
14 stars 3 forks source link

Digging near chunk borders creates holes. #6

Open gregrylivingston opened 1 month ago

gregrylivingston commented 1 month ago
          Agreed, chunk borders are bugging and decreases overall consistency. It should be fixed to make this code generally usable. Didn't have the time so far though :)

Originally posted by @alpapaydin in https://github.com/alpapaydin/Godot4-3D-Smooth-Destructible-Terrain/issues/4#issuecomment-2353195359

gregrylivingston commented 1 month ago

I meant to put this in a second PR but apparently didn't. This was partially resolved in https://github.com/alpapaydin/Godot4-3D-Smooth-Destructible-Terrain/pull/9

HOWEVER - on one side it sometimes bug out and sets the wrong height. I haven't quite figured that out. But it mostly works.

This is probably my last contribution at least until or if I intend to use this again.

gregrylivingston commented 1 month ago

Thanks for making this @alpapaydin and making it available so I could use it for a game jam <3

alpapaydin commented 1 month ago

I made a quick fix which syncs changes to neighboring chunks, but the performance is not very feasible. What do you think? Also it remains to warp the shader to the neighboring chunks.

gregrylivingston commented 1 month ago

Significant improvement in behavior.

Still sometimes spikes upwards and still sometimes creates holes on corners but definitely improvement.

We had duplicate regeneration code so removing that fix it quite a bit.

With chunk holes removed chunk size can probably be dramatically reduced which would bigtime improve the performance of recreating these.