Welcome Guest! To enable all features please try to register or login.
2 Pages12>
Texture Size, Pixel Counts, Video Memory, and File Formats
_SexyOne_
#1 Posted : Tuesday, March 17, 2009 9:41:08 AM(UTC)


Rank: Forum Regular

Joined: 2/13/2008(UTC)
Posts: 439
Location: Sexy's Bar
Having had this discussion with a few designers both Zaby and Clothing in the past few days. I thought it might be constructive to post this regarding the balance between texture size and video memory performance.

This is based upon an excerpt from Second Life®: A Guide to Your Virtual World by Brian A. White - a.k.a Ansel Gasparini slightly modified by myself to suit the Utherverse environment. I hope that it explains in some more depth the reasons why being careful with texture sizes is important to everyone in Utherverse.



IMAGE FILE FORMATS

Utherverse allows you to use many image formats primarily JPEG, and PNG. Here's a bit of brief info on all these formats:

JPEG - Joint Photographic Expert Group Format

Advantages:

* Small file size
* Viewable in almost all programs

Disadvantages:

* Lossy compression
* Image quality degrades every time it's saved
* Does not support transparency
* Not well suited for printing

History:

* Invented by the Joint Photographic Experts Group in 1986
* Today, it's the most commonly used image format on the web, the last place where file size is still more important than image quality.
* It's also commonly used in digital cameras, but that's changing fast.


PNG - Portable Network Graphics Format

Advantages:

* Lossless compression
* Fairly small file size
* Supports both alpha transparency and simple transparency
* Supports a wide range of color depths

Disadvantages:

* Not readable by all programs
* Not well suited for printing
* While PNG file size is small, it's not as small that of a JPEG

History:

* Originally conceived in 1995 as a potential superior replacement for the GIF format
* Unlike GIF, PNG has never been patented
* First released in 1996
* Became an international standard in 2003
* Popularity is steadily growing, but it's still not all that commonly used, relatively speaking


For most texturing purposes the PNG format would be the format of choice, as it allows for transparency.


FILE SIZE VS. TEXTURE MEMORY

It's not uncommon for those new to texturing to assume they should use highly compressed formats like JPEG out of the mistaken belief that keeping file sizes small will increase performance. People usually come by this presumption as a result of every day experiences using the internet, where it's easy to see that web pages load faster with smaller image files than with larger ones. For the novice, the expectation that this same behavior would apply equally to graphics applications is logical, but it's incorrect.

The perceived correlation between file size and speed on the web actually an illusion which has nothing to do with graphics processing. Where the internet is concerned, speed is primarily determined by the rate at which files can be sent from computer to computer. Since smaller files have less information to deliver, of course they get delivered faster.

The rate at which graphical images are processed on screen though actually has nothing whatsoever to do with file size. Graphics processing is all about texture memory, not about storage space.

Texture memory is always determined by the amount and depth of the actual pixels in the image, not the bits and bytes in which the file is stored. The amount of pixels in an image times the number of bits in each pixel will always equal the amount of texture memory the image uses, no matter what. Its file size can vary depending on in what format it is saved, but its actual texture memory consumption when the image is in view will always be the same.

Why that's important to the texture artist is pretty simple. Knowing the rudimentary mathematical principles of how images affect performance enables you to optimize your textures so you can ensure your creations are as lag free as possible while also being as high in quality as they can be. The key to success in any real time graphics application is always finding the right balance between detail and speed. Make your textures too big, and you use too much memory, slowing down your frame rate (and everyone else's). Make them too small, and while your system performance will be relatively good, your imagery might look terrible.

File size is not part of the equation when thinking in this context. What's relevant to performance and visual quality are the actual images, not the files that store them on hard drives. Graphics performance is affected not at all by file size, but by texture memory consumption. Texture memory is determined by the amount of pixels that make up each image, and the amount of memory bits in each pixel. That's it.


HOW TO CALCULATE TEXTURE MEMORY

Determining how much texture memory an image will consume is fairly straight forward. It's basically a count of the total amount of pixels in the image, multiplied by the number of bits in each pixel.

RGB color images without transparency have 24 bits per pixel, and those with transparency have 32 bits per pixel. So, for example, if you've got a non-transparent color image that is 1024x1024 pixels, here's how the math would break down:

1024x1024 = 1,048,576 total pixels
1,048,576 x 24 bits in each pixel = 25,165,824 total bits in the image
25,165,824 bits / 8 bits in every byte = 3,125,728 bytes, or precisely 3 megabytes

Pretty simple math. A 1024x1024 image (sans transparency) will always use exactly 3 megabytes of texture memory. That's regardless of whether or not the file is compressed for storage. As far as the graphics card is concerned, an image is just a collection of pixels to be drawn, not a file to be saved.

Just for informational purposes, here's a quick breakdown of all the generally relevant texture sizes, and their corresponding texture memory requirements:


Image Size Texture Memory Texture Memory
at 32-bit at 24-bit

1024x1024 4 MB 3 MB
1024x512 2 MB 1.5 MB
1024x256 1 MB 768 KB
1024x128 512 KB 384 KB
1024x64 256 KB 192 KB
1024x32 128 KB 96 KB
1024x16 64 KB 48 KB
1024x8 32 KB 24 KB

512x1024 2 MB 1.5 MB
512x512 1 MB 768 KB
512x256 512 KB 384 KB
512x128 256 KB 192 KB
512x64 128 KB 96 KB
512x32 64 KB 48 KB
512x16 32 KB 24 KB
512x8 16 KB 12 KB

256x1024 1 MB 768 KB
256x512 512 KB 384 KB
256x256 256 KB 192 KB
256x128 128 KB 96 KB
256x64 64 KB 48 KB
256x32 32 KB 24 KB
256x16 16 KB 12 KB
256x8 8 KB 6 KB

128x1024 512 KB 384 KB
128x512 256 KB 192 KB
128x256 128 KB 96 KB
128x128 64 KB 48 KB
128x64 32 KB 24 KB
128x32 16 KB 12 KB
128x16 8 KB 6 KB
128x8 4 KB 3 KB

64x1024 256 KB 192 KB
64x512 128 KB 96 KB
64x256 64 KB 48 KB
64x128 32 KB 24 KB
64x64 16 KB 12 KB
64x32 8 KB 6 KB
64x16 4 KB 3 KB
64x8 2 KB 1.5 KB

32x1024 128 KB 96 KB
32x512 64 KB 48 KB
32x256 32 KB 24 KB
32x128 16 KB 12 KB
32x64 8 KB 6 KB
32x32 4 KB 3 KB
32x16 2 KB 1.5 KB
32x8 1 KB 768 Bytes

16x1024 64 KB 48 KB
16x512 32 KB 24 KB
16x256 16 KB 12 KB
16x128 8 KB 6 KB
16x64 4 KB 3 KB
16x32 2 KB 1.5 KB
16x16 1 KB 768 Bytes
16x8 512 Bytes 384 Bytes

8x1024 32 KB 24 KB
8x512 16 KB 12 KB
8x256 8 KB 6 KB
8x128 4 KB 3 KB
8x64 2 KB 1.5 KB
8x32 1 KB 768 Bytes
8x16 512 Bytes 384 Bytes
8x8 256 Bytes 192 Bytes


Notice how much memory the larger textures demand. It doesn't take all that many to overwhelm a 256MB or 128MB video card. One of the reasons Utherverse can operate slowly is because of overwhelmed video cards. Many people use textures that are simply way too big, and as a result, video cards choke.

The average video card can only process a few hundred megabytes worth of textures at a time. Professional game artists are well aware of this, and so they make sure to optimize all their textures to keep them as small as possible. Most amateur-created content does not tend to benefit from the same professional wisdom.

For everyone's sake, always keep all textures as small as they can be. As a rule of thumb about 85% of textures should be 256x256 or smaller, the rest no bigger than 512x512. Utherverse is extremely good at displaying small textures on objects at full screen size. It's quite rare that there's a legitimate reason to go much larger than 256x256.


CHOOSING THE BEST TEXTURE SIZE FOR THE JOB

The two most important factors in determining what size to make a texture is to think about how much screen real estate that texture is likely to occupy, and how much fine detail does it really need relative to its size.

For example, if you're doing a life size replica of the Sistine Chapel, with giant ceiling murals that are likely to fill the entire screen, and with lots of fine details that people are likely to zoom in on and study, go with 512's by all means. However, for the parts that aren't likely to fill much of the screen, like a pair of shorts, use something MUCH smaller.

Again, it's all about finding the optimum balance between texture memory and texture detail. That means using good, sound judgment. Choose your texture sizes carefully. Make appropriate decisions.



That's it for the original except, just to put it in a little more perspective in terms of Utherverse. The average Avatar fully clothed using 8 textures. Based on the above information if all those textures were 1024x1024 PNG files that's 4meg per texture, 8 textures, 32meg for 1 avatar. Most machines running Utherverse have 256 or 128meg video cards so worst case 32 meg out of 128 meg for 1 avatar is *very* costly. In a room with 20 other avatars dressed with equally sized textures, well the math is simple 640meg needed to display the avatars, 128meg available, it's not going to work.

