what is the best texture format

(Duoas) #21

I like you, but don’t go sticking your foot in your mouth. I’ve been programming for over 20 years and the thing that got me into it was image processing. I’ve written decoders for most of the formats discussed in this thread.

BMP has (and has always had) the very same RLE compression as TGA. (The only difference is TGA RLE can wrap lines, where BMP cannot.)

Further, PNG is lossless. That means that if you are getting strange stair-stepping effects there is either something wrong with your source image or with the PNG decoder. Now AFAIK, Blender uses the latest zlib png code base, so I don’t think there’s anything wrong with the decoder. Maybe your image processing software goofs when it encodes the PNG?

As you can also read in my above post, I like TGA. It is actually my favorite format. I’m not exactly bragging when I say that you are unlikely to find anyone else on this forum who knows more about it than I. The problem is that the people who bought TrueVision (Pinnacle Systems) act as if TGA doesn’t matter. Every TGA doc you will ever read traces back to a single, unofficial, “email” (this is before the days of email as we understand it now) posted by someone who looked in some ancient TrueVision hardware manual now lost and/or locked away in the vaults at Pinnacle and wrote a short exposition on how to use the easier parts of the specification.

However, the question is speed and size. FYI, size affects speed. With modern storage, it is unlikely you will see a significant difference between loading a TGA and loading and decoding a PNG. You will have to play with it to find out which works better on a specific computer. So, all things being equal, choose the format that uses less space on disk. People on dial-up connections will like you better.

And people who don’t like snot won’t have to put up with obnoxious, uninformed commentary.

(Nickadimos) #22

Wow… Well spoken… hey maybe you can tell me something… sometimes when I make an alpha PNG for like a leaf or something liek that… when i load it into blender the backround is all these crazy green lines of differant levels of darkness… they are there all along until I put whatever face they are on, set to alpha, they go away, but it seems they are part of the image…
I know this is the wrong forum for this but we were talking about images anyway…
so ill talk about them to make it legit…

I really like using PNG.


(Duoas) #23

A pixel is fully encoded with four pieces of information: Red, Green, Blue, and Alpha components. Even though the alpha component may be set to make a pixel fully transparent, the RGB component is still there.

What you are seeing is those colors (without the alpha components). Once you tell Blender to use those alpha values then the colors ‘disappear’.

Hope this helps.

(Nickadimos) #24

wow… yeah it does…!

(_LsBlend) #25

i use .reallysmallpicfiles
its a good format yo

(Dalai Felinto) #26

Hmm, then if I delete the unused color informations the image size diminishes, right?

But I need to keep the gray pixels in alpha channel (because the image still use partially the original color)…


(Duoas) #27

Er, well, yes and no.

I should revise by saying that your computer’s display encodes pixels only with three pieces of information: R, G, and B, and that the size of an image in memory (assuming the same bit-depth and pixel resolution) never changes.

However, when an image is stored on disk you can include alpha information, which simply indicates how to combine the associated RGB value in your picture with an already existing RGB value on your screen.

So you can’t really delete “unused” color information from your image. Most image formats store them whether you see them or not.

That said, you can reduce storage requirements significantly by choosing what colors to use in the invisible parts of your image. An advanced image editor can give “invisible” pixels a color that works best to reduce the final file size. The choice of color will depend on the file format used to store the image. (This is likely where those funny bands of colors in Nikadimos’s image came from.)

I think, but I’m not sure, that both Photoshop and GIMP can do this kind of optimization for you. If you are not sure, or you know that your image software doesn’t, you can “load the dice” by setting the invisible parts of the image all to one single color. A mid-to-high range gray is usually a good choice, as is pure black or pure white.

Hope this helps.

(Cognis) #28

I am considering using the Blender GE for a project rather than programming what I need (an interactive ‘book’, of sorts). I am going to need images a good deal bigger than the average texture, maybe up to 600x600. I was wondering if PNGs that size will kill the GE?

(Duoas) #29

Look, I know next to nothing about the GE. However, the point you all need to get is this:

Images can be compressed on disk to save space.
Images are not compressed in memory.

It won’t kill the GE to use BMP over PNG, since no matter what image file format you use the image is stored in memory at full size.

So if your images really are ultra-huge then yes, you might overload the GE.

I don’t know how many images you plan to use at once, but 600x600 doesn’t seem like anything to worry about if you ask me. (But remember what I know about the GE.)

Hope this helps.