Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Square textures?

Lora Morgan
Puts the "eek" in "geek"
Join date: 19 Mar 2004
Posts: 779
04-12-2006 10:43
Should textures be square? If so, why? I hear this on occasion, as in if it's a wide texture it's still better to have it on 512x512 than 512x256. But I don't remember if I ever heard a reason to go with that. Seems like 512x256 would be more efficient if that's all the pixel space you need.
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
04-12-2006 10:47
No reason for a texture to be square just for sqaures sake. 512x256 will in theory load twice as fast as 512x512.
_____________________
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
04-12-2006 11:57
All that matters is that each side is a power of two, or a multiple of powers of two. The horizontal and vertical do not need to be identical. 256x512 is fine.

Numbers that I know work are 32 (minimum), 64, 128, 192, 256, 320, 512, 768, 1024, and 2048 (maximum). There are of course lots of other multiples of powers of two, but I haven't tried them all. Anyway, you can use those numbers in any combination. 64x1024 is just as acceptable as 256x256, for example.
_____________________
.

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.
Dnel DaSilva
Master Xessorizer
Join date: 22 May 2005
Posts: 781
04-12-2006 12:06
From: Chosen Few
All that matters is that each side is a power of two, or a multiple of powers of two.


Why? I have a template that I use for engravings that is 1024x128 (which is still 1/2 the size of a 512x512) and when I crop the edges when the lettering doesn't fit all the way accross the template I pay no attention to the resulting width. Does this case problems if my image is 697x128? I have seen no evidence of this personally.
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
04-12-2006 12:07
1024 is now the maximum. once upon a time it was 2048 and some old textures are floating around out there with that dimension, but they are downsized to a maximum of 1024 on upload now.
_____________________
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
04-12-2006 12:15
I recently needed a 1536 X 256 texture for something. It worked just fine.

1536 is obviously 512 X 3.
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
04-12-2006 12:22
From: Eloise Pasteur
I recently needed a 1536 X 256 texture for something. It worked just fine.

1536 is obviously 512 X 3.


hehe, how do you know it's still 1536 and wasn't resized. My source is Kelly Linden. If he doesn't know what he's talking about then by association neither do I. actually I think if you save the texture back to disk then check it's dimensions that will tell you. I'm curious actually let me know.
_____________________
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
04-12-2006 13:24
It was, indeed, resized.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
04-12-2006 13:53
From: Dnel DaSilva
Why? I have a template that I use for engravings that is 1024x128 (which is still 1/2 the size of a 512x512) and when I crop the edges when the lettering doesn't fit all the way accross the template I pay no attention to the resulting width. Does this case problems if my image is 697x128? I have seen no evidence of this personally.

When you upload it to SL, it will get resized to the nearest power of two multiple. Your 697 will end up getting stretched to 768. The scaling will create artifacts. Sometimes they're minor; sometimes they're severe, but they're always there. It's always better to scale things to the right size in Photoshop first, rather than let SL do it. In Photoshop, you have control over exactly what happens to each pixel so you can correct for artifacting. When you let SL do it automatically, you have no control at all, and your images will be of lesser quality than they could have been.


From: Rickard Roentgen
1024 is now the maximum. once upon a time it was 2048 and some old textures are floating around out there with that dimension, but they are downsized to a maximum of 1024 on upload now.

2048 still works just fine. There's an easy way to tell. Here's the UUID for a 512x2048 texture I uploaded just now: ac63915d-f08f-7a2c-9b54-84148d7cdcce . You can use that or you can upload your own. Apply it to a prim, make sure you're looking at it, and then turn on the texture console (ctrl-shift-3). You'll see the dimensions for all textures in your field of view listed. Note the light green text in the image below, saying "2048 x 512".



From: Rickard Roentgen
My source is Kelly Linden. If he doesn't know what he's talking about then by association neither do I.

