Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Why does the image resolution changes ?

Jolly Heron
www.ideashape.cn/
Join date: 18 Apr 2007
Posts: 71
01-21-2008 22:02
I made an texture at 400 X 500. But it automatically becomes 256 X 512 after uploaded into SL world. What's the reason ? How to make sure there's no resolution degrading during the uploading into the SL world?
_____________________
Different Virtual Worlds: http://www.ideashape.cn/
Beezle Warburton
=o.O=
Join date: 10 Nov 2006
Posts: 1,169
01-21-2008 22:09
From: Jolly Heron
I made an texture at 400 X 500. But it automatically becomes 256 X 512 after uploaded into SL world. What's the reason ? How to make sure there's no resolution degrading during the uploading into the SL world?


Textures in SL are only in powers of two with a max size of 1024: 16,32,64,128,256,512,1024

To make sure there's no degrading on upload, use an uncompressed filetype -- I use .bmp or .png for opaque and .tga for alpha (transparencies).

Using a .jpg is a double-compression - once when the program saves the file, and again when SL converts it to JPEG2000 - so is more prone to "artifacts."
_____________________
Though this be madness, yet there is method in't.
-- William Shakespeare

Warburton's Whimsies:
In SL
Apez.biz
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-22-2008 03:41
the reason for the resize is a built in requirement of how open GL handles textures. when you apply the texture to an object you can resize the object to the original aspect ratio to correct the stretching.

preferably you'll want to resize it yourself to a power of 2 in each dimension since you have more options in most paint programs and can do it more cleanly than SL will.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
01-22-2008 07:21
Jolly, I'd encourage you to read the sticky on texture sizes at the top of this forum. There's a complete explanation of of why textures must be measurable in powers of two, what happens if they're not, and a list of usable sizes.
_____________________
.

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.
Jolly Heron
www.ideashape.cn/
Join date: 18 Apr 2007
Posts: 71
01-22-2008 21:35
I know what you told. But I'm confused why it's stretched to 256X512 instead of 256X256 or 512X512 ?
_____________________
Different Virtual Worlds: http://www.ideashape.cn/
Beezle Warburton
=o.O=
Join date: 10 Nov 2006
Posts: 1,169
01-22-2008 21:47
From: Jolly Heron
I know what you told. But I'm confused why it's stretched to 256X512 instead of 256X256 or 512X512 ?


A) They don't have to be square.

B) It shrinks the dimension to the nearest power of two.

For example, a 600x400 would end up being 512x256
_____________________
Though this be madness, yet there is method in't.
-- William Shakespeare

Warburton's Whimsies:
In SL
Apez.biz
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-23-2008 04:21
they either introduced a new algorythm or we just noticed it late, but if a side is within ~95% (maybe less) of the next power of two it rounds it up, as did the op's 500 to 512
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Beezle Warburton
=o.O=
Join date: 10 Nov 2006
Posts: 1,169
01-23-2008 05:10
From: Void Singer
they either introduced a new algorythm or we just noticed it late, but if a side is within ~95% (maybe less) of the next power of two it rounds it up, as did the op's 500 to 512


Yay for me not paying attention, but now I know better.

I generally pre-size stuff in PaintShop before uploading.
_____________________
Though this be madness, yet there is method in't.
-- William Shakespeare

Warburton's Whimsies:
In SL
Apez.biz
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
01-23-2008 08:19
From: Beezle Warburton
Yay for me not paying attention, but now I know better.

I didn't notice it either, until long after the change was made. LL snuck that one in under the radar. For performance reasons, I kind of wish they'd left it at rounding everything down, but I guess I can understand why they didn't. It's probably less confusing for people this way.

By the way, Beezle, it your earlier post today, you said "power of twelve". I assume that was a typo since in your post from yesterday, you correctly said powers of TWO. Powers of twelve would be huge, hehehe.
_____________________
.

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.
Beezle Warburton
=o.O=
Join date: 10 Nov 2006
Posts: 1,169
01-23-2008 13:07
From: Chosen Few
I didn't notice it either, until long after the change was made. LL snuck that one in under the radar. For performance reasons, I kind of wish they'd left it at rounding everything down, but I guess I can understand why they didn't. It's probably less confusing for people this way.

By the way, Beezle, it your earlier post today, you said "power of twelve". I assume that was a typo since in your post from yesterday, you correctly said powers of TWO. Powers of twelve would be huge, hehehe.


Apparently, I should have been asleep. :o
_____________________
Though this be madness, yet there is method in't.
-- William Shakespeare

Warburton's Whimsies:
In SL
Apez.biz