Skip to main content

Posts

Showing posts from July, 2022

Tech Art Bits: Basic texture packer with PIL

One of the most common parts of any pipeline is a texture packing process of some sort. This is usually the result of the complexities of a shader, requiring artists to adhere to a rigid packing spec to maximize performance and pack masks as efficiently as possible. In any production of any scale, 3D art production will involve some amount of texture packing. There are many ways to perform texture packing, and not all of them require some kind of pipeline solution. However, once the packing spec reaches a certain level of complexity, a measure of control over the packing process becomes desirable. In this article, we will build a simple texture packer (which works with .TGA files and most other common file formats), that could lay the foundation of building a more complex one on your own, without requiring any expensive software licenses to do so. Building the base class Implementing a simple Mask Packer Now that we have a simple base class, we can get to work on the "meat