Lossless uploading of images (incl. sculptie textures)

Forum for the CDS Artisan Guild


Moderator: SC Moderators

Post Reply
User avatar
Sleazy_Writer
Master Word Wielder
Master Word Wielder
Posts: 429
Joined: Wed Dec 06, 2006 6:38 am

Lossless uploading of images (incl. sculptie textures)

Post by Sleazy_Writer »

I just noticed that SL has a new option: all images including sculptie textures can be uploaded with lossless compression. This means: no loss of quality, but at the expense of a larger size. My question to the New Guild:

When is this useful for SL?

The increase in size depends on the settings LL chose, but it really wouldn't surprise me if a lossless image was 5 times larger than the regular one: that's not something you want to do for the entire 3rd sim :D .. I think I'll only rarely use it, to improve a sculptie -- what do you think?

Here's an example: The top one is lossless (don't look at the size, SL does compress it), the middle one is the usual jpg which SL doesn't use, and
the bottom one is jpeg2000, which SL normally uses.

Image

User avatar
Sleazy_Writer
Master Word Wielder
Master Word Wielder
Posts: 429
Joined: Wed Dec 06, 2006 6:38 am

Re: Lossless uploading of images (incl. sculptie textures)

Post by Sleazy_Writer »

Yup, it really helps for small sculpties. My losslessly uploaded 16x16 sculptie didn't have the undesired bumps that the normally uploaded one had.

But the feature is buggy, caveats explained here: http://forums.secondlife.com/showthread.php?t=215869

User avatar
Moon Adamant
I need a hobby
I need a hobby
Posts: 873
Joined: Sun May 28, 2006 1:26 pm

Re: Lossless uploading of images (incl. sculptie textures)

Post by Moon Adamant »

The thing about textures is rather simple:

all image files are compressed into jpeg2000 format by SL's algorythm, which not only compresses with loss, but also transforms whatever you are uploading in a ^2-sided file at 100 dpi.

Now there are algorithms and algorithms: the SL algorythm is thought to reduce bandwidth consumption in detriment of quality. The photoshop and other graphical applications algorithms tend to compress towards quality.

So what i generally do is:
- first of all, work LARGE - if you want your final texture file to be 512*512, work at 1024*1024
- use Photoshop (or other) instead of SL to make the compression. That is, don't upload a file 'as it turns out'. Before uploading, use Image Size command in Photoshop to do the following (i generally use one of the bicubic algorithms):
- transform the image into a correct 100 dpi image
- resize the image to a ^2 side image - because even if distorted, photoshop will always do it better than SL. Textures to be repeated (say, a wooden flooring) will also repeat better if the side are powers of two - you won't see so many of those flashing pixels, etc. Remember that you must always reduce the image size rather then enlarging: if your image is 350 px in width, say, it will look better if you reduce the width to 256 instead of enlarging it to 512.

Then i always upload tgas, seeing that tga is a lossless format. So obviously you lose less from converting TGA to jpeg 2000 than from jpeg (in which you have already lost a bit) to jpeg2000.

If you are uploading an image that is not meant to be repeated, and want to maintain strictly its proportions (say, a logo or a painting), then you can add a blank margin to the original file to 'fill in' the gap between the image's size and the next ^2 dimensions.

If you take these precautions, there isn't a significant loss. So you don't need to upload stuff without compression. In any case, if you NEED something with a high res - say it's a commercial poster for a client - then perhaps it pays to upload it 256*256 with no compression rather than 512*512 compressed.
But i can also say that i seldom upload stuff larger than 512 myself - unless say, you need a string of text, and then can upload a 1204*128 (which is smaller and better res as the text is concerned than a 512*512 of the same, in which i need to use smaller fonts and waste a lot of space in the background). So it's this kind of reasoning that should be made.

Sculpties is quite another thing, i think. The issue is that you do work with a very small image to start with, so you have few pixels to define the sculpty shape. What happened is that the quality loss made the sculpties even more clunky than they must be. The reason is that a compression algorithm works by creating useful 'shortcuts' when listing the pixels' characteristics. A lossless format lists the pixels as they ARE. But a compression algorithm can say 'ah, pixel A is 57 green, and B is 53, so i'll list instead that pixels A= B=green 55', thus saving size in the file. But that causes indefinitions and fuzziness in the sculpty, since vertexes get slightly displaced - don't forget that the values of RGB determine the location of the vertexes. So i would say that sculpty textures should be uploaded with no compression.

Eudaimonia now!
User avatar
Tanoujin Milestone
I need a hobby
I need a hobby
Posts: 538
Joined: Thu Jul 26, 2007 5:42 pm

Re: Lossless uploading of images (incl. sculptie textures)

Post by Tanoujin Milestone »

100 dpi target resolution? Thats good to know, i can calculate inworld effective resolution now, thanks so much! The mac bmp format seems to be lossless like tga is, right?

And what sculptmap size is reasonable with lossless upload now? Last thing i heard was the sculptmap effectively is 32*32, would be wonderful if we could go for that now (because this ugly hovering spheres that change into sculpts on rezz may be caused by sculptmap overkill...) Please share your experiences with lossless 32*32 and 64*64 compared to the lossy 256*256 (!) i have already seen in use...

Be kind, for everyone you meet is fighting a hard battle.
Ian Maclaren
Post Reply

Return to “CDS Artisan Guild”