PDA

View Full Version : Best image format?


jud
08-23-2003, 09:55 AM
Does anyone know which image format is best to use when creating bump maps and texture maps,especially bump maps?

Thanks.

jud

leigh
08-23-2003, 10:32 AM
I usually just use JPEG on full quality, since the file sizes are quite low :)
If I need to create textures with alpha channels, I use 32-bit Targa.

jud
08-23-2003, 12:06 PM
Thanks leigh.

Would the targa(*.tga) format or bitmap(*.bmp) format be better for bump maps as they contain more information and the file sizes are bigger or does it not really matter which format you use as they are all more or less of good quality.

Thanks again.

jud

JamesMK
08-23-2003, 12:16 PM
.BMP tends to be a bit bulkier since TGA usually incorporates an LZW-compression algorithm. That aside, the only difference is that .TGA is the only format of these two that can contain an alpha channel (assuming that your 3D-package reads BMP's of course. Targa has been sort of a standard format for most 3D apps since waaaaaay back).

jud
08-23-2003, 12:21 PM
Thanks folk's.

jud

leigh
08-23-2003, 03:28 PM
Ideally I would love to use Targa format for all my textures, but the problem is that due to their large file sizes, when you have 100 textures or more in a scene, this slows down rendering time considerably since there is more data for the renderer to deal with.

More textures with large file sizes = longer render times.

That is why I tend to stick to uncompressed JPEG images as their file sizes are relatively small. BMP images are decent quality, but you get the same quality plus smaller file sizes when using JPEG :)

justanutherdude
08-23-2003, 05:10 PM
Just my 2 cents but I'm finding that PNG's (indexed color) seem to give the biggest bang for the buck.

