|
FistFunk Avalanche
Registered User
Join date: 16 Nov 2006
Posts: 3
|
11-23-2006 08:06
Recently I read this article about zoning your textures. Wow! I decided not to be a texture hog and lag producer, so why not cram all gfx for a multi-prim object into one texture and adjust the display for every side I want to customize with the repeat & offset parameters for the textures? Unluckily there is a reason. The offset parameters just work as they are supposed to do, but the repeat parameters are killing me. Let's say I change the x repeat value from 0.160 to 0.163. The textur changes it's horizontal stretching a bit, but as soon as I click on another prim in the same linkset it jumps back to 0.160!The same applies to the vertical repeat. Use of llScaleTexture yields the same results. This is not a lag problem since all other adjustments on the prim are permanent. Only the texture repeat values seem to cause this kind of trouble when working with 0.001 steps. Is this a bug/known issue or am I doing something wrong? Any help would be deeply appreciated!
|
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
11-23-2006 09:51
It's difficult to define whether it's actually a bug or not, but it is definitely an issue. SL's rounding for texture repeat values (and other things) is pretty limited, even more so if you're using planar mapping.
The solution is to make sure that when you divvy up your canvas, you use fractions that are SL-friendly. For example, if you're texturing a cube, you need six panels, but dividing by six will likely be problematic for the repeats. Dividing by eight, however is safe*. So, divide your canvas into 8 equal sections, and fill in six of them with the six textures for your cube.
Of course, you'll have two empty panels, or one empty quarter canvas, this way so it might be a little wasteful. You can decide for yourself on a case by case basis whether it's worthwhile or not. If you've got another surface that could benefit from a texture that could fit in that area, then it's probably a good idea. If not, then using two textures, one a 4-panel, and the other a 2-panel, is probably a better idea.
* I'm not inworld right now to verify that the 1/8 division is in fact acceptable, but I'm fairly sure it is. If not, the principle is still sound. Find fractions that do actually work, and avoid ones that don't. For complex objects with a lot of faces, you may need to do a lot of trial and error until you learn what works. (And then more trial and error again when the next version of SL changes the rounding again.)
_____________________
.
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.
|
|
FistFunk Avalanche
Registered User
Join date: 16 Nov 2006
Posts: 3
|
Calculations for working fractions...
11-23-2006 15:58
and the horrible result. Actually there are only two usable fractions I could come up with after a little session with Excel. I left out all fractions that couldn't yield an usable result at first glance. The results can be seen here: Repeat Fraction Dec.Fraction 1024 512 256 128 64 32 16 8 0.80 4/5 1.2500 819.2 409.6 204.8 102.4 51.2 25.6 12.8 6.4 0.40 2/5 2.5000 409.6 204.8 102.4 51.2 25.6 12.8 6.4 3.2 0.20 1/5 5.0000 204.8 102.4 51.2 25.6 12.8 6.4 3.2 1.6
0.50 1/2 2.0000 512 256 128 64 32 16 8 4 0.25 1/4 4.0000 256 128 64 32 16 8 4 2 0.20 1/5 5.0000 204.8 102.4 51.2 25.6 12.8 6.4 3.2 1.6 0.10 1/10 10.0000 102.4 51.2 25.6 12.8 6.4 3.2 1.6 0.8 0.05 1/20 20.0000 51.2 25.6 12.8 6.4 3.2 1.6 0.8 0.4 0.04 1/25 25.0000 40.96 20.48 10.24 5.12 2.56 1.28 0.64 0.32 0.02 1/50 50.0000 20.48 10.24 5.12 2.56 1.28 0.64 0.32 0.16 0.01 1/100 100.0000 10.24 5.12 2.56 1.28 0.64 0.32 0.16 0.08
0.64 16/25 1.5625 655.36 327.68 163.84 81.92 40.96 20.48 10.24 5.12 0.32 8/25 3.1250 327.68 163.84 81.92 40.96 20.48 10.24 5.12 2.56 0.16 4/25 6.2500 163.84 81.92 40.96 20.48 10.24 5.12 2.56 1.28 0.08 2/25 12.5000 81.92 40.96 20.48 10.24 5.12 2.56 1.28 0.64 0.04 1/25 25.0000 40.96 20.48 10.24 5.12 2.56 1.28 0.64 0.32
This is quite harsh, since it leaves a maximum canvas division of 4x4=16 zones...not as much as I hoped would be possible. Of course you can still achieve a lot more if you are willing to eyeball well-fitting settings for the texture....but I did the math now because it could have helped me to save significant amounts of time. *sigh* To which deity do I have to sacrifice a Linden to get the rounding issue fixed? 
|
|
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
|
11-23-2006 17:12
i call it a bug, its never been 100% dead accurate becuase of the reasons above .. but it used to be alot more accurate,
ie 1.25 would maby jump to 1.26 or whatever where as now 1.25 = 1.20 no matter what, 0.01 i can deal with, but not large jumps, so ive reported it every version
|
|
FistFunk Avalanche
Registered User
Join date: 16 Nov 2006
Posts: 3
|
11-23-2006 18:05
Then it's much worse for you than for me. For me it works in the 0.01 range. It starts in the 0.001s i.e. when I enter 0.125 it jumps to 0.120.
Thanks for reporting the bug!
|