Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Need help with Texture Offsets

Robin Ivory
Registered User
Join date: 20 Jan 2007
Posts: 443
02-15-2007 10:24
I've spent probably an hour on this and just don't know enough to fix what probably is a simple thing.

I built a wall that consist of 5 pieces: the top piece is 10x1.5 and the bottom piece is 10x1.2, the three middle pieces are each 2.4x2. When placed together with the 10x1.5 on top and the 10x1.2 on the bottom with the three 2.4x2 in the middle, I have a wall with two window openings.

My problem is that when I place a wood board texture on the completed wall, I am unable to get the texture of boards on the middle pieces to align evenly with the top and bottom pieces. I have played with the offset and they just won't align.

Any suggestions would be appreciated.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
02-15-2007 10:41
If I'm reading you right, then the total height of your wall is 4.7 meters (1.5 + 1.2 +2), correct? If that's the case, here's how the math breaks down:

4.7 meters = 1 full texture repeat
1.5 / 4.7 = 0.32
1.2 / 4.7 = 0.26
2.0 / 4.7 = 0.42

Use the above numbers for the vertical repeat settings. Note that the numbers are not exact, but they're as close as SL's limited rounding capabilities will allow.

For the offsets, you can calculate the math, or you can do it simply by trial and error. I chose the latter, and here's what I came up with:

Top piece V offset: 0.32
Middle piece V offset: -0.03
Bottom piece V offset: -0.37

Put all that together, and you get one seamless whole texture spread across three prims with the heights you specified.

For the horizontal repeats and offsets, apply the same logic.

10M = 1 full repeat
2.4 / 10 = 0.24

I think you get the idea.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
02-15-2007 12:58
Chosen's advice is the best, as usual.

Another thing you might try, to help teach yourself, is to make a texture that is sort of like graph paper. A grid. Maybe some colored tick marks on the grid.

Then use Chosen's advice to put it on the wall, to see how it works.

regards
lee
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
02-15-2007 13:14
It is possible to do the math on texture offset type things (I've done it for some scripted things) but it's very unpleasant.
_____________________
-Seifert Surface
2G!tGLf 2nLt9cG
Ged Larsen
thwarted by quaternions
Join date: 4 Dec 2006
Posts: 294
02-15-2007 15:12
From: Seifert Surface
It is possible to do the math on texture offset type things (I've done it for some scripted things) but it's very unpleasant.


I'd been thinking for a while about automating texture offset calculations for some silly projects (like this one ), but, dang, if Seifert Surface thinks the math is unpleasant, I think I'll put aside that particular goal for a little bit...

...or, maybe take it on as a challenge. ;)
Seifert Surface
Mathematician
Join date: 14 Jun 2005
Posts: 912
02-15-2007 15:52
Well, the last thing I was doing required dealing with lining up textures across cut/dimpled prims. It's all just linear functions, but its a pain to get all of the parameters right at once.
_____________________
-Seifert Surface
2G!tGLf 2nLt9cG
Sterling Whitcroft
Registered User
Join date: 2 Jul 2006
Posts: 678
02-15-2007 16:13
"IDEA ISLAND" has a nice intermediate texturing tutorial...good info on repeats and offsets and some nice template/grids to help figure them out.