Lightwave seems to read the targa's as super huge files even if they're not. (Sometimes the jpeg's as well)

I also would love to use targa's for everything, but did that recently in a shot and slowed it WAYYYYY down...

Like I said, take it for what it's worth, I'm not a pro..... yet!

justanutherdude
08-23-2003, 05:13 PM
Duh, I'm a little slow today... do not use indexed color on bumps... uhh... forgive me, not enough caffiene in my sytem to form a coherent thought.

(I forgot we were talking bump, but I still like PNG, grayscale though)

kleinluka
08-23-2003, 06:19 PM
I do it like leigh.
full quality JPG and .tga for alpha channel stuff.

it's the best deal.

MorBioS
08-23-2003, 08:38 PM
I like PNG 24bit and 32bit. Work very good for me.

JamesMK
08-23-2003, 11:49 PM
But are we really sure that the smaller filesize of JPG's really makes a difference once the image data is loaded into the application? I mean, it still has to uncompress internally to be used....

For example, take a 10 kb GIF-file and open it in a picture viewer. Watch the memory consumption, after the viewer has been started, but compare the mem usage from before and after the image has been displayed. It will use far more than 10 kb because the image will uncompress before we can actually use and display it - the same thing, theoretically, would happen as a JPG loads inside the 3D app at render-time.

Just a theory though :D

credmond
08-24-2003, 12:50 AM
I would caution against using jpeg as a texture format.

There is no such thing as a compressionless jpeg format. Each time you save a jpeg you compress it anew and if you work on a jpeg texture file after you save it as a jpeg you will introduce some degradation. You probably won't notice it the first time you resave a jpeg. However after a few times you will notice the degradation, and especially with your textures that have fine details

In a 3d program a 512 x 512 jpeg takes up as much ram and vram space as a 512 x 512 targa or tiff (since it handles them each the same internally) so the only thing you gain by using jpeg is hard drive space.

I would recommend getting more hard drive space before relying on jpegs for anything but textures you are positive you won't ever rework in the future. At the very least, if you plan on using jpegs anyway, you should be sure to preserve texture originals in some lossless format like psd, targa, or tiff.

jud
08-24-2003, 09:57 AM
I know what you mean by the jpegs loosing quality the more you edit them so I tend to save all texture maps as paint shop pro files with all the layers in tact and when I need the texture I will just save it(export) as a jpeg and load it into my 3d app and save it back to psp with all the layers and such.
So I reckon for bump maps the same should apply,as I have noticed artifacts showing up on the bump maps that I cannot see in psp8 as they are not visible but my guess is that it is pixels that are like 113RGB and the surrounding pixels are 112RGB causing the bump to show an artifact when in fact that area should be flat(112 RGB),anyway thanks for all your thoughts on this and I will mess around with different formats and see how that goes.

Thanks.

jud

leigh
08-25-2003, 12:35 AM
Oh yeah I would NEVER keep reworking JPEGs and resave them - no way!
I keep everything in a massive PSD file while I am creating and tweaking the texture, and only save out to JPEG when I am happy with the changes and whatnot. So I never recompress/save JPEGs - that's just silly :)

In my experience, JPEGs certainly do use less memory than TGA. When I load them into LW's image editor, it shows how much memory each image is using, and the Targas definitely use quite a lot more. And considering the fact that an average character of mine will have anything up to 50 (and sometimes more) 3000x3000 pixel textures applied to it, I need to save on memory where I can :)

For example, I am working on a head at the moment, and I saved a JPEG and a TGA version of the colour map for the head, a 2000x2000 pixel image. When loading them into LW, the memory each image used was: the JPEG version was using 11Mb while the TGA was using 16Mb. Perhaps this is just the way LW handles images, but that's a big difference. Yeah, there is technically no such thing as a totally uncompressed JPEG, but a JPEG saved on full quality is flawless enough for use as a texture, especially since any problems it may have will become totally irrelevant when played back on a TV screen.

JamesMK
08-25-2003, 01:36 AM
I guess LW uses the extra memory for the alpha. Maybe even if there is none. That would explain the difference anyway, since JPG is 24-bit, and targa 32-bit... :shrug:

credmond
08-25-2003, 02:14 AM
Right, the difference there should boil down to the amount of bits being used by the image type, since that is the way the 3d program interacts with the image data type.

Jpegs always are 24 bit rgb images since they do not include an alpha channel. But a targa could be a 24 bit rgb or a 32 bit rgba and so to accurately compare the two image formats the targa should be saved out of an image editor in a 24 bit format.

Perhaps the difference you are noting Leigh is related to LW handling the targa image as 32 bit instead of 24 bit. If you did save it out as a 24 bit targa then LW could be wastefully reserving the alpha space for all targas. I wonder if checking out how it handles Tiffs would help clarify the matter.

If it were something other than this and the jpegs were being handled differently than the other image formats and LW is indeed somehow handling jpegs more efficiently than any other image format, then it would be cool to dig deeper to find out how, since that would be an interesting LW feature and make it a nice candidate for handling massive image datasets, like 28k x 28k images of the earth.

JamesMK
08-25-2003, 08:35 AM
Yep. Try TIF or maybe even BMP. If those consume the same amount of memory as JPG, they would definitely be preferable.

When in need of an alpha plane however, TGA would be better than handling the alpha as a separate image which some guys prefer for maximum control.
RGB + A in one targa = 32 bits.
RGB and A in two separate images = 24 + 24 bits... Unless you use an 8-bit GIF for the separate alpha of course... :hmm:

...ah well, just stay away from cheap default procedurals, and you should be OK :D

angelman
08-29-2003, 05:59 PM
well we always use tif for everything, its got the lzw compression can handle high bit depth images, alpha channels etc.
the only downside is that you can get many flavours of tiff and not all programs can understand them in the same way.
if you use renderman though you will have to use either tiff or sgi format since that is all that you can convert to renderman .tex format...

spm
09-01-2003, 06:39 PM
i use bmp for mostly everything that doesnt need alpha. no compression, no useless data... nothing except clean image data. for alhpas i use tga or tiff. or sometimes i simply make two bmp images, one black and white for the transparency and one for the texture and so on if i need more maps for the surface. i keep it clean.

CGTalk Moderation
01-15-2006, 10:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.