Is there a way to make a seamless texture wrap, or repeat on an object in Godot?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Brinux
:warning: Old Version Published before Godot 3 was released.

Exporting a wall (flat plane) from Blender with a UV map and a seamless texture.
Is there a way to get the texture (png) to repeat once the end of the texture is reached?
It is a seamless or tileable texture, but I cannot find the button to make the material wrap to the other side of the PNG file once it is reached.
Thanks

The repeat texture option is on?

eons | 2016-11-05 01:50

:bust_in_silhouette: Reply From: Zylann

You would need the UVs to go beyond the 0…1 space, and your texture must have the repeat flag on. Making it so it repeats like that should be done in Blender probably, because Godot doesn’t have modeling capabilities built-in.

Edit: just had a quick look and I think the uv xform property is what you are looking for, but I still think making the correct modeling in Blender would be easier.

enter image description here

It’s a 4x3 matrix. Changing the scale should be done by modifying xx and yy, and offset with xo and yo. I have no idea what are the other values for, given UVs are 2D coordinates…

And to use the UV xform the texture needs to be on that mode too

eons | 2016-11-05 15:32

Many thanks for the response :slight_smile:
I DO have it correct (with repeating seamless texture) in Blender (Cycles, as Blender Internal is depreciated ) .
The Better Collada exporter does not do anything with textures (even clicking “Copy Images” does not copy any images, even if everything is is the same folder).
So, I have to manually copy over all textures, and then assign them to Godot’s Diffuse field etc. That’s when the repeating texture becomes an issue, because all texturing is manual in Godot.
I’ll play with the Uv Xform and see what I can get. Thanks again :slight_smile:

Brinux | 2016-11-05 15:43

Okay, figured it out - you guys got me going down the right track.
First, the Uv Xform will only scale/offset the image, but not repeat it - a cool trick I wasn’t aware of.

To repeat the texture, you have to go the the next screen under diffuse, then under ImageTexture, you turn the Repeat flag on, which is now what I realize is what Zylann meant in the first place and I didn’t get it. Just posting this and some pics for anyone else who has this issue in the future.

click on the arrow point right, next to diffuse…

and then click on repeat, under flags…

Brinux | 2016-11-05 16:20