JIT
Create 3D Hexagonal Terrain
can you create 3d hexagonal terrain
Updated files
v1
can you make sure the hexagons are connected?
Updated files
v2
can you make it procedurally generated
Updated files
v3
keep it very low-poly. I don't want smoothness
Updated files
v4
I can only see the hexagons from the bottom. from the top I see nothing. also, make the hexagons thicker.
Updated files
v5
two sides of the hexagons are missing, can you fix it.

Okay, it seems like the winding order for the side faces might be incorrect, causing them to be culled (not rendered) when viewed from the outside. Let's reverse the order of vertices for the side triangles.

Updated files
v6
yeah two of the sides are still missing which allows me to see through them.

You're right, my apologies. The winding order for the side faces was still incorrect. Let's explicitly reverse the order of the vertices for the two triangles that make up each side quad.

Updated files
v7
okay they all have all their sides now. there's still gaps between each hexagon really only noticeable when the height increase is taller than the hexagon so it can't close that gap. the gap is basically underneath the hexagon and the spacing between the height layers is too tall for it to hide.

Okay, I understand. The issue is that the vertical side faces of adjacent hexagons don't connect when the hexagons are at different heights, leaving gaps.

To fix this, instead of drawing vertical sides straight down, we need to create "skirt" faces that connect the top edge of one hexagon to the corresponding top edge of its neighbor. This will fill the gaps between hexagons of different heights.

This requires a two-pass approach: first, calculate and store the height of all hexagon centers, and second, generate the geometry, using the stored heights to find neighbor heights and create the connecting skirt faces.

Updated files
v8
you removed two of the sides again on each hexagon.