TiledGround and seamless texture - best practice

Hi there,
in my application i want to display a terrain ground and i decided to use a tiledGround with a seamless texture. See this PG: https://playground.babylonjs.com/#QHU36T#10
With little subdivisions the result is quite good, but when i increase the subdivisions (for example 20:20 like in the PG above) the result is less realistic and if you zoom out a little bit you can see the grid, the discontinuity from a tile and the other. Is there some technique to make a more realistic tiledGround?

@jerome was the best at this :slight_smile: he did plenty of demos for it.

1 Like

Hi,
For a start you could use patches instead of a single tile to avoid repeating the pattern all too much. Then there is the way the tile is made here. It is seamless and not really. The edges all have light color and the interior is darker. It would already look better without this difference in level (of course it would also look flatter but next you can work with lights and your other objects, eventually grass, rocks and it will come more lively again)

1 Like

Thanks @mawa, is there any PG example with patches?

I don’t know. I’m not a specialist. May be best waiting for @jerome 's input on this. Though I do know of the use of a group (or patch) of tiles you can use instead of single tile. However never tried this in BJS.
Sry.

1 Like

@Mercurio You could add some height to your terrain - just bumpiness and irregularity. and use the BJS mixMaterial script that allows upto 8 textures to be mixed in “patches” as @mawa puts it

Simple Example

My Example : a castle terrain

Uses irregularities and the mixMaterial script

Stay Safe, gryff :slight_smile:

3 Likes

@Mercurio : and here is the texture I created for the castle example that defines the “patches” :

mixTexture

red is grass, green is grass/rock, blue is path, black is cliff rock

Stay Safe, gryff :slight_smile:

2 Likes

Yes, exactly what I was thinking about. Thx for finding the script for me. Will certainly use it one day. Already bookmarked. Have a great day,

Thank you very much! :wink: