Soft map borders

Hello there!

I’m trying to create a map for some characters to travel; to do so, I have navigation mesh creation in mind.

The problem is more of an aesthetics issue: the map is made from a height map, which means the mesh stops “brutally”. The camera can only move into the map area, and going to its edges, can see the gap around it.

I thought about creating a second ground mesh from the same height map, but with a bigger width; unfortunately the “mountains distribution” over it is not the same as the map mesh, due to the extended width.

I’m open to all ideas :slight_smile:
Thanks!

Is just using an alpha map not compatible in your workflow? Example: Babylon.js Playground

I didn’t know about alpha map !
I like the effect it gives on borders, but unfortunately my ground is big, so I need to repeat the texture (uScale > 1), meaning I can’t use alpha on it.

Moreover, the alpha graduation would not apply to meshes being around the edges of the groud.

@RemyRaes each texture on a single material can have its own scaling so you can apply an opacityTexture with uScale = 1 and still maintain repeat tiling on your diffuse texture. See Apply Bumps, Opacity and Tiling - Babylon.js Documentation

1 Like

That should do it, then.
Thanks!

You can also use a dedicated UV channel.