Unity3d–texture image space and memory footprint analysis

Source: Internet
Author: User

Texture image space and memory footprint analysis. Since U3D does not have a good interpretation of how images are handled, many people are not aware of the size of the atlas and the memory usage. Here is an analysis of the actual data for the u3d picture problem. The previous project will have such or such a package size and memory footprint of the problem, so this time, so thorough analysis of the u3d for the texture of the way. For memory optimization in the program, please refer to "Unity3d Optimization Road". To reduce the size of the U3d package, refer to the Unity3d how to reduce the package size to the extreme.

I'm packing various types of projects, empty projects and 10 charts that are placed in the resources folder are comparison cases. The following is the comparison data.

Iphone:

1. Empty project--space occupancy 42.3mb--ipa size 10MB

2.10 1200*520 uncompressed texure single image occupancy 2.8mb--space footprint 70.2mb--ipa size 22.9MB

3.10 1200*520 compressed into 1024*1024PVRTC4 single image occupancy 0.5mb--space footprint 47.3mb--ipa size 13.2MB

4.10 1024*1024 uncompressed Texture single image occupancy 4mb--space footprint 82.3mb--ipa size 14.6MB

5.10 1024*1024 compression for PVRTC4 format single image occupancy 0.5mb--space footprint 47.3mb--ipa size 11.6MB

Summary of data on the parcel:

One, 2 of the N-size of the picture will get the engine more support, including compression ratio, memory consumption, packaging compression size, and the strength of the support is very large.

Second, reduce the size of the image and memory methods are: Picture size changes (Maxsize), Color bit changes (16-bit, 32-bit), compression (PVRC).

Third, u3d for the format of the picture is generated by itself, and not what format you give him, he used what format, a 1024*1024 in the uncompressed format, it will be u3d in the form of uncompressed files, that is, u3d in the texture preview display the size of the Occupy * * MB is not just a memory footprint, or a space-consuming size. As shown in the following:

U3d's internal mechanism is to automatically generate image types to replace the images we give, and the image compression method requires careful selection.

Compression format in U3D component reference in the introduction I will not go into detail, only to introduce a few points:

The RGBA32 format is the most non-compressible format, but it is also the most wasteful in memory and space format. Automatic Turecolor and it one meaning.

The RGBA16 format is uncompressed 16-bit format, saving half of space and memory than 32 bits. Automatic 16bits and it one meaning.

The RGBA compressed PVRTC 4bits format is the PVRTC picture format, which is equivalent to changing the image compression mode to a new image to replace the original image format we gave (for example, we gave the PNG format).

Note: u3d All image compression formats are stored in another way, not stored in the way you give them, only if you specify a format, it will be converted to the format you want. and the compression format in Android is not necessarily effective, because the Android model, GPU rendering is not the same, some nvidia, some PowerVR, the best on the Android to enable RGBA16 mode, because this is adapted to all models, And half of the 32-bit occupancy, but also need to vary depending on the project, but the recommended format, can be used more.

Unity3d–texture image space and memory footprint analysis

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.