Repeat texture instead stretch it (3D)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By KnifeOnlyI

Hi !

I have a problem you certainly view a lot of time, but I don’t find any good solution for me…

I want “repeat texture” when I scale (in reality I want extrude the wall) a mesh (like a wall).
But I don’t know how to do that. I’ve tried to to import the texture image with “Repeat” flag to “Enabled” but it didn’t change anything.

This is what I have :

And this is what I want :

The solution describe in this post doesn’t correspond to my needed because if I want a wall of size 1m and other of 100m the texture will not the same size for the player (and I wan’t create multiple materials for the same texture)

There is a same functionnality in blender with this option in blender :

Also in source engine :

We can see when he finished to scale the wall, the texture is not scaled. I fact the wall is not scaled but this is like an extrusion, and that what I want for my walls in Godot.

Thanks you all !

Note : Sorry for my very bad english. I hope my message is understandable.

:bust_in_silhouette: Reply From: Calinou

You can either create one material per mesh of different size, or enable triplanar mapping in the material. However, triplanar mapping has a significant performance cost, so its use is only recommended for prototyping (outside of terrain).