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.

6 Likes

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

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

2 Likes

@TheNosiriN

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.