Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

What is the minimum divisor for images?

Loydin Tripp
It may be virtual but...
Join date: 28 Apr 2006
Posts: 150
12-03-2007 14:03
I was trying to think of a better way to say that so let me explain. I spent an hour looking for this information, it was answered in another person's forum question but I could not remember the title of the message and it was a year ago.

I know the maximum resolution of an image is 1024 per side (used to be 2048). And I believe the minimum is 32 pixels.

The question is:

Can the image be any combination of width and height as long as it can be divided by 32? If that is the wrong number, what is the minimum divisor?

Thanks.
_____________________
Loydin Tripp -in Lingua Franca

"No man is an island",
but I bought one anyway...
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
12-03-2007 14:32
See the big orange sticky at the top of the forum, entitled Texture Size, Pixel Counts, Video Memory, and File Formats? Read it. It's got a complete list of all allowable texture sizes.

In short, the answers to your questions are as follows:

1. The minimum dimension is 8, not 32.

2. Yes, textures can be any combination of allowable sizes, as long as neither dimension is less than 8 or greater than 1024. If you exceed that range, SL will resize the texture to fit its requirements at the time of upload, and the results are not always pretty.

3. Being divisible by 32 has nothing to do with it. It's all about powers of 2 (just like many things in computing). The number 32 just happens to be a power of two, so it's one of the allowable measurements, but it's not any kind of "unit" by which the other sizes are measured. All powers of two between 8 and 1024 are usable.

So, 8x1024 is fine, 64x512 is fine, 128x256 is fine, etc., etc., etc. Any combination of powers of two between 8 and 1024 is allowable. Try to do something like 2x1024 though, and SL will upsize it to 8x1024. Try to do 1024x2048, and SL will downsize it to 1024x1024. Try to use any number that is not a power of two, and SL will downsize it to the nearest power of two (unless it's less than 8, in which case it will be upsized to 8).

Anyway, as I said, read the sticky. It's got lots of valuable information on the rules, and the consequences, of texture sizing.



Note: The texture size chart in the sticky has become a little hard to read since LL turned off bbCode on the forums. When I first wrote it, it was formatted in nice neat columns. As soon as they turned off bbCode, it became simple, unformatted text. Just now that in each line, the numbers on the left are the texture size, the number in the middle is the amount of video memory the texture uses if it's 32-bit, and the number on the right is how much it uses if it's 24-bit.
_____________________
.

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.
Loydin Tripp
It may be virtual but...
Join date: 28 Apr 2006
Posts: 150
12-03-2007 15:08
Chosen, thanks. Read the sticky several times before I posted the question plus quite a few others but missed the divisor answer I was seeking.

Most likely this was Linden Labs destruction of your formatting.

And thanks for the very thorough article about image data, if all articles about the technical aspects of Second Life were written as professionally and accurately it would be much easier to learn.

When did you last update it? I have seen a number of articles that disagree with the issues of Alpha in PNG. Would you recommend a certain way of doing this?
_____________________
Loydin Tripp -in Lingua Franca

"No man is an island",
but I bought one anyway...
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
12-03-2007 19:04
Thanks for the compliment. Sorry to hear you didn't get the answer you'd been looking for from the sticky itself. I'd like to blame it on the formatting, but I'll look for a way to explain that part of it more clearly if I can. Thanks for letting me know.

To answer your question, I last updated it about 10 days ago, actually. PNG support was added to SL about 6 months ago, but I didn't get around to adding a section describing PNG until now.

What "issues of alpha in PNG" are you referring to, by the way? Because PNG supports both alpha transparency and simple transparency, people tend to use a pretty wide range of techniques with it. I prefer alpha transparency, as it's more controllable, but many prefer the plain obviousness of simple transparency. There are aspects of both that could be defined as "issues". Which ones did you mean?
_____________________
.

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.
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
12-03-2007 19:17
From: Chosen Few
Note: The texture size chart in the sticky has become a little hard to read since LL turned off bbCode on the forums. When I first wrote it, it was formatted in nice neat columns.
Btw, the tricks in this thread work to restore the formatting on your columns, Chosen: /54/2f/226867/1.html

E.g., when I hit quote on the first post in your sticky, I see the columns laid out very readably :)
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
12-03-2007 19:31
Thanks, Nika. From what I can see, that works while you're reading the text in the reply window, but as soon as you hit Preview (or presumably Submit), the published results lose the formatting again. I'd hesitate to put an instruction in there saying "hit Quote to read this" or people would probably end up submitting quotes of the OP to the end of the thread alll day long.

In any case, while the columns are much better in the Reply window, they're still not perfect. The spacings were originally set up so that when they were code formatted, everything would be perfectly aligned. That requires them to be a bit out of alignment in the plain text formatting Also, the highlighted section headers are obviously not visible in the Reply window. It is a good tip though for a lot of situations, so thanks for it.

There's unfortunately no good way to preserve the formatting without requiring the reader to take action, whether it be hitting the quote button, or installing the Greasemonkey plugin at the top of the Resident Answers forum.
_____________________
.

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.