A collection of studio-wide tools and libraries developed with long term maintainability and flexibility in mind.

My primary role at HBS was as a member of the Core Tech team, which was intended to be a project-independent tools and infrastructure development team. The idea was to move the studio towards more modular, reusable code that was held to a higher standard of quality and documentation. My role specifically was on the technical art and graphics sides, though I also became the primary point of contact for anything involving Python in various projects.

During this time I produced and maintained many smaller tools and libraries, some of which I’ll detail below.

Python Infrastructure

The bulk of my work towards the latter half of my tenure was developing the studio’s Python infrastructure. When I started, Python was in use, in the form of Jenkins scripts and ad-hoc, artist created utility scripts. Unlike C# and Unity, there were few if any coding standards or conventions defined, and the process of getting someone up to speed on a tool was tedious and error-prone.

When I was tasked with rebuilding the game project’s asset processing script, it became quickly evident that we were lacking in this area. We believed that Python would be a significant help as a glue language all over both the game project and the studio as a whole, and we needed to set up the groundwork so that it could be developed with the same level of quality as C# and Unity.

Conventions and Standards

I led the work on coming up with coding standards and conventions for Python based on our existing standards, lots of research on Python development and distribution, and the expected role it would play as a glue language in the studio. This ended up defining standards for code style, documentation, type annotations, project structure, and source control, with example and template documents for each.

We settled on the highest standard we could manage for Core Tech libraries, with the goal of full documentation, typing support, and standardized unit tests to make things as clean and easy to use for both engineers and artists as possible.

Project Management

Creating and maintaining projects is an infamously murky subject in Python development, and I wanted to make it as easy and consistent as possible. I developed common libraries for processing and modifying project structure, build backends for packaging, and more robust metadata parsing. From this, I built command line tools to generate full new projects from templates that abstracted away individual project management utilities (Poetry, PDM, setup-tools, etc). The idea was that a non-technical user could do a simple command and end up with a fully set up project that was ready to populate and deploy with minimal work.

This also included standardized testing, linting, and formatting rules - any package created this way would immediately have access to common unit tests, project configuration, and style rules. This allowed us to ensure that packages were up to the coding standards we defined for ourselves, and that any potential security or maintainability issues would be caught as soon as possible. This could also be used both locally and on remote build systems for package time validation if needed.

Finally, I made a library that defined how tools were set up and used, abstracting away CLI interaction and allowing for artists and engineers to write the minimum amount of code while still producing a high quality result. This also opened up the opportunity to support multiple usage contexts, such as automatic GUI generation and interfacing with internal scripting within Blender and Maya. I researched this and demonstrated prototypes, but it was ultimately never realized fully.

Backend Services

As part of developing our Python standards, I helped research and manage our implementation of a new Python index server with modern feature support and the build systems required to package and validate them. I also provided support with the project management libraries mentioned above, which allowed build systems to query build metadata and adjust behavior accordingly.

Third Party Libraries

We needed several third party libraries that couldn’t be represented as a simple Python package, but I wanted to make sure they were easily buildable and distributable. I developed custom build logic and used it to build and package Blender and Simplygon as fully self contained packages, making sure all environment control and included content files were managed. This enabled us to do away with needing local installs on build machines and new art workstations.

Flowmap Generator

One of the larger Unity libraries I worked on was a utility designed to procedurally generate flowmaps for moving fluids in scenes. These would be used by things like water shaders to make rivers and streams and such more realistic. Prior to the tool, artists had to manually author these flowmaps in PhotoShop, and any time a scene was updated, the flowmap would have to be edited or recreated.

The flowmap generation tool was intended as a drop in solution - a way to generate flowmaps procedurally, in-editor, based on scene geometry. It built a graph of terrain meshes relevant in the scene and determined macro flow relations between them (which tiles flowed into which other tiles), before doing raycasts against the geometry itself to determine depth and obstruction (things like rocks, etc). From this, it applied several layers of random perturbation and smoothing to produce a flowmap encoding velocity and acceleration data (the latter for things like froth and churn). This took a matter of seconds upon execution, and helped avoid cases of user error.

Core-Techifying Game Project Code

A lot of libraries owned and developed by Core Tech started as more ad-hoc, purpose specific behavior in game project code. We would “Core-Techify” it - that is, pulling it out, cleaning it up, making it more flexible and robust and generalized, and writing documentation. I made several libraries like this, refactoring and rebuilding code for debug drawing systems, Unity import hooks, and audio synced video playback, to name a few.