Textures file format for cheap, VR-ready assets - performance is priority

Hi!

I am creating several thematic packages of free, pre-medieval, Slavic assets. They are adapted to PC VR - low poly + lod’s + extremely small lightmaps. I am currently working on textures, which need to be optimized as well. In addition, I plan to share a whole range of resolutions from 64px up to 8k.
My problem is: In what file format do you save all the textures to get maximum game performance?
I read this topic: Which are the best texture file formats to import to UE4? - World Creation - Epic Developer Community Forums
And this one: TGA vs PNG (for textures) - World Creation - Epic Developer Community Forums
So I summarized what I know about the usage of these file formats in the UE:

TGA

-pros
Recommended by most forumers as a standard.
No compression allows simple, quick computer load and perfect file quality.
Alpha channel does not significantly increase the weight of a file.

-cons
Very large file weight.

PNG

  • pros
    No lossy visual compression of the file.
    Much lighter than the TGA. It has Alpha Chanel.

  • cons
    Compression of file weight, which PNG has - demands decompression, which is causing additional calculations/ loadings
    Poor compression of Alpha channel, significantly increasing the total weight of the file.
    Sometimes - you can get ugly artifacts.

TIF

  • pros
    Very wide range of compression. Lossless compression capability.
    Has Alpha Chanel.

  • cons
    Lossless compression requires decompression which involves additional load/calculations for the PC.
    Greater file weight than PNG.

JPG

  • pros
    Possibility to reduce file weight several times!
    No decompression issues.

  • cons
    Visible lossy compression.
    It is not possible to save color spaces other than RGB, CMYK, Grayscale.
    No Alpha Chanel.

As far as I understand, according to one forum, jpg can be used for mobile games - because of their very low weight - where the optimization is extremely important. From what I know the rules for creating mobile assets are now the same as for Virtual Reality.

In addition, I have to mention that when I changed my TGA / PNG textures to jpg I got some extra frames. Although - I’m not 100% sure. Other optimization treatments may have caused this.

One more case for TGA vs. PNG:

Maybe TGA - as an uncompressed file - even though takes up more disk space is easier to load than PNG because the computer is not forced to decompress it? Isn’t the process of using PNG like this:

  1. decompression - more calculation work for PC
  2. Enlarging file size - after decompression, the bigger file size is stored in PC’s memory cache?

So, potentially, PNG for the computer is the same as TGA, but requires additional calculations, which is ultimately worse for performance? Where is the truth? :smiley:

In summary. In which format do you think I should save the textures for VR? If jpg - do I have to compress it before import? As far I know - UE is taking care of it, right?

I am kindly asking for your support because everything is really blurry for me :slight_smile:

Have a nice day!

Those formats have nothing to do with impact of the game performance. All textures get converted and compressed the same way when imported to the engine, those formats are only the “source” file. You can change the compression level of textures in the game to use less memory but it will reference the original file to be able to do that. Once the game is packaged those source images will not be included and it will just have the compressed images according to the settings you choose.

The Source File Format does not determine the file size in game. Don’t use JPEG, because the Quality is horrible.
Simply use a fitting Compression Setting for each texture (Grayscale maps like Roughness and Spec should be compressed with Linear Grayscale and not Color for example)

I can recommend to use a lower res Diffuse/Albedo Map and have a higher res Normal Map though. The Difference in appearance is minimal.

Thank you very much! :slight_smile: