Gaps between tiled water

Hi babylon team,

I am trying to build hexagon terrain. Thanks to @PirateJC for the great node material video.

I followed the video and built a material which is as 12:56 in @PirateJC 's Part 4 video. Here is my node material:

Correct me if I am wrong. My understanding is the noise is mostly based on the world position of vertices. There are some other input parameters, but as long as I use the same material instances for multiple tiles, the y values (noise) should be the same for vertices from two tiles but at the same x and z.

The following PGs seem to confirm my above assumption:

2 rectangle mesh tiles: Babylon.js Playground
2 hexagon mesh tiles. Custom mesh by using the positions and indicates from the hex mesh used in the NME video:

However, I have my own custom mesh for hexagon that I can configure the subdivisions. When this node material is applied to this mesh, different Y positions for two different tile.

This doesn’t seem to be T-junction problem because the adjacent edges have the same number of vertices.

So basically 2 questions. 1) Is my assumption correct? 2) If it is, what could be the cause of the gap between two tiles?

I hope there is something obvious you can point out. Otherwise, let me know if you need me to provide a PG for my custom hexagon mesh.

Hmm. I made another PG that can reproduce the problem in my custom mesh.

Does it look like my mesh is wrong? I took a screenshot from above PG and it looks like there are extra vertices and triangles at edges are showing up during the animation?

I was rush to test the water material and built the triangles and indices of this hexagon mesh with some black magic. I will try to build the hexagon mesh again properly. :expressionless:


Yes. The generated noise seem to be the same based on the x and z coords. After building the hexagon mesh properly, the gap between two tile edges is fixed.