Textures- how much is too much?
|
Nephilaine Protagonist
PixelSlinger
Join date: 22 Jul 2003
Posts: 1,693
|
03-19-2004 12:43
I'm working on optimizing my textures for my builds to reduce the burden im laying on the visitor's machine. however, i have no clue what is a reasonable wieght in texutres to have on a build. understood that everyone's machine is different, and that some will handle it better than others- that in mind, can anyone toss out for me a range that is reasonable, taking those differences into consideration? so far i have the texture wieght for the build in question down from 30+ mb in textures (yeah, i know. BAD neph.) to about 6 mb. (havent replaced all the old textures yet, dont want to do that till i know ive got it all down to something practical) is this still too much? any help would be apreciated  I have little understanding of how this all works behind the scenes, but i would like to understand it so that i can work more efficiently with the tools we are given. thanks! Neph
|
Maxx Monde
Registered User
Join date: 14 Nov 2003
Posts: 1,848
|
03-19-2004 12:54
** deleted **
|
Nephilaine Protagonist
PixelSlinger
Join date: 22 Jul 2003
Posts: 1,693
|
03-19-2004 13:06
*chuckles, peeks behind maxx's desk.* whatcha got back there, maxx?  here's what ive done so far: i cut all my 512x512 maps down to 256x256, unfortunately it does compromise the detail seriously, but in the end i would rather have something *almost* as pretty, that doesnt cause lagony for the viewer  my understnading is this- if you load a map once, that map is loaded, and any other places on the build it occurs are gravy, since it's been loaded already. is this correct? part of my strategy is to eliminate as many individual maps as i can, and repeat as many as possible- will this do me any good? hehe sorry for the barrage of questions. again, any help is apreciated  thanks again 
|
Lumiere Noir
Ivory Tower Dweller
Join date: 25 Dec 2003
Posts: 212
|
03-19-2004 13:15
When I first came in game I was such a texture freak. I still am, but I'm making an effort to limit my use of them on my builds. I've mostly completed the main structure of the LAG Gallery in Ritch (in the corner of the sim next to Zoe and Immaculate which would put it to the south east I think) which uses all of four 512X512 textures. Two varieties of marble, a golden floor and another golden texture for the elevator.
Ritch is laggy enough without me doing what I did as a n00b (I used a different texture for practically everything on the house, everything was set as a light object and it was all high shine). Now I've backed off textures to quite a degree and have become a lot more extravagant with the structural elements; loads of Moorish inspired columns and arches and the like.
To stretch my textures as far as they can go, I used different face repeats, offsets and rotations on the marble texture I used for most of the building. Where two prims are next to each other that use the same seamless but asymmetrical texture, I might give one 2.5 horizontal faces (repeats) with 1.5 vertical, while one next to it would have something like 1 horizontal face with 2 vertical faces and be rotated 45 degrees. This practice goes a long way toward breaking up the monotony of the textures and gives it a bit of extra verisimilitude; marble should not be so uniform or repetitious. I believe it also gives some savings on download times since in reality I'm using so few textures. By the way, everything is set to low shine. Flame me for that, but it sure does help it look like marble that way.
Neph, I wish I knew how to satisfy your question with a hard and fast, researched backed answer, but I don't have one and I've really been wondering. Even though my current build is rather large, I'm not experiencing nearly as much lag now that it's mostly in place as I did with my previous two builds, and this one is on a grander scale...although I do think I've overdone it with the upper dome.
Lum
_____________________
Want to learn to build? Visit the Ivory Tower Library of Primitives at Natoma (205, 170)
Have an Edifice Complex? Join the building group Edifice Rex, IM me by name!
PrimWiki! http://ivorytowerlibrary.com/primwiki Ivory Tower Forums http://ivorytowerlibrary.com/forums Natoma Picayune http://ivorytowerlibrary.com
|
Nephilaine Protagonist
PixelSlinger
Join date: 22 Jul 2003
Posts: 1,693
|
03-19-2004 13:41
thanks lum, that actually was really helpfull, i've been wondering how i could get more mileage out of the textures i do have, and those are some great solutions to that 
|
Julian Fate
80's Pop Star
Join date: 19 Oct 2003
Posts: 1,020
|
03-19-2004 14:13
Nephilaine, how are you calculating your texture load? If you start with TGA files and upload you actually have smaller texture file sizes in SL than on your hard drive. Forgive me if you know this already, but SL recompresses all uploaded graphics in the JPEG2000 format. We are not privy to the compressed filesizes, and different graphics will compress differently depending on what they look like, so it's hard to say how much of a load your build carries.
One thing I do know is that downsizing to 256x256 is a great start. Also, I look for ways to use empty space in textures. For example, if I have a custom texture for an irregular shape I will fill in the empty space in the texture with details that can be used elsewhere via texture offsets. As long as the final texture size is the same that extra detail will have little impact over blank space in the texture. And of course, only use 32 bit textures if you need an alpha channel, but you probably know that already.
Because of the JPEG algorithm, blurry textures compress better than crisp clear textures or solid cartoony art. A little blur can also help disguise the lack of detail in a smaller texture, and after the initial experience most architectural texture detail fades into the background of our awareness anyway.
The bottom line is, the only thing that we can do and know we are having an impact on texture load is to use fewer and smaller textures. I prefer to make my builds texture-lean, and let our avatars have a little extra resolution and detail.
Hope this helps.
|
Maxx Monde
Registered User
Join date: 14 Nov 2003
Posts: 1,848
|
03-19-2004 14:25
** deleted **
|
Carnildo Greenacre
Flight Engineer
Join date: 15 Nov 2003
Posts: 1,044
|
03-19-2004 14:31
From: someone Originally posted by Julian Fate Nephilaine, how are you calculating your texture load? If you start with TGA files and upload you actually have smaller texture file sizes in SL than on your hard drive. Forgive me if you know this already, but SL recompresses all uploaded graphics in the JPEG2000 format. We are not privy to the compressed filesizes, and different graphics will compress differently depending on what they look like, so it's hard to say how much of a load your build carries. This is true in regards to the bandwidth load, but once the client downloads the textures, they need to be decompressed before they can be transferred to video memory. The TGA filesize is a good indication of the video memory load the textures will cause.
_____________________
perl -le '$_ = 1; (1 x $_) !~ /^(11+)\1+$/ && print while $_++;'
|
Nephilaine Protagonist
PixelSlinger
Join date: 22 Jul 2003
Posts: 1,693
|
03-19-2004 16:23
generally unless i need to have transparency i stay away from tga format, and for anything non trans i use jpg.  one thing i wasnt aware of before i really started looking into it was the file size of a 512x512 32 bit tga....good lord! usually about 1mb. so i'm cutting the use of those back to only area that cant be done any other way, and in those situations use nothing over 256x256. that alone helped a lot. Julian, thanks for the advice on blurring, thats a great idea and i'll be testing it out immediately  thanks for all the responses, looking forward to hearing more! on a tenuously related note, i usually save my clothing maps out at 512x512, heh but didnt realize what a load that is riding on the back of an av. anyone out there doing clothes, what dimensions do you use?
|
Kex Godel
Master Slacker
Join date: 14 Nov 2003
Posts: 869
|
03-20-2004 02:46
Keep in mind that SL's graphics + network engine is fantastically sophisticated and that the textures are downloaded progressively as needed. The SL engine won't download that 512x512 texture unless your camera is right on top of the texture.
So more than likely, the entire sum of all our textures is probably an overestimate of what will actually be downloaded. Most textures will probably only be partly downloaded. Although if you can get the look you want with 256x256, that'd be great, as it'd still have the speed increase, only now the 256x256 texture will be the last progressive pass requested from the asset server =)
Also, I think clothing gets retextured when it's baked onto your AV anyway. I'd suggest keeping that at 512x512, since it will most likely be down-scaled to whatever resolution they bake at anyway. Avatars seem to be well optimized, so clothing resolution probably isn't something to worry much about. =)
|
Devlin Gallant
Thought Police
Join date: 18 Jun 2003
Posts: 5,948
|
03-20-2004 04:00
Thinks back to the day when he had 400 pots displayed in his shop...each with a different texture.
_____________________
I LIKE children, I've just never been able to finish a whole one.
|
Julian Fate
80's Pop Star
Join date: 19 Oct 2003
Posts: 1,020
|
03-25-2004 15:05
Nephilaine, I think there are some misconceptions in your last post. From: someone generally unless i need to have transparency i stay away from tga format, and for anything non trans i use jpg. one thing i wasnt aware of before i really started looking into it was the file size of a 512x512 32 bit tga....good lord! usually about 1mb. Every image you upload, regardless of format, is recompressed as a JPEG2000 image. Uploading JPEG's will not save people any download over uploading TGA's. The only difference it makes is in the amount of harddrive space you yourself use to store the original images, and the quality of the images since TGA's are lossless and JPEG's lose some quality even at 100% and even before you upload them and they get recompressed. If you want absolute best image quality and have a big harddrive, only use TGA's for the clothes and object textures you upload. They will all end up the same format in SL in the end. From: someone on a tenuously related note, i usually save my clothing maps out at 512x512, heh but didnt realize what a load that is riding on the back of an av. anyone out there doing clothes, what dimensions do you use? Unless you perform some graphical gymnastics and your clothing item is some weird small shape, you have to use 512x512. Anything smaller will leave gaps and anything larger will lose the excess. It may be that the upload process tries to bash larger images down to 512x512, I don't think so but I'll have to experiment, but for clothing the mesh that applies to the avatar is 512x512. Picture the clothing templates. If your image is larger than the template the excess will be lost when it's applied to an avatar. Likewise, if it's smaller than the template, only the area of the template that your image would cover will have anything on it. Sorry if this is telling you anything you already know.
|
Tcoz Bach
Tyrell Victim
Join date: 10 Dec 2002
Posts: 973
|
03-26-2004 05:03
1:1 or 1:2 is the general rule of thumb when considering texture dimensions. 1024 is generally a practical max dimension.
_____________________
** ...you want to do WHAT with that cube? **
|
Maxx Monde
Registered User
Join date: 14 Nov 2003
Posts: 1,848
|
03-26-2004 06:02
** deleted **
|
Carnildo Greenacre
Flight Engineer
Join date: 15 Nov 2003
Posts: 1,044
|
03-27-2004 00:01
I uploaded a 3200x1200 texture once. I think it uploaded at 4096x1024, but I can't get it to display the highest level of detail -- it seems to stop at 2048x512.
_____________________
perl -le '$_ = 1; (1 x $_) !~ /^(11+)\1+$/ && print while $_++;'
|
Julian Fate
80's Pop Star
Join date: 19 Oct 2003
Posts: 1,020
|
03-31-2004 16:25
If you think your textures are being resized after upload, and I have seen nothing to suggest this, try a simple experiment. Upload your texture then open it in your inventory and choose File > Save Texture To Disk. Open the new saved local copy on your machine and see if the sizes match.
This will, however, tell you nothing about file formats and compression if that crossed your mind. Lindens have said they use JPEG2000 compression on uploaded textures but I've never seen specifics about the settings they use.
|
Mezzanine Peregrine
Senior Member
Join date: 14 Nov 2003
Posts: 113
|
03-31-2004 19:19
It would depend on the target's video card ram. Consider that uncompressed, a texture takes 4 bytes per pixel (if it includes alpha, or 3 bytes if it does not)
So on a 512x512 texture, that's 1 meg.
My video card has 128mb of RAM. Many have half, or a quarter of that. And much of the video ram (a couple megs) goes to the frame buffer. And another chunk goes to vertex data. So about half is available for textures.
So on my card, a mere 64 512x512's would probably fill it completely up. On a regular MX type card, only 16 or 32 would.
You can't really look at the file size to determine the texture load though, unless you are looking at uncompressed TGA's.
(Yes - YOUR video card might be able to DXTC / OGL compress the textures in-ram, but many cannot. Dont even know if SL supports it - generally you can see artifacts if it does, but I dont see them, leading me to believe it doesnt do tex compression?)
If you were to try to make a build that worked nicely for 'reasonable, average spec' machines of about 32 mb video ram, with no tex compression, then you would have a limit of about
16 512x512 textures or 64 256x256 textures
Note that this limit is for the entire scene though. So if you push the limit and bump right up against it, then if he's looking at your build AND someone elses, whoops.
NOTE: Second life does not load the highest resolution image into video memory anyway - it manages video ram balancing for you. This means that when you upload images to SL, it takes your 512x512 image, and makes several low rez versions of it by dividing it by 2 each time.
512x512 -> 256x256 -> 128x128 -> 64x64 -> 32x32 -> 16x16.
Depending on how far away the object is, and how full video memory is already, SL sends only the detail level most appropriate for rendering. This means you can't ever 'overrun' their video memory.
In other words, if you have an entire house full of 512x512 textures, the worst that could happen is SL sending 256x256 versions of them to users instead, if there are too many 512's in the scene already.
So I would suggest, don't bother using low detail versions of your textures if you've uploaded them already.
However, if you use low detail textures where you can get away with it (for example, a 1x1 image of whiteness when you just want a plain color, or a really low rez texture when you want a matte wall, and so on), then you can cause the high rez parts of a texture to be loaded far quicker.
So in other words, optimizing your texture usage makes it load the high rez bits and pieces faster, but won't make an impact in rendering speed.
EG, if you have a house with paintings in it, and the paintings are all 256x256, and the walls, ceiling, floor, lamps, and other decorations are also 256x256, then everything will take about the same time to load.
However, if you pulled the paintings up to 512x512's and everything else down to 64x64, then when the user focused on the painting, it would be more likely to start at a higher detail, and load faster.
So use highly detailed textures on pieces that are central and important, and low detail elsewhere. You will not impact rendering frames per second, but you will impact loading speed , and how quick something 'un-blurrs'.
I hope this is helpful to someone!
|
Mezzanine Peregrine
Senior Member
Join date: 14 Nov 2003
Posts: 113
|
03-31-2004 19:28
And one additional note.
It takes a video card a lot longer to render 64 different 16x16 textures than it does to render one single 128x128 texture - even though the number of actual pixels and file size are about the same.
The point is moot, of course, if SL does any kind of image packing on its side (which it possibly does). But just something to keep in mind before you make a bingo game with 100 different 256x256 textures for each and every number from 0 to 100 ;P
we need some sort of 'Letter or Number' prim!
|