Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Why do picture uploads get distorted?

Catteneo Galicia
Registered User
Join date: 31 Aug 2008
Posts: 17
03-12-2009 13:06
This is not a bug so much as programming oversight but I couldn't find the SL-stole-my-L$ forum.

I uploaded my first picture and had to throw it out because it was all scrunched out of proportion. Not wanting to get cheated again, I searched the wiki, video tutorials, and forums but couldn't find so much as a mention of the issue. But when I spoke to friends, I found I wasn't alone in my frustration. Their solution is to grit their teeth and quietly curse SL but I want some answers.

* How can I tell when SL is going to screw up an upload and still make me pay for it?

* More important, how can I prevent it from happening? There are no options in the camera menu except for possibly manipulating the exact size of the picture but this is unacceptable.

* Most important, WHY IS THERE NO WARNING of the potential loss??? I've looked for ways to blame myself for my mistake but I can't escape the conclusion that it's a simple matter of negligence and the attitude that it's SEP (somebody else's problem).
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
03-12-2009 13:16
From: Catteneo Galicia
This is not a bug so much as programming oversight but I couldn't find the SL-stole-my-L$ forum.

I uploaded my first picture and had to throw it out because it was all scrunched out of proportion. Not wanting to get cheated again, I searched the wiki, video tutorials, and forums but couldn't find so much as a mention of the issue. But when I spoke to friends, I found I wasn't alone in my frustration. Their solution is to grit their teeth and quietly curse SL but I want some answers.

* How can I tell when SL is going to screw up an upload and still make me pay for it?

Any time your image is using sizes other than 8,16,32,64,128,256,512,1024, or 2048 pixels, in either width or height. Second Life scales all images to powers of 2, and shows an error if you try to upload below 8 pixels. Anything above 1024 pixels will be scaled down.
From: someone

* More important, how can I prevent it from happening? There are no options in the camera menu except for possibly manipulating the exact size of the picture but this is unacceptable.

Use images with only the above sizes. ALSO, it's easy to resize the image window (Not the image) within SL to view it properly by clicking and dragging an edge. Beyond this, if you apply the image to a primitive, you can stretch the prim to the proper proportions as well.

From: someone

* Most important, WHY IS THERE NO WARNING of the potential loss??? I've looked for ways to blame myself for my mistake but I can't escape the conclusion that it's a simple matter of negligence and the attitude that it's SEP (somebody else's problem).

No idea. It's generally known (By content creators, at least, though quite frankly I can't recall how I discovered it) that images are scaled to powers of 2 once in SL, and it's easy enough to just scale prims/repeats effectively to have your image looking as it should.

ALSO
====
Note that images uploaded that are NOT a proper size for SL are not always scaled down. A 512x999 would become 512x1024, and so on. Generally it will only scale up if quite close to the next image size, to prevent lower-quality images after uploading.

Images will not scale to squares unless their proportions cause scaling that happen to square the image. A 512x256 will remain 512x256, but a 512x768 will become 512x512.

(Edited to change first response section a bit, after testing a few sizes)
_____________________
Tutorials for Sculpties using Blender!
Http://www.youtube.com/user/BlenderSL
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
03-12-2009 15:10
In addition to what Keira said, take a look at the stickied guide to texture sizes, at the top of the texturing forum. Everything you need to know on this subject is in there.

Just so you know, the power-of-two requirement for texture sizing is common to nearly all OpenGL applications.
_____________________
.

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.
Catteneo Galicia
Registered User
Join date: 31 Aug 2008
Posts: 17
Thank you
03-12-2009 15:22
Thanks Keira and Chosen.
I think a better solution on the technical side still waits to be found but your answers were very informative and helpful.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
03-12-2009 16:20
You're welcome. :)

What do you think would be a "better solution on the technical side", out of curiosity? It's an interesting topic to discuss.

You mentioned embedding some sort of warning into the UI that would inform people odd sizes will be resized when someone tries to upload one. I think that's a great idea.

I do see a potential downside, though. While it would certainly help some people understand what's happening, it could possibly add a source of confusion for others who might not understand the meaning of the message. But at the end of the day, I'm sure it would do more harm than good, so I'd be all for it.

As for the power-of-two requirement itself, not to say you're necessarily wrong to wish for different rules, but just so you know, that' not just an SL thing. It's an OpenGL thing. It's common to nearly all games and other 3D applications.

Actually, I think the restriction was lifted from OpenGL itself relatively recently. But simply changing the software platform can't change the fact that video cards are built with the existing rules in mind when they were made. Most that are in existence to day were not designed for odd sizes, and as a result, many will crash when trying to handle anything other than powers of two.

Not even all powers of two are kosher. LL for a while expanded the maximum size allowance in SL from 1024 to 2048. But they ended up backtracking not long afterward, since the larger textures were causing certain video cards to crash.

In any case, it's common practice across the whole of the 3D industry to keep textures measurable in powers of two. Even if arbitrary sizes were magically to work for all hardware and software tomorrow, it's not likely that the practice would change any time soon. Most 3D projects require the efforts of more than just one person, and with that in mind, there is something to be said for predictability. Standards are slow to change, in any industry.
_____________________
.

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.
Osprey Therian
I want capslocklock
Join date: 6 Jul 2004
Posts: 5,049
03-12-2009 16:42
SL handles textures very well in my opinion, and though people need to learn the ins and outs it takes them only a short time to get up to speed and they are wiser than before. End result - win-win - hurrah!
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
03-12-2009 19:17
From: Catteneo Galicia
Thanks Keira and Chosen.
I think a better solution on the technical side still waits to be found but your answers were very informative and helpful.

Really, as Chosen said above, there isn't much that can be done. It's the norm for most interactive 3d applications, because it's how the technology is built (Or was, until recently, and still is in some cases), and once you're used to it, it's not hard to work with at all, especially since people will rarely be viewing your pictures outside of a scalable medium (Such as prims and particles, rather than the image itself, as scaling it in your UI doesn't get saved).

The images are usually not so distorted that scaling them appropriately on a prim takes away any noticeable detail, either, unless you're showing them on a large prim (In which case, perhaps a larger texture would be a better choice).


I'd like to also say, that unless you're using larger prims, as I just mentioned, it's generally a good idea to try to keep the image size at 512 pixels or lower (After uploading). A 1024 pixel image takes considerably longer to download and process in real-time, and takes up more space in your cache, without offering enough detail to make up for it in smaller uses. 1024 pixel images will slow down loading, and prevent some people from enjoying your work as much, as they have to wait longer to see it clearly.
_____________________
Tutorials for Sculpties using Blender!
Http://www.youtube.com/user/BlenderSL
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
03-13-2009 07:56
One thing that would be nice is for the system to save hints along with the jpeg file indicating original aspect ratio, so that when you open the image from inventory, it opens the display popup with the correct aspect ratio.

However, this wouldn't quite solve the problem where people stick wrong aspect-ratio images in all the profile pic spots. I think it's unfortunate that all 3 places use different ratios: 3x4 for 2nd life tab, square for 1st life tab, and 5x9 (or whatever it is) for "picks". What were they thinking? (Heck, since they are using different ratios, they should at least use a portrait format for 1st life and 2nd life tabs.)

Sorry, rant over.

PS: I hope you didn't discard the original photo, because it's still useful. Simply drop it onto an object with the correct aspect ratio and you're good.

A good way to prepare a photo for SL:

1) Crop to desired aspect ratio (depending on the purpose). That is, if it's for 2nd Life tab, crop to 3x4 landscape (which is really 4x3). For 1st life tab, crop to square. For an object, crop to the desired object size, or if the object needs to match the image, write down the image size. If it's an image you'll be passing out as an image (like, here's a photo of my cat), it's best to crop it to powers of two sizing (in pixels).

2) Resize the image to powers of two (in pixels). If you don't, SL will, and your image software is likely to do a much better job. Powers of two include 8, 16, 32, 64, 128, 256, 512, 1024. Don't go over 1024. For example, for 4x3 image that's 1024x768, you can resize it to 1024x1024 or 1024x512. In either case the results should be better than if you let SL resize it.

3) Upload image, and apply. If it's for an object and the object needs to match the image aspect ratio, dig out your notes from step 1, and set the size accordingly. That is, if the image was 312x723 pixels, set the object size to, say, .312 x .723. You can then rescale it by dragging, or do the math and set the size explicitly if you prefer.