Please keep in mind that what you all as designers create dramatically affects everyone who see's your work, most likely in ways that you probably never imagined. Please keep this article in mind when creating, for everyones sake.
_SexyOne_
Proprietor Sexy's Bar!
http://www.sexysbar.com
18 users thanked _SexyOne_ for this useful post.
DanniGirl_1 on 4/28/2011(UTC), Connemara_BBB on 11/1/2011(UTC), ozzmosus on 1/8/2012(UTC), Cretox on 3/23/2012(UTC), AmandaTG on 4/17/2012(UTC), Mrs_Joey39_BOA on 5/13/2012(UTC), __LEVI__ on 12/19/2012(UTC), TooFast4U on 1/29/2013(UTC), ExciteableKat on 6/10/2013(UTC), DJ_Victory_VS on 9/28/2013(UTC), SweetGuy on 9/19/2014(UTC), VictorG_ on 9/19/2014(UTC), DurtyJay on 9/22/2015(UTC), LazTopCat on 1/27/2017(UTC), RammSteiner155 on 7/28/2017(UTC), 0o0__YOLO__0o0 on 8/20/2018(UTC), Ash443 on 9/29/2018(UTC), xxxCHRISTYxxx on 12/12/2018(UTC)
_Miss_India_
#2 Posted : Tuesday, March 17, 2009 4:11:26 PM(UTC)


Rank: Forum Regular

Joined: 12/26/2008(UTC)
Posts: 148
Thanks for the wonderful information.
bi_bi_love
#3 Posted : Tuesday, March 17, 2009 10:43:58 PM(UTC)


Rank: Veteran Forum Member

Joined: 11/11/2008(UTC)
Posts: 3,248
Location: FBOTA V6.66 - Please feel free to bypass my posts, I tend to ramble ;)
Thank you sexyone, great info.
I'm adding a link to this in Cara's sticky, if you don't mind.

Qbag or cnenabvq
Vg vf nobhg lbh
AngeL2343
#4 Posted : Tuesday, March 17, 2009 10:49:11 PM(UTC)


Rank: Forum Regular

Joined: 2/13/2008(UTC)
Posts: 212
Cross posted this in the zaby forum too,as this is extremely useful info.
_SexyOne_
#5 Posted : Wednesday, March 18, 2009 12:56:49 AM(UTC)


Rank: Forum Regular

Joined: 2/13/2008(UTC)
Posts: 439
Location: Sexy's Bar
bi_bi_love wrote:
Thank you sexyone, great info.
I'm adding a link to this in Cara's sticky, if you don't mind.


I don't mind at all, repost, sticky, all that is needed Smile
_SexyOne_
Proprietor Sexy's Bar!
http://www.sexysbar.com
pHucKo
#6 Posted : Sunday, November 01, 2009 12:25:02 AM(UTC)

Rank: Novice Forum Member

Joined: 7/25/2009(UTC)
Posts: 2
Excellent article - very informative thank you _SexyOne_
Tiny_Squeeks
#7 Posted : Wednesday, November 25, 2009 10:38:52 AM(UTC)

Rank: Novice Forum Member

Joined: 2/28/2008(UTC)
Posts: 1
Thank you so very much SexyOne. i am just starting out and find that your post are so helpful. I love looking at all the designs. I took digital photography in college and find doing textures is really not much different. i wish i had tride this before, i understand my textures may have along ways to go compared to uthers, but because of friends giving me the courage to try..i have been enjoying it and getting the calming and relaxing time that i need for here and real. i am hoping that sometime soon i will be able to share these creations with my friends that help me find a little peace of enjoyment that i so missed. Thank you again!


tiny
SkiBare
#8 Posted : Tuesday, February 09, 2010 8:58:49 PM(UTC)


Rank: Seasoned Forum Member

Joined: 2/14/2009(UTC)
Posts: 770
Medals:
I have a question for the graphics artists out there, regarding the optimization of file dimensions. The key seems to be multiples of 64. ie 256x256 512x512, etc. I notice that all the graphics in the old RLC texture file are square. What struck me as interesting was the fact that many of the graphics did not quite look right on a square prop. For example, a graphic of a freight door produced some symbols that had the proportions a little squashed looking. Once the prop was sized to the correct ration (ie the door was designed to be taller than it was wide) the picture looked right. So it appears that the following technique is being used:

You have a prop that has a ration of X 1 Y 1.5. Create a new graphic with those proportions..say 256x384, then have your software resize it to 256x256 before you upload it to use.

Is this, in fact, the way it is done? Thanks for any response.

