Volumetric Terrain (Marching Cubes)

I made this example a while back but I decided to come back and clean it up, and I wanted to share it.

What it looked like before:

What it looks like now:

You can view the example here: Marching Cubes
I’ll try making a dual contouring example or maybe optimize this one using a quadratic error approach some time later.


Oh and if anyone could examine the code and know to fix the normals problem between chunks when smoothShaded is true I’d really appreciate if you could show me. I’ll try fixing myself later.

1 Like

fascinating! :slight_smile: the project has great potential! Keep on running!

Modified the code a bit … love it … pure enjoy to play with mathematical functions:



constuction boosted up:

that is beauty :slight_smile: so nice

1 Like

This is beautiful :slight_smile:

smooth normals (not on rough meshes): https://www.babylonjs-playground.com/#3HAGLH#25



Greetings my fellow Torontonian :slightly_smiling_face:

1 Like

Torotonian :grin:, you here in Toronto too?? I thought most devs would be in US or something.