Tuesday, 30 April 2024
UV Packer
During my time on Alien: Isolation I designed and created a UV shell packing tool where each of the UV shells were converted to 1 bit mask sprites and then packed in this format.
I utilised the largest-to-smallest packing algorithm as it best suited the mask-based approach.
The UV data from within 3ds Max is written out to a binary file via a Maxscript Tool and then a compiled piece of code performs the packing.
Once packed the location and scale of each UV shell is written out to a new binary data file which the Maxscript tool then reads in and uses to reposition and scale the UV shells into their newly packed formation.
I thought it would be fun to offer the user a visual demonstration of the packing process. It acted as both a visual interest and a pseudo progress bar.
The approach proved to be successful and was used on many 3d assets in Alien: Isolation and Halo Wars 2.
In a newer version to the one shown in the animated gif below, I added a feature which would group matching overlapping UV shells within a given threshold. This feature, in many cases, greatly improved the overall texel resolution.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment