While Unity supports many common image formats as source files for importing your Textures (such as JPG, PNG, PSD and TGA), these formats are not used during realtime rendering by 3D graphics hardware such as a graphics card or mobile device. 3D graphics hardware requires Textures to be compressed in specialized formats which are optimised for fast Texture sampling. The various different platforms and devices available each have their own different proprietary formats.
To apply custom settings for each platform, use the Texture Importer to set default options, then use the Platform-specific overrides panel to override those defaults for specific platforms.
The following table shows the Texture compression format options available on each platform, and the resulting compressed file size (based on a 256px-square image). Choosing a Texture compression format is a balance between file size and quality; the higher the quality, the greater the file size. In the description below, see the final file size of a in-game Texture of 256 by 256 pixels.
Crunch compression is a lossy compression format (meaning that parts of the data are lost during compression) on top of DXT Texture compression. Textures are decompressed to DXT on the CPU, and then uploaded to the GPU at runtime. Crunch compression helps the Texture use the lowest possible amount of space on disk and for downloads. Crunch Textures can take a long time to compress, but decompression at runtime is very fast.
You can use ETC1 for Textures that have an alpha channel, but only if the build is for Android and the Textures are placed on an atlas (by specifying the packing tag). To enable this, tick the Compress using ETC1 checkbox for the Texture. Unity splits the resulting atlas into two Textures, each without an alpha channel, and then combines them in the final parts of the render pipeline.
For this guide I will focus on CD-based games, as they often pose the most issues when it comes to compatibility. (Secret tip: for cartridge-based systems like NES, you can generally just use zip files or leave them uncompressed).
If you have a multi-disc game that uses multiple BIN files, creating a PBP file can be a challenge since it only will load the first BIN file. To get around this limitation, you can combine the BIN files using an app called CDMage. This tool is only available on Windows, but can be run via Wine on Mac too.
When using the Dolphin emulator for GameCube and Wii emulation, you can take advantage of a special compressed format known as RVZ. Converting to this file is super easy, as it can be done in the Dolphin GUI. Note that in order for this to work you need to use Dolphin 5.0-12188 or later. This can be done on Windows or Mac versions of Dolphin.
Note that CSO files are currently not compatible with RetroAchievements, and so if you want to earn achievements (for now) you must use the original .iso format. There are multiple user requests with the RetroAchievements team to add CSO binaries to their code, and so this may be resolved in the future.
Another file type that is super handy are .wua files, which are compressed files that will work within the Cemu (Wii U) emulator. These will compress everything together into a single file: the base game, DLC, updates, etc.
I used the guide to convert my PSP games from .iso to .cso, but the games end up as (WWE SmackDown vs. Raw 2009 (USA).iso.cso) for example, with iso still in the name but the file showing as .cso. Will that effect anything as far as scraping for media and the like?
For 3DS-Users: CHD-Files dont work in combination with Retroachievements on the RetroArch Version for the 3DS due to some compatibilty issue with the MAME-Cores. For PSX-Emulation with achievements, Bin/Cue is probably still the best option.
PPSSPP supports CHD in the latest dev builds, should be added to the main build in 1.16.7/1.17 soon. Note the devs still suggest CSOs as they are compatible with a real PSP, CHD is not. see this thread for more details ( _support_added_to_ppsspp/)
Mipmaps are smaller, pre-filtered versions of a texture image, representing different levels of detail (LOD) of the texture. They are often stored in sequences of progressively smaller textures called mipmap chains with each level half as small as the previous one.
This is where mipmaps come in. Instead of sampling a single texture, the application can be set up to switch between any of the lower resolution mipmaps in the chain depending on the distance from the camera.
Mipmaps can either be created offline or during runtime. The decision comes down to a balance between the storage cost of offline generation and the increased workload of runtime generation. In most cases, however, offline is best.
Our very popular texture-processing utility PVRTexTool (included with the PowerVR SDK) can be used to generate a mipmap chain for a texture, with only a couple of clicks. The mipmapped image can then be saved using our proprietary compressed PVRTC texture format, or a wide range of other formats.
I have several tools that expects a gzip file but a file that is created not gzipped, i'd like these tools to access the regular file without actually compressing it (this takes too much time and will happen later in the pipeline).
The file is created with null bytes at the beginning so i can write any leading bytes directly to the file to make an empty compression gzip header, but i don't know what the header should be (if this is at all possible..)
Yes, you can create a gzip file without spending any time attempting to compress it. However you cannot do that simply with a prepended header. You would need to use stored blocks in the deflate stream, and you would need to compute the CRC-32 for the trailer.
The deflate stream would be a series of blocks, where each block except the last is (in hex), 00 ff ff 00 00 followed by 65,535 bytes of the input. The last block would be 01 xx xx yy yy, where xx xx is the number of bytes remaining in little-endian order, and yy yy is the one's complement of xx xx. That is followed by the remaining bytes.
The header can be a vanilla gzip header, 1f 8b 08 00 00 00 00 00 00 00. The trailer is cc cc cc cc nn nn nn nn, where the first four bytes is the CRC-32 of the uncompressed data, and the second are the number of bytes of uncompressed data (modulo 2^32 if 4GB or more), both in little-endian order.
c80f0f1006