Skibare
____Drifter____
#9 Posted : Tuesday, February 09, 2010 11:28:14 PM(UTC)


Rank: Seasoned Forum Member

Joined: 9/5/2008(UTC)
Posts: 810
SkiBare wrote:
I have a question for the graphics artists out there, regarding the optimization of file dimensions. The key seems to be multiples of 64. ie 256x256 512x512, etc. I notice that all the graphics in the old RLC texture file are square. What struck me as interesting was the fact that many of the graphics did not quite look right on a square prop. For example, a graphic of a freight door produced some symbols that had the proportions a little squashed looking. Once the prop was sized to the correct ration (ie the door was designed to be taller than it was wide) the picture looked right. So it appears that the following technique is being used:

You have a prop that has a ration of X 1 Y 1.5. Create a new graphic with those proportions..say 256x384, then have your software resize it to 256x256 before you upload it to use.

Is this, in fact, the way it is done? Thanks for any response.

Skibare



Dont mix up the 1x1 ratio of the mesh textures for clothing with signs meant to display doors or other things with the prop editor. the two are completely different..
____Drifter____
Xaoz
#10 Posted : Wednesday, February 10, 2010 2:12:16 AM(UTC)


Rank: Veteran Forum Member

Joined: 2/15/2008(UTC)
Posts: 9,268
Location: Texas
Medals:
____Drifter____ wrote:
SkiBare wrote:
I have a question for the graphics artists out there, regarding the optimization of file dimensions. The key seems to be multiples of 64. ie 256x256 512x512, etc. I notice that all the graphics in the old RLC texture file are square. What struck me as interesting was the fact that many of the graphics did not quite look right on a square prop. For example, a graphic of a freight door produced some symbols that had the proportions a little squashed looking. Once the prop was sized to the correct ration (ie the door was designed to be taller than it was wide) the picture looked right. So it appears that the following technique is being used:

You have a prop that has a ration of X 1 Y 1.5. Create a new graphic with those proportions..say 256x384, then have your software resize it to 256x256 before you upload it to use.

Is this, in fact, the way it is done? Thanks for any response.

Skibare



Dont mix up the 1x1 ratio of the mesh textures for clothing with signs meant to display doors or other things with the prop editor. the two are completely different..


The do follow the same basic rules though Drifter and what she is saying is a good way to do it and will be less of a strain on the graphics adapter of the viewer.


Please Shop responsibly and try before you buy
slaphappygirl
#11 Posted : Wednesday, February 10, 2010 2:23:57 AM(UTC)

Rank: Seasoned Forum Member

Joined: 11/26/2008(UTC)
Posts: 1,699
Medals:
Xaoz_HOT_XtC wrote:
____Drifter____ wrote:
SkiBare wrote:
I have a question for the graphics artists out there, regarding the optimization of file dimensions. The key seems to be multiples of 64. ie 256x256 512x512, etc. I notice that all the graphics in the old RLC texture file are square. What struck me as interesting was the fact that many of the graphics did not quite look right on a square prop. For example, a graphic of a freight door produced some symbols that had the proportions a little squashed looking. Once the prop was sized to the correct ration (ie the door was designed to be taller than it was wide) the picture looked right. So it appears that the following technique is being used:

You have a prop that has a ration of X 1 Y 1.5. Create a new graphic with those proportions..say 256x384, then have your software resize it to 256x256 before you upload it to use.

Is this, in fact, the way it is done? Thanks for any response.

Skibare



Dont mix up the 1x1 ratio of the mesh textures for clothing with signs meant to display doors or other things with the prop editor. the two are completely different..


The do follow the same basic rules though Drifter and what she is saying is a good way to do it and will be less of a strain on the graphics adapter of the viewer.


I concur, I resize graphics like this a lot and it is pretty close to the original quality and look once it is put in place.

Come visit me at my shop on the beach at vww://utherverse.vww/@5566/slappyscloset.
Mrs_Joey39_BOA
#12 Posted : Wednesday, February 10, 2010 3:09:47 AM(UTC)


Rank: Forum Regular

Joined: 5/16/2008(UTC)
Posts: 229
Medals:
Okay, I fully admit that I do not understand a lot of this texture sizing, I'll need to read again and again...but I do have a question...

When making textures for Avatars, what is the best size to save them in? I know at one point someone made me a customized skin with tattoos on it and nail polish...and she said making it smaller would take away from the detail....

I know it sounds stupid but I'm learning and want to do things properly and I know I've had a file size warning from uvt before....help?
Angel Smile

"Music is a moral law. It gives soul to the universe, wings to the mind, flight to the imagination, and charm and gaiety to life and to everything."
Plato
slaphappygirl
#13 Posted : Wednesday, February 10, 2010 3:31:59 AM(UTC)

