Ramp Gradient Generator for making LUTs quickly in Unity (C#)

Look Up Textures (LUTs) are useful for achieving a stylised Toon Rendering look by affecting shading through gradients.

This tool enables the artists to adjust the ramp gradient inside a Gradient Editor and check its effect on the cel-shaded model interactively in real-time. When they have achieved satisfactory results, they can click the “Generate Gradient Ramp Map” button to save the gradient they made as an optimised LUT texture in the game project folder. The LUT texture can then be plugged into the shader for use in-game.

It provides a quick and intuitive way of creating LUTs directly in the Unity editor view, rather than having to do the guesswork in Photoshop. Also, it helps to automate the process of enforcing the correct naming convention of generated files and the correct folder structure.

Toolset for creating better looking and optimised UI in Unity (HLSL Shader / Python / PowerShell / Bash)

MSDF (Multi-Channel Signed Distance Field) is a technology to encode the data in a vector image (SVG) into a tiny raster image (PNG), which makes it look as sharp as a vector image. This allows you to render UI efficiently at extremely large sizes – more than 10x times of its original resolution – without any pixelation. usually a 60 x 60px PNG image is sufficient for rendering full screen, as demonstrated in the Unity screenshot above.

MSDF is an improvement upon SDF (Signed Distance Field): SDF works well as long as the shape is fairly round and organic, but it produces artefacts around more complex intersections or corners due to the way it works. MSDF solves this problem and produce better visual results than SDF at an even lower resolution, their performance cost is about the same.

I adapted this technique for Unity and implemented a shader which renders crisp images from the generated MSDF textures, as well as a PowerShell / Bash utility script to work with Chlumsky’s MSDF Generator – this enable UI artists to easily convert their Illustrator SVG files into MSDF in one click. I also wrote detailed documentation on the Confluence wiki and a SVG to MSDF Validator script in Python to ensure that the artists’ SVG files meets the MSDF requirements for successful conversion.

Currently, I’m working on improvements for the PowerShell / Bash utility so that the artists can drag and drop multiple SVG files and batch convert everything to MSDF quickly.

Mass Replace Objects Tool in Unity (C#)

A time-saving tool to easily replace one or more selected game objects in the scene with a chosen Replacement Prefab, rather than having to replace them one-by-one manually. This speeds up mass changes to a scene, encouraging rapid iterations and experimentations in level design.

Error handling is implemented to disable all buttons and display a warning if nothing is selected, as well as a “Show Helper Dialogs” option to skip the “Are you sure?” and “Finished replacing!” helper dialogs.

Asset Import Settings Enforcer & Pipeline in Unity (C#)

I set up a custom asset pipeline and editor tool scripts to automatically apply the correct import settings. In the example above, the user is prevented from setting the Max Size of lightmap textures to an unnecessarily high resolution or generating mipmaps when they are not needed. This prevents human error which saves time and makes everyone’s life a little easier. It reduces the friction between artists and developers too!