What do the texture tiling and offset values relate too?

I have a large texture (1050x650) that I’m applying to a plane, it’s a basketball court, so I need it centered and to fit on the plane, they have the same ratio. To get it to fit I’m having to use values like ‘0.01’ for both the tiling and offset. At that range, the smallest value change has huge effects. I used a large texture thinking I would have more control. The ‘Scale in Lightmap’ setting are similar. What is the logic here and how can get more control of the texture? Thanks.


When i started using unity and bringing in meshes from Max, the default scale of 0.01 seemed strange. And it made navigation difficult. Scrolling the mouse wheel would zoom right past the objects. So I got in the habit up scaling them up to 0.1. This didn’t seem to effect the textures. In the first image, one mesh is set to .01 and the other to .1, they both use the same material with the texture scaled to .25.
In the second image the mesh is set to .1 and you can see the texture scale and tiling values. I still cant get it centered. How can I correct this? Thanks!

alt text
alt text

The actual texture size (64x64 vs 1024x1024) has nothing to do with scale and offset. If you have a picture of a cat, it will look the exact same for any tile/offset, no matter the texture size. But, like normal, a stretched small texture will be grainy, and a shrunken large texture is a waste of memory.

Offset is always in Tiles, from 0-1. Offset of 0.5 means to shift by half of the current tile size. So, no matter what the tiling, if you see a texture is 1/2-way across a seam, offset 0.5 will fix it. Easiest to set tiling first, then tweak with offset. Also, offset of 1.5 is legal, but it’s the same as 0.5 – like rotation of 540 is the same as 180.

Depending on the unwrap, offset also tends to work backwards. 0.25 will often shift you left by 25% of a tiIe, instead of right.

Something is not right… Typically a plane will have texture coordinates varying from 0…1 across their width and height. That should mean a texture is mapped perfectly to the plane. If your texture has the same aspect ratio as the plane, then it’ll not be distorted. If you have a tiling factor of 0.01 it kinda suggests your plane has texture coords varying from 0…100. That’s possibly your problem. To check this, all I did was create a plane in Unity, and a texture maps perfectly to it.

Oh, and to answer your question, tiling controls how many times the texture is duplicated across your plane. If your texture coords are 0…1, and you set a tiling factor of 3.0, then you’ll get the texture mapped 3 times, so you’ll have something like a noughts and crosses (oxo) board. Offset similarly controls where these tiles start. Play with a plane you create in Unity, it’ll help you understand these things.

Here’s one for you. What if you wanted to rotate the texture around on a cube for example?
My texture is a square that is placed on a cube and with my current set up it is upside down, I could rotate the object but it changes the XY controls of it when its let’s say 90deg right. Is there a simple way to rotate the texture?