How can I "tile" a texture?

I have a texture for the ground that I want to use, except it is a single tile that I want to repeat/tessellate multiple times across the Ground mesh.

How do I accomplish this instead of the default behaviour which seems to be stretching the texture so that it covers the entire Ground?

I can think of two ways, neither of which seem like they’ll be performant;

  • create multiple Ground meshes and tile them together
  • create a DynamicTexture and do the tiling/tessellating myself on the html5canvas

Is there a better way, maybe a way to tessellate a single texture when attaching it to a mesh?

Hi @sairens and welcome to the community!

You can use texture.uScale and vScale to tile a texture.

More information is available in this doc page.