No offense, Rickard or Kelly (you know I'm a huge fan of both of you), but Kelly, as much as I hate to say this to a Linden, please get your facts straight. 2048's became allowable in February of this year (or at least that's when it was discovered that they were allowable). There were never any release notes about it, so who knows if it was an intentional change or not, but a few of us did have a discussion about it on this very forum.

I've never played with 1536 though, so I can't comment on that.

From: Rickard Roentgen
actually I think if you save the texture back to disk then check it's dimensions that will tell you. I'm curious actually let me know.

I just exported that same texture from above, just to be sure there was nothing funky in the exporter. It exported at 512x2048, just as it had imported.
_____________________
.

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.
Candide LeMay
Registered User
Join date: 30 Dec 2004
Posts: 538
04-12-2006 13:54
From: Rickard Roentgen
1024 is now the maximum. once upon a time it was 2048 and some old textures are floating around out there with that dimension, but they are downsized to a maximum of 1024 on upload now.


Whew ... good news!
_____________________
"If Mel Gibson and other cyberspace writers are right, one day the entire internet will be like Second Life." -- geldonyetich
Robin Sojourner
Registered User
Join date: 16 Sep 2004
Posts: 1,080
04-12-2006 13:59
The reason to use square textures is that UV maps are square, and the Default mapping for everything in SL is UV. (All UV values are somewhere between 0 and 1, on the U and V axes.)

However, that being said, the possible increase in quality (which I can't see, frankly, with these old eyes; maybe you youngsters can* :D ) seems to be more than offset by the speed with which the rectangular textures will load. So, for my money, do what Chosen said. Keep each side to "powers of 2", and upload at the closest approximation to the proportions you want on the object.




*Okay, I'm not usually that old. But I pulled an all-nighter for my RL job last night, and today I'm positively creaking.
_____________________
Robin (Sojourner) Wood
www.robinwood.com

"Second Life ... is an Internet-based virtual world ... and a libertarian anarchy..." Wikipedia
Dnel DaSilva
Master Xessorizer
Join date: 22 May 2005
Posts: 781
04-12-2006 14:20
Good to know, I'll watch my crop sizes from now on.

Any day you learn someting is a good day.
Chigger Macdonald
Second Life Resident
Join date: 19 Oct 2004
Posts: 22
04-12-2006 15:26
From: actually I think if you save the texture back to disk then check it's dimensions that will tell you. [/QUOTE


Oh, my, call; me dumb, but I had no idea you can save textures to a disk that are already in game, how the heck would I do that? That will save me alot of time looking for the right size textures.
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
04-12-2006 15:32
Only works on textures you have full perms on. Find it in your inventory, double click it to open, then go up to file, and save texture to disk (think that's the option, save texture "something";).
_____________________
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
04-12-2006 15:36
heh, I stand corrected. Now please everyone, don't use many of them unless it's unavoidable :).
_____________________
Cottonteil Muromachi
Abominable
Join date: 2 Mar 2005
Posts: 1,071
04-12-2006 15:57
From: Eloise Pasteur
I recently needed a 1536 X 256 texture for something. It worked just fine.

1536 is obviously 512 X 3.



Mathematically, 1536 is not a power of 2 multiple.
I could be wrong but, as I recall, even 768 doesn't work.
Eep Quirk
Absolutely Relative
Join date: 15 Dec 2004
Posts: 1,211
04-12-2006 16:11
http://secondlife.com/badgeo/wakka.php?wakka=texture
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
04-12-2006 17:09
From: Cottonteil Muromachi
Mathematically, 1536 is not a power of 2 multiple.
I could be wrong but, as I recall, even 768 doesn't work.

768 does work. I've used it plenty of times.

As for 1536, can you please explain what you mean? 1536 is 512x3, just as 768 is 256x3. How do you see 1536 as different?

As for why it doesn't work, I did a little experimentation, and here's what I found out. It seems the only acceptable number above 1024 is 2048. I uploaded a few textures with side measurements of 1280, 1536, 1792, 2048 (all multiples of 256, obviously). According to the texture console, all were resized to 1024 except for the 2048. This, combined with the fact that Kelly allegedly did not know that 2048 was workable, leads me to believe that last February's sudden allowance of 2048's was a bug. If so, now that we're talking about it, they'll probably squash it, which would be a good thing. There's no reason to make textures that large.
_____________________
.

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.
Cottonteil Muromachi
Abominable
Join date: 2 Mar 2005
Posts: 1,071
04-12-2006 18:16
From: Chosen Few
As for 1536, can you please explain what you mean? 1536 is 512x3, just as 768 is 256x3. How do you see 1536 as different?


A power of 2 number is times two the value of itself to basically get a doubling progression. So in maths 256, 512, 1024 and 2048 is expressed by 2`8, 2`9, 2`10 and 2`11. (Sorry I don't know how to put in superscript text in here)

768 and 1536 are numbers divisible by 2 but arent powers of 2. If you keep dividing them downwards (768/2=384, 384/2=192, and so on) you'd end up with 1.5 instead of 1.

To give an example. We sometimes get confused because when we add RAM onto our computers, its possible to get 768Mb. But the RAM modules themselves are composed of sizes in powers of 2. You can't buy an individual RAM module thats 768Mb.

Regarding textures, the last time I tried using a 512 x 768, SL squashed it down to 512 x 512. It could be that I mistakenly keyed in the image size, but I won't know until I try again. I've also tried 1536 unsuccessfully.
Cottonteil Muromachi
Abominable
Join date: 2 Mar 2005
Posts: 1,071
04-12-2006 18:17
.
Chigger Macdonald
Second Life Resident
Join date: 19 Oct 2004
Posts: 22
04-12-2006 18:43
From: Rickard Roentgen
Only works on textures you have full perms on. Find it in your inventory, double click it to open, then go up to file, and save texture to disk (think that's the option, save texture "something";).

Thanks Rickard, that helps.
Beatfox Xevious
is THOUSANDS OF PEOPLE
Join date: 1 Jun 2004
Posts: 879
04-12-2006 22:46
From: Chosen Few
As for why it doesn't work, I did a little experimentation, and here's what I found out. It seems the only acceptable number above 1024 is 2048. I uploaded a few textures with side measurements of 1280, 1536, 1792, 2048 (all multiples of 256, obviously). According to the texture console, all were resized to 1024 except for the 2048. This, combined with the fact that Kelly allegedly did not know that 2048 was workable, leads me to believe that last February's sudden allowance of 2048's was a bug. If so, now that we're talking about it, they'll probably squash it, which would be a good thing. There's no reason to make textures that large.
I can say with absolute certainty that 2048 textures in SL are nothing new. I have some 2048x2048 textures in my inventory that I uploaded in June of 2004, shortly after I joined SL. And yes, I did verify their size by re-downloading them. :)
_____________________
My Beatworks: Zephyr Chimes wind chimes, the KanaMaster Japanese kana tutor, and the FREE Invisibility Prim Public. Look for them at the Luskwood General Store in Lusk (144, 165).

"You have been frozen. You cannot move or chat. A pony will contact you via instant message (IM)."
- mysterious system message I received after making off with Pony Linden
Eep Quirk
Absolutely Relative
Join date: 15 Dec 2004
Posts: 1,211
04-12-2006 22:51
From: Cottonteil Muromachi
.
Psst, edit the message and delete it, noob...
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
04-13-2006 02:48
You're missing the word MULTIPLE in your analysis.

1536 is an integer multiple of a power of 2, it's 3 X 2^9

SL allows some of the integer multiples of powers of 2 so you can upload textures in some different aspect ratios. Want a sign that's 3 X 2? 768 X 512 pixels (2^8 X 3 by 2^8 X 2 - there are smaller ones too I'm sure, maybe 384 X 256 works nicely?) gives you a texture in the right aspect ratio so when you apply it to your 6m X 4m sign it's precisely how you expected it to look.

Hope that helps make it clear - obviously this is only relevant for some of the potential multiples, 4 X 2^n is a power of 2 itself - 2^(n+2) to be precise.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
04-13-2006 05:50
From: Cottonteil Muromachi
A power of 2 number is times two the value of itself to basically get a doubling progression. So in maths 256, 512, 1024 and 2048 is expressed by 2`8, 2`9, 2`10 and 2`11. (Sorry I don't know how to put in superscript text in here)

768 and 1536 are numbers divisible by 2 but arent powers of 2. If you keep dividing them downwards (768/2=384, 384/2=192, and so on) you'd end up with 1.5 instead of 1.

To give an example. We sometimes get confused because when we add RAM onto our computers, its possible to get 768Mb. But the RAM modules themselves are composed of sizes in powers of 2. You can't buy an individual RAM module thats 768Mb.

Regarding textures, the last time I tried using a 512 x 768, SL squashed it down to 512 x 512. It could be that I mistakenly keyed in the image size, but I won't know until I try again. I've also tried 1536 unsuccessfully.

Everthing you're saying would be absolutely correct except for the fact that what we were talking about was not just "power of two numbers" but also power of two MULTIPLES. The number 96, for example is not a power of two, but it is a multiple of a power of two since it's 3x32.

Your RAM example is not the confusion source you seem to think it might be, but in fact is a perfect example of what we've been talking about. You create 768 by adding 512 plus 256. The very fact that it takes more than one module to make it work is the definition of multiple. No one here was trying to say that 768 is a power of two itself, only that it is a MULTIPLE of a power of two. (3x256, or 512+256)

From: Beatfox Xevious
I can say with absolute certainty that 2048 textures in SL are nothing new. I have some 2048x2048 textures in my inventory that I uploaded in June of 2004, shortly after I joined SL. And yes, I did verify their size by re-downloading them.

Interesting, Beatfox. I guess 2048 has been the best kept secret in SL for a long, long time then. I didn't discover it worked until February, as I said, which was more than 2 years after I joined. So, that makes at least one person who knows of 2048's from way back in Beta, one from June of last year, and several from February of this year. I guess it's safe to say it's been available all along, but most people generally notice it, for whatever reason.

From: Eloise Pasteur
You're missing the word MULTIPLE in your analysis.

1536 is an integer multiple of a power of 2, it's 3 X 2^9

SL allows some of the integer multiples of powers of 2 so you can upload textures in some different aspect ratios. Want a sign that's 3 X 2? 768 X 512 pixels (2^8 X 3 by 2^8 X 2 - there are smaller ones too I'm sure, maybe 384 X 256 works nicely?) gives you a texture in the right aspect ratio so when you apply it to your 6m X 4m sign it's precisely how you expected it to look.

Hope that helps make it clear - obviously this is only relevant for some of the potential multiples, 4 X 2^n is a power of 2 itself - 2^(n+2) to be precise.

Thanks, Eloise. You said it better than I. :)
_____________________
.

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.
1 2