Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

RLE compression on .tga files

Mirra Hathor
Reality Deviant
Join date: 4 Jul 2004
Posts: 160
03-01-2006 07:37
I had been told once, many many moons ago, that the RLE compression option on saving a TGA file was a bad bad thing, for reasons I no longer remember. Well, last night someone showed me a skirt she'd made & she stated she'd used rle on it & it looked just fine. On a 512 image she reported a filesize of about 180 kb-- significantly smaller than the uncompressed 1 mb for a similar tga image. So I tried it-- and it worked for me too on a 32 bit garment image. It looked the same as an uncompressed tga on close examination-- if detail was lost, I couldn't tell...Hmmm...

SO~
Here's the questions part:
1) Is there any sane reason that rle should not be used on clothes?
2) Is there any sane reason rle should not be ised on 32 bit textures intended for prims, or even 24 bit tga's for that matter?

I supose I am wondering if the Lindens fixed/changed something since the summer of 2004 & I just missed it or if I was just given faulty info & have been feeding the lag monster unnescesarilly all this time... :rolleyes:
_____________________
Mirra Image Designs
Wilmot (87, 18)


Riverbend Town Market
Elar Imerra (236, 197)



Port Cos (186, 231)
Introvert Petunia
over 2 billion posts
Join date: 11 Sep 2004
Posts: 2,065
03-01-2006 07:55
The reason to avoid RLE compression is that the SL uploader may get confused by it and the textures are all converted to JPEG2000 upon upload anyway.

Yes, TGA files on your local drive are big there are two "fixes":
  1. Keep your work in its original PSD or PSP format, produce TGAs only for upload and then delete the local copies.
  2. Store your TGA files in a ZIP archive or "compressed folder" in Windows terminology. The compression of random TGAs by the "adaptive LZW" compression in ZIP will probably give you higher compression than RLE anyway; you can think of it as "RLE Turbo". Also having them zipped up makes it harder for you to accidentally modify them.
Laukosargas Svarog
Angel ?
Join date: 18 Aug 2004
Posts: 1,304
03-01-2006 07:58
This is speculating... so I deleted it !

... see correct answer below

|
|
\ /
_____________________
Geometry is music frozen...
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
03-01-2006 08:00
Okay, a couple of answers here. First, let' talk about how SL uses images, and then I'll touch on what RLE actually does.

For the first part, there's no point whatsoever in pre-compressing an image prior to upload to SL. Every single image in SL is converted to JPEG2000, another type of compressed format, at the time you upload it. The conversion to JPEG2000 is done pixel by pixel, meaning the source file size is completely irrelevant. All that matters is the number of pixels and the number of channels in the image. The end result will be exactly the same size, regardless of whether or not the source image was compressed. Remember, the actual TGA WILL NOT ever be uploaded to SL. Only the JPEG2000 copy of it will be uploaded.

The only difference is that if the source is compressed, the SL client has to do more work when it converts the image than if it's not. The reason is simple. In order to convert the image to JPEG2000, the client first has to "see" all the pixels, which means it has to uncompress the image. Then it recompresses as it converts. That extra step means more processing power is required, and sometimes it can lead to errors.


Okay, for the second part, generally speaking, RLE compression can be good and bad. It's pretty fast, and it's lossless, which is good, but the way that losslessness is acheived can be rather clumsy. RLE is a very simple compression algorithm which can yield tremendous compression rations (really tiny files) if the horizontal lines in an image are consistent, but for some images it can actually increase file size. I've never had much use for it myself.

Storage space practically grows on trees these days, so with the exception of the web, there's not much point in compression. I'd much rather go uncompressed and keep everything predictable as much as possible. When you compress, you never know quite what the results will be.
_____________________
.

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.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
03-01-2006 08:06
From: Laukosargas Svarog
I don't understand why we can't upload jpg2000 directly.

Most likely because the JPEG2000's that the SL client creates for us are optimized for SL purposes. Were LL to allow us to mess with those settings, the results wouldn't be pretty. We'd end up with thousands of different types of JPEG2000's instead of one. Not good.

Also, it would add some pretty unnecessary work for the client. Right now there's only one way to upload files. The workflow for every single image goes Read File -> Look at Pixels & Channels -> Convert to JPEG2000 -> Upload. If we uploaded our own JPEG2000's. there would have to be 2 different workflows, one for our JPEG2000's and one for everything else. I wouldn't bother adding that if I were LL. There's just no point.
_____________________
.

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.
Laukosargas Svarog
Angel ?
Join date: 18 Aug 2004
Posts: 1,304
03-01-2006 08:07
well I had no idea the client did the jpeg compression, but to be honest I've never really given it much thought, guess it should've been obvious really, but where did you find that info ?
_____________________
Geometry is music frozen...
Introvert Petunia
over 2 billion posts
Join date: 11 Sep 2004
Posts: 2,065
03-01-2006 09:01
From: someone
well I had no idea the client did the jpeg compression, but to be honest I've never really given it much thought, guess it should've been obvious really, but where did you find that info ?
From the copius SL user guide, of course ;)

Actually, there was a time when Lindens explained some of their technology and there were whitepapers and informative postings. However during the Great Accidental "Oops!" Forum Purge Without Backups of 2004 and the removal of the whitepapers by the "can't let our competitors know our ultra-secret JPEG-2000 technology" forces of Information Awareness, most just lives on in the fading memories of old-timers. Think of it as Homeric oral history and it seems more grand.
Cottonteil Muromachi
Abominable
Join date: 2 Mar 2005
Posts: 1,071
03-01-2006 14:27
JPF (jpeg2000) files can contain XML compliant data which is probably used to catalogue all the images using the UUID numbers we have in SL. Things like assigning UUID's and cataloging assets are probably best left done by the server.

I think up until today, only a few good image editing software packages can handle jpfs. Not sure if there is a patent fee to distribute the jpeg2000 technology within the client. If there is, it might be an issue distributing it for free because the cost has to be borne by the premium users.
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
03-01-2006 15:09
Since a large portion of clothing texture images is a solid color, using RLE can yield quite a bit of space savings on your hard drive. I always use it. While it's true that it can sometimes cause a file to get larger that's the exception and not the rule. There's really no reason not to use it if space on your system is at a premium.
_____________________

My other hobby:
www.live365.com/stations/chip_midnight
Tod69 Talamasca
The Human Tripod ;)
Join date: 20 Sep 2005
Posts: 4,107
03-01-2006 22:01
I tried using RLE when I did the GIMP tutorial & it gave me some weird errors uploading. So to make it easier on people learning it, I just told them to uncheck it. Might be a thing with the GIMP or just a random error, so I dunno.
_____________________
really pissy & mean right now and NOT happy with Life.
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
03-01-2006 23:58
Could be GIMP's flavor of RLE? Dunno. I use PS7 and have never had an issue with it.
_____________________

My other hobby:
www.live365.com/stations/chip_midnight
Mirra Hathor
Reality Deviant
Join date: 4 Jul 2004
Posts: 160
03-02-2006 08:37
Thanks for the wealth of information People :D I was less concerned about my HD space than I was about load times in game. Looks like once its uploaded, RLE or not is a rather moot point, eh? lol
_____________________
Mirra Image Designs
Wilmot (87, 18)


Riverbend Town Market
Elar Imerra (236, 197)



Port Cos (186, 231)
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
03-02-2006 09:00
From: Mirra Hathor
Looks like once its uploaded, RLE or not is a rather moot point, eh? lol


Yep :)
_____________________

My other hobby:
www.live365.com/stations/chip_midnight