HOWTO: Seamless DynamicTerrain from heightmap?

I am using dynamicterrain to generate a terrain from heightmap and am interested in the functionality of infinitely scrolling my terrain along the X axis which the dynamicterrain supports by default. The problem is that the way it currently works, there is a really ugly seam between each tile as can be seen in the following picture:

Anyone got any idea how I should approach this challenge? Basically I need a terrain from heightmap that needs to tile seamlessly along the X axis.

Big thanks if anyone can shed some light!

I remember some amazing demos from @jerome about it :slight_smile:

I bet he ll be able to help.

could you reproduce it in a PG please ?

I just notice, for the first time, that I also get this ugly seam when flying towards north on the ice floe (let the jet go alone) in this demo : BabylonJS Flight Simulator

I’m kinda new to BabylonJS and its ecosystem so I don’t know how to include my own images in playground and can’t exactly replicate my demo.

But for all purposes, for example this demo has same issue:

you’re right, this looks like a bug.
I’ll check this … no idea when. But it’s in my todo list now

Thanks for your time and effort, Jerome!

Any input how I could solve it on my own in the mean time?

Should I ditch dynamic terrain and just try to tile it with normal create terrain from heightmap function? I don’t wanna get stuck on this problem so I need to find a solution :stuck_out_tongue:

yup you could definitely try that as a workaround :slight_smile:

From my memories, solving seam issues on tiled textures is a mess. So this really needs time to be fixed.

1 Like

Anyone else ever done something like this? I wonder if there’s any example code that could help me understand a way forward with this. Or should I ditch heightmap and generate the terrain procedurally (does that work with dynamicterrain to make infinite scrolling terrain without seams?).

Be patient :slight_smile: it is thanksgiving answers might slow down a bit until next week but you ll for sure have insights from our community members who did this.

1 Like

Thanks, can’t wait ! :slight_smile:

1 Like

Actually, I think I know how it could be fixed, by adding some hidden points to hold the missing UVs in the ribbon geometry.
This is quite complex but should solve the problem. I’ll have a look in the next weeks.

1 Like

That’s great! To motivate you to look into it, I would gladly offer a reward of $50 in BTC for your efforts should you find the fix for this in the next week!

Thanks so much Jerome!

1 Like

You know, I’m like Linda Evangelista, I wouldn’t get out of bed for less than $10,000 a day …


Ahah :slight_smile: come on J. it is Christmas :wink:

I totally get that, I’m the same way :P. But well, the way I see it :smiley: 50$ > 0$ :smiley: haha

Well… I’m afraid I won’t have the time to fix this in the next week. But who knows …?

That’s okay, I will go forward and use dynamicterrain and just ignore the seam for the moment with the hope it will get fixed by the time I have finished it and want to release my project. No pressure :wink:

Here is my procedural infinite terrain experiment at the old BJS HTML5Devs site:

Good luck! :zap:

1 Like

thinking back to my first idea (hidden points), it won’t work that way… it’s more complex than I thought.