Multi faces material repetitions


I’m creating a FPS in a Minecraft style environment and I’m having a problem with the repetition of materials on the boxes.

I manage to repeat my material in the right way for textures representing only one side of a block. Here is an example: Babylon.js Playground

As you can see, the material replicates well depending on the width, height and depth of the box.

Now I wish I could do the same thing with a “multi face” texture. But I don’t really have an idea of how to do it. How to make the texture repeat correctly (the right face in the right place), depending on the size of the box?

Here is a second playground with a multi face texture:

I hope to have been understandable, thank you in advance.

Something wrong with your options technique.


Thank you for your answer, sorry, I must have misspoken.
My goal is to have the texture repeated at each step of a unit as in the 1st Playground.
Visually, I would like to get this:
But without having to create the cubes 1 by 1 of course.

Would a tiledbox help Creating A Tiled Box | Babylon.js Documentation?

Or possibly use six planes and uscale and vscale


Tiledboxes are a perfect fit for what I want to do, great!

Thank you very much for taking the time to help me, I should have looked more into the documentation!