llealloo / audiolink

Audio reactive prefabs for VRChat
Other
346 stars 38 forks source link

Reduce icon texture import size #300

Closed teehzero closed 4 months ago

teehzero commented 4 months ago

Currently, the AudioLink icons import at full resolution, high quality. On PC, this becomes 1024x1024 with BC7 compression, and on Mobile, 1024x1024 with ASTC 4x4. Access to high resolution graphics is convenient for asset authoring, but given the in-game size of the included AudioLink controller, a bit overkill. I propose changing the import settings on these four graphics to the following:

PC: 128, DXT1 Mobile: 32, ASTC 5x5

The logic behind these decisions is as follows:

On PC, I simply got really close to the controller in the editor, and increased the icon resolution until I wasn't able to notice further improvements. Then I bumped it up one more. PC platforms generally have access to more VRAM, and HMDs are becoming higher resolution, so I made a concession on performance for the sake of aesthetics. I didn't notice any problems with DXT1, so did not explore BC7 compression, the encoders for which I've consistently found to have negative effects on simple icon graphics like these.

Mobile platforms on the other hand are much more memory constrained. The icons are still legible at 32px, which is the lowest import resolution I can select in my editor, and frankly the lowest I think they would survive anyway. To determine block size, I started at the coarsest setting, and reduced by each step available in my editor until I felt it was acceptable. You can explore the results for yourself below.

32, DXT1: https://i.imgur.com/kyZDrjK.png 64, DXT1: https://i.imgur.com/CGq7my5.png 128, DXT1: https://i.imgur.com/MfBCLTe.png

Before, 1024, BC7: 1.3MB https://i.imgur.com/JLSuHNN.png

After, 128, DXT1: 10.7 KB https://i.imgur.com/FETZr96.png

32, ASTC 12x12: https://i.imgur.com/oQql8ai.png 32, ASTC 10x10: https://i.imgur.com/ipT7FIX.png 32, ASTC 8x8: https://i.imgur.com/esj6vY8.png 32, ASTC 6x6: https://i.imgur.com/GFzeaha.png 32, ASTC 5x5: https://i.imgur.com/7u1AyYO.png 32, ASTC 4x4: https://i.imgur.com/IGCjLtj.png

Before, 1024, ASTC 4x4: 1.3 MB https://i.imgur.com/p8CzfpB.png

After, 32, ASTC 5x5: 1.1 KB https://i.imgur.com/ibvyVN8.png