Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Special cases in texture sizing

Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
06-07-2007 16:37
I know all the usual Rules of Thumb for SL texture sizes, but a special case occurred to me.

Suppose you have a texture that mostly compresses very well, for example it is almost all black. However, it has a small part that is very detailed. Maybe a logo on a shirt for example.

Would it be OK to use a "large" texture, say 1024x1024. It would still compress down to almost nothing, but the details around the logo would be really clear.

Make sense?
Jake Trenchard
Registered User
Join date: 31 May 2007
Posts: 104
06-07-2007 16:43
Textures do not compress when they are loaded into the video card.

At all.

Ever.

No matter how small the -file- compression is, the texture memory use when -displayed- is the same.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
06-07-2007 18:55
What Jake said. If you want more info on this, see the sticky on texture memory at the top of the forum. It's a bit hard to read since LL turned off bbCode on the forums, but there's a lot of good information in it. Just try to ignore all those annoying visible code tags and focus on the content.

So you know, a 1024x1024 will always consume precisely 3MB or precisely 4MB of texture memory, depending on whether it has an alpha channel or not (4 with, 3 without). That's regardless of the file size. File size and texture memory are two different things. There's no such thing as compressed texture memory.
_____________________
.

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.
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
06-07-2007 18:58
got it. I didn't think of the GPU memory.
Vakis Oranos
Deuteri Zoi
Join date: 13 Sep 2006
Posts: 75
06-08-2007 01:22
That is true in theoretical and practical terms as well. However, I noticed another interesting thing when uploading different type of textures in different layers.

I first uploaded in bulk 10 different textures (small arm tattoos, only black, 512x512). Then I uploaded 10 more textures but this time they were full leg black tattoos with the same resolution. I was surprised to notice that the leg tattoos took almost double the time to upload and appear on the client than the arm tattoos.

Does this have something to do with the conversion to JPEG2000 on the server side? It certainly doesn’t have to do with my upload bandwidth, since I repeated the "experiment" in different days and with different textures.

Also, the small arm tats appear a little faster than the big leg tats when worn (I checked this with my alt in order to eliminate the memory cache effect). However the difference is not very big.
Jake Trenchard
Registered User
Join date: 31 May 2007
Posts: 104
06-08-2007 06:20
The textures are uncompressed and put into to display memory for the preview, and then of course on the avatar display. It has something to do with compressing to jpeg2000 probably, you have more data to compress, but as much to do with, you have to write out 4x as much memory with pixel information every time you unpack the texture, which would be true regardless of what format it was saved in. (But does have to do with converting from a file format to a memory bitmap.)