Rank: Seasoned Forum Member

Joined: 11/26/2008(UTC)
Posts: 1,699
Medals:
THe smaller the texture file is, the more it has to be stretched to fit over the frame... so if you have a file at 256x256 it is stretched twice as far as the same image at 512x512 would be. So if you need a higher detail, you need a bigger image. I wouldn't recommend going higher than 512x512 simply cuz it's too fine a detail and it causes the file size to be too big for most folks's needs... but there are some really high detail textures out there here and there that do look nicer at a high res image.

Come visit me at my shop on the beach at vww://utherverse.vww/@5566/slappyscloset.
Mrs_Joey39_BOA
#14 Posted : Wednesday, February 10, 2010 3:38:22 AM(UTC)


Rank: Forum Regular

Joined: 5/16/2008(UTC)
Posts: 229
Medals:
slaphappygirl wrote:
THe smaller the texture file is, the more it has to be stretched to fit over the frame... so if you have a file at 256x256 it is stretched twice as far as the same image at 512x512 would be. So if you need a higher detail, you need a bigger image. I wouldn't recommend going higher than 512x512 simply cuz it's too fine a detail and it causes the file size to be too big for most folks's needs... but there are some really high detail textures out there here and there that do look nicer at a high res image.



Slappy, thank you so very much! That is more understandable to me...now off to try some new textures out! Hugs*
Angel Smile

"Music is a moral law. It gives soul to the universe, wings to the mind, flight to the imagination, and charm and gaiety to life and to everything."
Plato
Emily_Vain
#15 Posted : Monday, February 15, 2010 10:07:00 PM(UTC)

Rank: Novice Forum Member

Joined: 2/10/2010(UTC)
Posts: 19
Medals:
Just thought I´d throw my 2 cents in, I don´t have any experience in creating textures for Utherverse but I´m working in the field every day for modern videogames.
Using a 512² texture is definitely overkill for Avatars, 512² is what I would use for the Walls in your Zaby.

And fitting to the topic, if you want details start off with whatever size you want to use but make sure it´s saved as an png, it might take longer to upload but you definitely increase the quality of your texture.

I´m not saying using textures above 512² is generally unwise but Utherverse definitely belongs to the (performance wise) antique games, so the lower your texture dimension the less stress for everyone Smile



1 user thanked Emily_Vain for this useful post.
DurtyJay on 12/7/2016(UTC)
kelstan
#16 Posted : Monday, February 15, 2010 10:33:03 PM(UTC)


Rank: Veteran Forum Member

Joined: 6/28/2009(UTC)
Posts: 2,433
Medals:
nearly all clothing are already in png for transparency options (or any alpha channel option as you might know)... I agree with you about quality, but it stays a better look in 512 than in 256, even more with photorealistic visuals...

i think it's all about comfort between quality and speed in game... less stress for a computer may be, but ugly close ups... and i believe RLC is more about close up and social interactions than big spaces and breathtaking scenes or landscapes... and after VWW feature, there is quite no more places that are overcrowded so...
Jarvis
#17 Posted : Tuesday, February 16, 2010 9:07:33 AM(UTC)


Rank: Veteran Forum Member

Joined: 6/20/2008(UTC)
Posts: 2,204
Location: Canada
Medals:
Very well put. This is very useful information for any amateur just getting into working with graphic images.
Remember this??

Mayhem United Designs: Clothing and Skins may be purchased using UV Closet


Mr_dwskwared_Mad
#18 Posted : Tuesday, February 16, 2010 9:30:42 AM(UTC)


Rank: Veteran Forum Member

Joined: 11/2/2008(UTC)
Posts: 3,796
_Jarvis_ wrote:
Very well put. This is very useful information for any amateur just getting into working with graphic images.

jarvis??? is that you?? welcome back, its been a while
Jarvis
#19 Posted : Tuesday, February 16, 2010 9:39:00 AM(UTC)


Rank: Veteran Forum Member

Joined: 6/20/2008(UTC)
Posts: 2,204
Location: Canada
Medals:
Oh I'm always lurking. Wink
Remember this??

Mayhem United Designs: Clothing and Skins may be purchased using UV Closet


Mr_dwskwared_Mad
#20 Posted : Tuesday, February 16, 2010 9:47:33 AM(UTC)


Rank: Veteran Forum Member

Joined: 11/2/2008(UTC)
Posts: 3,796
lol i see that
Users browsing this topic
Guest
2 Pages12>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Clean Slate theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.834 seconds.
TC-IIS-7
18.221.140.111