Final tip: for images going in profiles, USE SMALLER SIZES, like 256x256 or less (or 256x512 for Picks). If you use a bigger one, the results won't look better, but it will take longer for the image to load when someone opens your profile.
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
03-13-2009 08:04
From: Lear Cale
One thing that would be nice is for the system to save hints along with the jpeg file indicating original aspect ratio, so that when you open the image from inventory, it opens the display popup with the correct aspect ratio.

If you have a hard time remembering, or use a lot of odd aspect ratio'd images, you can put a hint in the image description, or name. I know it's not automatic, but still useful ^-^

From: someone

However, this wouldn't quite solve the problem where people stick wrong aspect-ratio images in all the profile pic spots. I think it's unfortunate that all 3 places use different ratios: 3x4 for 2nd life tab, square for 1st life tab, and 5x9 (or whatever it is) for "picks". What were they thinking? (Heck, since they are using different ratios, they should at least use a portrait format for 1st life and 2nd life tabs.)

Sorry, rant over.

Agreed! Although personally, I kinda like discovering how squished things will be when adding images to my profile.. it's like an adventure =D

From: someone

PS: I hope you didn't discard the original photo, because it's still useful. Simply drop it onto an object with the correct aspect ratio and you're good.

A good way to prepare a photo for SL:

1) Crop to desired aspect ratio (depending on the purpose). That is, if it's for 2nd Life tab, crop to 3x4 landscape (which is really 4x3). For 1st life tab, crop to square. For an object, crop to the desired object size, or if the object needs to match the image, write down the image size. If it's an image you'll be passing out as an image (like, here's a photo of my cat), it's best to crop it to powers of two sizing (in pixels).

2) Resize the image to powers of two (in pixels). If you don't, SL will, and your image software is likely to do a much better job. Powers of two include 8, 16, 32, 64, 128, 256, 512, 1024. Don't go over 1024. For example, for 4x3 image that's 1024x768, you can resize it to 1024x1024 or 1024x512. In either case the results should be better than if you let SL resize it.

3) Upload image, and apply. If it's for an object and the object needs to match the image aspect ratio, dig out your notes from step 1, and set the size accordingly. That is, if the image was 312x723 pixels, set the object size to, say, .312 x .723. You can then rescale it by dragging, or do the math and set the size explicitly if you prefer.

Final tip: for images going in profiles, USE SMALLER SIZES, like 256x256 or less (or 256x512 for Picks). If you use a bigger one, the results won't look better, but it will take longer for the image to load when someone opens your profile.


\o/
_____________________
Tutorials for Sculpties using Blender!
Http://www.youtube.com/user/BlenderSL
Catteneo Galicia
Registered User
Join date: 31 Aug 2008
Posts: 17
05-05-2009 13:01
From: Chosen Few

What do you think would be a "better solution on the technical side", out of curiosity?

...., not to say you're necessarily wrong to wish for different rules, ....


I haven't reviewed this topic lately but to belatedly answer your question...

I don't seek change to the imaging rules. I only feel the SL interface could be more intuitive. While the process may be simple once you learn it, finding answers to my questions was not so simple. Your sticky on texture sizes is testimony to the demand for informed documentation.

One option would be to offer power-of-two sizes in the Snapshot Preview size dropdown, none of which currently adhere to the rule. To get the correct size, you must enter it in the custom field. But how is one to know they need to do that? That's confusing to the uninitiated and an open invitation to error. The dropdown should contain only power-of-two sizes (or at least include them in bold text) while experienced users could apply any desired size in the custom field.

Another solution would be to include image basics in the new Quickstart PDF. Snapshots are a fundamental aspect of SL life. I threw out images because I was uninformed. SL should make it a priority to take a more responsible stance to prevent unnecessary financial loss. Inclusion in the Quickstart guide would demonstrate their concern.

I know from experience that I am not alone. To that end, I have added a brief tutorial on this topic to my own website but SL can reach a much broader audience.
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
05-06-2009 05:13
There is work in progress to add the ability to choose aspect ratios from the image preview pane, which might help here.

But I still say, saving original aspect ratio along with the compressed image sure would be nice. A conceptually simple solution that provides a more intuitive interface. The aspect ratio hint would probably best be saved in the directory entry, and that might not be a simple change.