Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

One large texture v. Many small textures

Reinhart Harris
Uniquely Ununique Wolf
Join date: 19 Mar 2006
Posts: 7
10-09-2006 01:02
Hello all. I'm not that new to SL, but I must admit that I don't know much about how SL works..er...I guess server side would be the correct term. Anyway, what I'm wondering is if it's better to have one large texture (512 x 512 or possibly 1024 x 1024) or several smaller textures (24 x 24 or something)?

And when I say better, I'm looking at...more like how fast it will load for others and if it's less of a burden on the servers (thus making it load faster maybe?).

So for example, I have a cube with one large texture over it (different sides having different parts of the texture on them). Would that load faster for someone because the server only needs to grab one texture? Or would it actually load faster with several textures of smaller size on the different sides of the cube?

I...hope that makes sense. ^^;

Thanks for any information!
Mephisto Brennen
No Copy / Mod / Transfer
Join date: 20 Jul 2006
Posts: 84
10-09-2006 01:58
Well I wouldn't go over the 512 x 512. My oppinion. 256 x 256 is also good. But i wouldn't suggest you do 24x24 and place it a zillion times over your square. My own oppinion tho, there are maybe others who think an other way about it
Cottonteil Muromachi
Abominable
Join date: 2 Mar 2005
Posts: 1,071
10-09-2006 02:34
Different sides having different parts of a texture loads the fastest most of the time. It also has the added advantage of having all the sides load at once, since its the same texture. By the way, 24 x 24 is not a power of 2, and will get resized upon upload.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
10-09-2006 02:43
There's no way to predict how fast any given texture will rez, as it depends on many chaotic factors. I've had 1024x1024's rez faster than 32x32's at times, and then at other times, the opposite happens. Usually, the order in which they appear is seemingly random, and has no discernible correlation with canvas size.

I do firmly believe however that it's better to use a low number of large "texture sheets" whenever possible, rather than using lots and lots of small textures. There are two main benefits to "sheeting":
  1. You only need to make one call to the asset server to deliver the texture instead of many. This cuts down on system-wide network traffic, making the whole process much easier on the servers.


  2. All panels will rez at the exact same time. It otherwise can be frustrating waiting for individual textures to all rez at different times, especially when, say, five sides of a cube rez really quickly, and then that last one takes forever.


That having been said, in practice, if all you're talking about is one cube, then a single sheet isn't necessarily the most efficient use of pixels. If the cube is equilateral, then the panels ideally should be square, but a cube has six sides and there's no way to divide a power-of-two sized canvas evenly into six squares. You'll have to end up either with unused canvas space, or with panels that are oddly sized, not optimized for square geometry. Either way is waste of pixels. The best solution in this particular case would be to use two textures, one a four-panel sheet, and the other a two-panel sheet.

So, the full answer is that neither large sheets nor individual small textures are always the best way to go in all circumstances. You have to determine the best, most efficient methodology for each project on a case by case basis. If you've got an appropriate number of surfaces by which to divide a canvas evenly, then by all means use a single sheet. If not, then do a little math to figure out what actually works best for the number and size of the faces you have.

Texture optimization in SL is a constant balancing act between pixel efficiency and network efficiency. One can never outweigh the other.
_____________________
.

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.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
10-09-2006 03:04
Chosen's covered the original question in lots of detail.

There *is* meant, according to what has been said, and some behaviour you can see in world, to be a systematic approach to which textures load first.

Things closer are meant to load faster than things further away, and things closer to the centre of the screen and/or the cursor position are meant to load faster than other things. This is why, in theory, putting your cursor over a texture will make it load faster, as will zooming in on it.

Now, as Chosen has commented, what actually happens seems to be chaotic. Whether that's the algorithms sucking, or a confusing (and possibly chaotic in the strict sense) mess of interactions between servers, clients, pipelines, video cards etc. I don't know. My money is on the latter... the mouse over and zoom in parts work often enough that I'm inclined to think that it's not bad algorithms, it's something else going on.

Oh, there does seem to be something else too... if lots of prims (like a big roof say) that aren't central in your focus all have the same texture that seems to (usually) load fast... I'm not sure if there's a weighting for that built in, but it does seem to operate that way, I guess there's just lots of requests (however they're handled) for that texture, and of course as soon as one loads they all do.
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog
Cottonteil Muromachi
Abominable
Join date: 2 Mar 2005
Posts: 1,071
10-09-2006 06:45
From: Chosen Few

There are two main benefits to "sheeting":


Roughage helps sometimes.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
10-09-2006 07:34
From: Cottonteil Muromachi
Roughage helps sometimes.

Hehe, well, since we're not allowed to eat spinach or lettuce these days, any suggestions?
_____________________
.

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.
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
10-09-2006 08:37
A while back I baked all the textures in my store to include realistic light and shadow. While doing that I took the opportunity to combine all the textures into 1024x1024 sheets. I also took all my individual 256x256 box textures and combined them into 1024x1024 sheets of 16 each. The end result is that the whole store loads considerably faster and has a much better framerate.
_____________________

My other hobby:
www.live365.com/stations/chip_midnight
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
10-09-2006 10:54
I use the texture sheet trick a lot when I have signs or paintings inside a build. I put a bunch of signs and paintings together into one sheet, and it certainly seems to load much faster than individial small textures. It also allows me to use small textures that are not, themselves, a 'power of two multiple'. For example, I needed ten small rectangular signs, and did them as two columns of 5 each on a square texture sheet.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
Reinhart Harris
Uniquely Ununique Wolf
Join date: 19 Mar 2006
Posts: 7
10-09-2006 15:50
Wow, I got more replies than I thought I would. o.0
Before I forget, thank you everyone for all the helpful information and tips!

Now onto the replies...

Mephisto Brennen - I try hard to not use large textures that are up to 1024.

Cottonteil Muromachi - I figured that number was off. I'm bad at math though, so... :P

Chosen Few - Wow! That's a lot of information and I thought I had an idea of how it worked but wasn't sure. Thank you very much! You've been very helpful.

Eloise Pasteur - Yeah, it took me a while to figure out how that worked with the camera or cursor. Seems to bump it up in it priority of loading, but when there's a lot of textures to load, it doesn't seem to help much as it still takes forever to load everything.

Chip Midnight - I figured it'd be great for buildings or stores. That's mostly what I was looking at. Well, that and signs or something.
Raindrop Drinkwater
Globally Creative
Join date: 28 Jun 2006
Posts: 240
10-09-2006 23:00
Regarding the offset, is there any rule as how we can split the different images within the texture ? I'm asking this because I think the offset is a tricky little animal :D
Candide LeMay
Registered User
Join date: 30 Dec 2004
Posts: 538
10-10-2006 01:08
From: Raindrop Drinkwater
Regarding the offset, is there any rule as how we can split the different images within the texture ? I'm asking this because I think the offset is a tricky little animal :D
If you have photoshop, you can use this script to make the calculations for you
_____________________
"If Mel Gibson and other cyberspace writers are right, one day the entire internet will be like Second Life." -- geldonyetich
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
10-10-2006 14:54
From: Candide LeMay
If you have photoshop, you can use this script to make the calculations for you


There's also Adrian Eisenberg's free Texture Calculator :)
_____________________

My other hobby:
www.live365.com/stations/chip_midnight
Raindrop Drinkwater
Globally Creative
Join date: 28 Jun 2006
Posts: 240
10-10-2006 22:48
Thank you ! I'll try these. :)