#Optimizing GDscript marching cubes implementation

3 messages · Page 1 of 1 (latest)

amber tangle
#

I am creating marching cubes terrain which needs to run realtime. Currently, when generating more than 9 chunks at 32x32 cubes per chunk, my computer experiences performance problems which cause freezes, and this is a computer built for rendering 3D scenes. How could I optimize the attached script.

This script is already executed in a separate thread, as I leave generating chunks to the WorkerThreadPool.

amber tangle
#

... 4.3 seems to have at least partly fixed this???????

modern pebble
# amber tangle I am creating marching cubes terrain which needs to run realtime. Currently, whe...

If you're looking to optimise your marching cubes terrain for real-time performance, I recommend using a compute shader to handle the marching cubes algorithm. It can significantly improve performance, especially when dealing with larger chunk sizes and multiple chunks.

Check out Sebastian Lague's video where he explains this approach and provides a downloadable project file: https://youtu.be/kIMHRQWorkE?t=1117

Let's talk about some stuff! My process for creating videos, unfinished projects, thoughts on Godot, and more.

Support on Patreon: https://www.patreon.com/SebastianLague
My (very crude) video tools:
https://github.com/SebLague/VidTools
Godot Marching Cubes Experiment:
https://github.com/SebLague/Godot-Marching-Cubes
Shapes by Freya: https://www...

▶ Play video