I always used 8 bit .png file format for all my assets. But I see some high quality assets use .tiff, .ddc or other file formats. I was wondering what file format should I use for what purpose, is there a guide?
Mostly I do game assets, like houses and environment for games. And I always used 8bit png maps. But sometimes some professional share his work and I see tiff file format, and I though that I might be wrong to use png...
Here's a point in favor of using 16 bit: if you need that depth, you keep it, and if you don't need it you can just downgrade it later to 8 bit (easily done with a batch process tool). This is a lossy process, so you can't do the opposite.
1. The bit-depth that you bake your source content at. Generally speaking, it's a good idea to bake at 16 bit so you have a very high quality input for your texture.
2. The bit-depth that you have for your working files in Photoshop, Painter, etc. Extra bit depth is helpful for certain types of maps where precision is important. It's a good idea to author height maps in 16 bits, perhaps normal maps as well, but maps like albedo, roughness or metalness don't often need it. Theoretically any kind of map can benefit from a larger bit-depth space, because blending and blurring and things like that happen with better precision, but again, for some map types it's not necessary and can be wasteful (slower/harder to work with) with complex documents.
3. The bit depth that you send to your target. This could be a game engine or an offline renderer or whatever. If it's a game engine, you will often be using 8-bit file formats because 16-bit formats have less options for compression and take up a lot of video memory, though there are some fancier compression types for higher bit-depth normal and height maps these days. Generally speaking, while you may author your maps 16-bit, they'll probably get downsampled and dithered when exporting to 8 bit for in-game use.
If you're doing portfolio work, it depends on the target. For something like Toolbag or an offline renderer, you can keep working with uncompressed 16-bit files if you want. If you're building a large scene in Unity or Unreal, you're probably going to want to follow normal gave dev conventions, so 8-bit maps would be sensible.
The specific file format, like PNG, TIF or PSD, doesn't make much difference. If using something like Toolbag, you can load those formats directly. If using something like Unreal or Unity, the engine will convert to a compressed DDS format anyway. PNGs do lossless compression which means a smaller size on disk (but no less video memory use), and they're usually slower to save and load than other formats. If you're using PNGs and editing stuff in Photoshop it can be a little annoying, because PS doesn't handle PNG alpha very well.
A little NOTE: if you decide to move on to Unreal, do not use 16bit PNGs. Instead, go for 16bit TGA. UE4 has issues in interpreting 16bit PNGs, making them look brighter.
I banged my head on this for a couple of days.....
A little NOTE: if you decide to move on to Unreal, do not use 16bit PNGs. Instead, go for 16bit TGA. UE4 has issues in interpreting 16bit PNGs, making them look brighter.
I banged my head on this for a couple of days.....
Stick to png - tga is basically obsolete and tiffs are just a pain in the arse. If you're doing HDR stuff use exr because it's what we'll all be using in the future.
16bit pngs are fine in unreal, you just have to deal with them correctly - it's documented.
A little NOTE: if you decide to move on to Unreal, do not use 16bit PNGs. Instead, go for 16bit TGA. UE4 has issues in interpreting 16bit PNGs, making them look brighter.
I banged my head on this for a couple of days.....
There is no such thing as a 16bit TGA, the format only supports 8 bits per channel.
TGAs don't support compression or different bit depths per channel (24bit RGB, 32bit RGBA) and this obsolescence is precisely the reason it always works, no options to mess about with. In theory I would use PNG but I remember back in the day photoshop would save the alpha channel in PNG files wrong and it just wasn't worth the time to troubleshoot. Then there are the issues as mentioned with 16bit files be it TGA or TIF, but most textures used in games are output at 8bits per channel anyway so TGA is fine for most cases.
A little NOTE: if you decide to move on to Unreal, do not use 16bit PNGs. Instead, go for 16bit TGA. UE4 has issues in interpreting 16bit PNGs, making them look brighter.
I banged my head on this for a couple of days.....
There is no such thing as a 16bit TGA, the format only supports 8 bits per channel.
TGAs don't support compression or different bit depths per channel (24bit RGB, 32bit RGBA) and this obsolescence is precisely the reason it always works, no options to mess about with. In theory I would use PNG but I remember back in the day photoshop would save the alpha channel in PNG files wrong and it just wasn't worth the time to troubleshoot. Then there are the issues as mentioned with 16bit files be it TGA or TIF, but most textures used in games are output at 8bits per channel anyway so TGA is fine for most cases.
I still use TGA a lot for this reason. Alpha channels in PNG isn't read by photoshop correctly and it makes it a nuisance to edit if you ever need to do so.
Most game textures are output at less than 8bit per channel but the compression algorithms (at least where I work) seem to respond better to 16bit inputs than they do to 8.
The photoshop thing is a legitimate reason to not use png. I forget people still use the horrible bloody thing for texture generation
It's not hard to extract PNG alpha in Photoshop. Layers menu, Layer Mask, From Transparency.
The alpha will be extracted from the RGB, and the alpha is converted into a layer mask.
Still though, I find sometimes the RGB is destroyed, unrecoverable.
Yes that's the problem - It's not getting the alpha. It's that the pixels under the alpha get destroyed. Often I'll want to just remove the alpha from a texture and with PNG I can't easily do that using just photoshop.
Stick to png - tga is basically obsolete and tiffs are just a pain in the arse. If you're doing HDR stuff use exr because it's what we'll all be using in the future.
16bit pngs are fine in unreal, you just have to deal with them correctly - it's documented.
the main issue is that it assumes any 16bit image has data encoded in linear space so if it's a color image it'll apply an sRGB transform in the sampler
Replies
Some generic info here, but it really depends on your target.
http://wiki.polycount.com/wiki/Texture_formats
Is the art for portfolio, or for production in an actual game?
1. The bit-depth that you bake your source content at. Generally speaking, it's a good idea to bake at 16 bit so you have a very high quality input for your texture.
2. The bit-depth that you have for your working files in Photoshop, Painter, etc. Extra bit depth is helpful for certain types of maps where precision is important. It's a good idea to author height maps in 16 bits, perhaps normal maps as well, but maps like albedo, roughness or metalness don't often need it. Theoretically any kind of map can benefit from a larger bit-depth space, because blending and blurring and things like that happen with better precision, but again, for some map types it's not necessary and can be wasteful (slower/harder to work with) with complex documents.
3. The bit depth that you send to your target. This could be a game engine or an offline renderer or whatever. If it's a game engine, you will often be using 8-bit file formats because 16-bit formats have less options for compression and take up a lot of video memory, though there are some fancier compression types for higher bit-depth normal and height maps these days. Generally speaking, while you may author your maps 16-bit, they'll probably get downsampled and dithered when exporting to 8 bit for in-game use.
If you're doing portfolio work, it depends on the target. For something like Toolbag or an offline renderer, you can keep working with uncompressed 16-bit files if you want. If you're building a large scene in Unity or Unreal, you're probably going to want to follow normal gave dev conventions, so 8-bit maps would be sensible.
The specific file format, like PNG, TIF or PSD, doesn't make much difference. If using something like Toolbag, you can load those formats directly. If using something like Unreal or Unity, the engine will convert to a compressed DDS format anyway. PNGs do lossless compression which means a smaller size on disk (but no less video memory use), and they're usually slower to save and load than other formats. If you're using PNGs and editing stuff in Photoshop it can be a little annoying, because PS doesn't handle PNG alpha very well.
UE4 has issues in interpreting 16bit PNGs, making them look brighter.
I banged my head on this for a couple of days.....
If you're doing HDR stuff use exr because it's what we'll all be using in the future.
16bit pngs are fine in unreal, you just have to deal with them correctly - it's documented.
TGAs don't support compression or different bit depths per channel (24bit RGB, 32bit RGBA) and this obsolescence is precisely the reason it always works, no options to mess about with. In theory I would use PNG but I remember back in the day photoshop would save the alpha channel in PNG files wrong and it just wasn't worth the time to troubleshoot. Then there are the issues as mentioned with 16bit files be it TGA or TIF, but most textures used in games are output at 8bits per channel anyway so TGA is fine for most cases.
The photoshop thing is a legitimate reason to not use png. I forget people still use the horrible bloody thing for texture generation
The alpha will be extracted from the RGB, and the alpha is converted into a layer mask.
Still though, I find sometimes the RGB is destroyed, unrecoverable.
https://docs.unrealengine.com/5.2/en-US/creating-and-using-custom-heightmaps-and-layers-in-unreal-engine/
It's less crap in 5 than it was on 4.x