- Home /
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.
update:
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!
Are you perhaps using "use real world scale" when uvmapping in max? I think the best way to make tiling work as you want it to is to do it all in max, without using real world scale. Real world scale is the devil!
i'm not doing anything specific regarding UV in $$anonymous$$ax at all. But the building was modeled using real world scale in another program. I 'Generate Lightmap UV's' when bringing them into Unity. Are you familiar $$anonymous$$ax? How do I change that? Thanks.
the solution was to just create a plane in unity and apply the material to it. I'll look into the real world scale issue. I believe it's causing trouble with my lightmapping as well.
Answer by Owen-Reynolds · Oct 05, 2012 at 09:39 PM
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.
Answer by Graham-Dunnett · Oct 05, 2012 at 08:13 PM
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.
Answer by lCmt · Nov 13, 2013 at 04:29 PM
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?
Your answer
Follow this Question
Related Questions
I need help with a Texture 2 Answers
Having Trouble with Texture Tiling and offset values. Very specific case. 2 Answers
Animation Tiling/Offset 0 Answers
The correct way of making Texture Atlas 0 Answers
Bullet Mark Texturing offset too far 1 Answer