Company: GameTextures
Role: Lead Technical Artist
Tools: Python3.4+

GameTextures Pack

September, 8, 2017

Pack is a simple automated toolkit targeted for developers and artists for easing the creation of optimized texture usage for game ready assets. It acts as a solution and a gateway for an internal processing pipeline for content that was once done by hand.

I had set out prior to starting this project knowing that there was an expectation that this tool would eventually become a public-facing solution as well. There have been many instances where artists aren't utilizing the savings from channel packing in their assets for production, so simplifying the user experience to allow the artist to understand what and why the savings occur in channel packing as well as making the process effortless was top priority.

One of the largest challenges was to handle for every single use case of the texture suffix name for the specific render workflow. This involved as to what file suffix should be omitted from usage for specific workflows. To solve that issue, each workflow had consistent or global suffix such as normal, ambient occlusion, sub-surface scattering, and emissive. Quantifying all global suffix meant that each workflow only needed to have the unique suffix and its variations.

Metallic Workflow Specific: Base color: _b _basecolor _base_color Metallic: _m _metallic Roughness: _r _roughness Specular Workflow Specific: Albedo: _am _alb _albedo Specular Color: _s _spec _specular Specular Gloss: _g _gloss _glossiness Global: Ambient Occlusion: _ao _ambient_occlusion Height: _h _height Normal: _n _nm _normal Alpha/Transparency: _a _t _transparency _alpha Emissive: _e _emissive Sub-Surface/Transmission _sss _transmission

This also opens up the ability for having custom channel packing templates where the user can create their own texture sets, specifying the number of textures and what input is to be packed in the Red, Green, Blue, and/or Alpha channels. For our team, this enabled us to adapt to changes within specific engine pipelines, such as having the difference between Unity's default shader, being most commonly used among hobbyists, and Unreal's open-ended material graph, where the end-user can specify where each input exists. Right now the user can modify a JSON file included with the install to append any additional packing templates to the default templates that are included within Pack.

{
  "template" : [
    {
      "name" : "Unreal Engine / POM",
      "output" : [
        {
          "texture" : "base color|alpha",
          "suffix" : "basecolor"
        },
        {
          "texture" : "metallic|roughness|ambient occlusion",
          "suffix" : "det"
        },
        {
          "texture" : "height",
          "suffix" : "h"
        },
        {
          "texture" : "normal",
          "suffix" : "nm"
        }
      ]
    }
  ]
}

I also figured that it would be most useful to make a call to Pack from an external application or script to genereate the process headless. This introduced the command-line interface, giving developers full access to processing texture sets seamlessly within their own pipeline tools.

Input Path: -i, --input string REQUIRED "Path_To_Input_Folder" Output Path: -o, --output string REQUIRED "Path_To_Output_Folder" Batch: -b, --batch string REQUIRED "true", "false" Sub-Folder: -s, --name string NOT REQUIRED "true", "false" Material Template: -t, --template string REQUIRED template name. Output Format: -f, --format string REQUIRED "jpg", "png", "tga", "tiff" Invert Roughness -r, --invrough string NOT REQUIRED "true", "false" Invert Normal: -n, --invnorm string NOT REQUIRED "true", "false"

GT_PACK.exe -i "{input_path}" -o "{output_path}" -b "{batch}" -t "{template}" -f "{format}"
GT_PACK.exe -i "input" -o "output" -b "false" -t "PBR Metallic" -f "TGA"

Though the tool has not been publicly released yet, we have been able to drastically shave processing time internally where we use a single build machine to update resources automatically without a single person touching the source files.