Tuesday, 3 May 2011

Textures - How do they work?!

So I was just reading the old forums again, as I do sometimes...
As I've been starting putting some textures together to sell to content creators I was interested in what size to make them, it's a topic I've read many times but saught some kind of wisdom from these non-inky pages.

Heres the interesting thing - Big textures are often villafied in secondlife, some stores going as far as to ban merchants who use larger textures in order to try and keep their loading times down. But it's more how they are used than anything else.

Although it might take slightly longer to download, it's actually faster for peoples computers if the shop owner were to put 4 of their textures onto a 1024x texture. Once it's downloaded the graphics card is only needing to handle the one file, and if this were spread over a build there could be marked increases in performance.

For clothes and the like I've long been sticking to trying to keep the texture contextual, as I like to 'fakebake' shadows in, sometimes multiple textures are required where they might not otherwise but as long as the dimensions of the uploaded texture are kept fairly small it's not so bad.

Just remember, TGA's aren't your enemy. There's no need to save anything as a JPG when uploading to secondlife. Although it looks smaller when on your computer, how secondlife handles the textures is completely different. LindenLabs grid at least uses JPG2000, anything you upload regardless of source is converted into this, so if you save your file as a JPG it will end up being compressed twice, leaving your textures over compressed while probably not actually gaining any performance increase. Your better making that file's dimensions smaller, and not attempting to compress it.

The lack of understanding of textures is one of the biggest performance drains in secondlife, and something that every content creator should spend some time investigating for themselves. I'm sure I don't know everything I need to know, and a lot of it is theory and trial and error, but being actively aware of it could make our secondlife a little faster for everyone! :3