Website powered by

AXF Car Paint Shader in Unreal

The axf car paint shader in Unreal. In the current state, the shader only works with dynamic lighting.

The axf car paint shader in Unreal. In the current state, the shader only works with dynamic lighting.

The Unreal implementation compared to the reference, Xrite's Pantora Viewer.

The Unreal implementation compared to the reference, Xrite's Pantora Viewer.

Comparing the behaviour of the flakes. The difference in the shading originates primarily from the difference in number and position of the lights emulating the image-based lighting.

Comparing the behaviour of the flakes. The difference in the shading originates primarily from the difference in number and position of the lights emulating the image-based lighting.

A schematic view of the conversion process

A schematic view of the conversion process

After setting up the file paths, the user can import the material with one click. She can choose between one of three shading models to write the parameters to. The tool reads the file, converts the textures and imports all resources into Unreal.

After setting up the file paths, the user can import the material with one click. She can choose between one of three shading models to write the parameters to. The tool reads the file, converts the textures and imports all resources into Unreal.

AXF Car Paint Shader in Unreal

For Milkroom Studios I implemened Xrite's CarPaint model in axf 1.2.
While there is an axf implementation for Unreal, it lacks the car paint model, and for good reason: The shader represents existing car paints using multiple lobes, color tables and an array of flake textures (usually >60 textures), all based on real measurements.
While the the shader is very well documented, it was a challenge to get it working in Unreal, since it requires a custom version supporting texture arrays. Since the shader is incompatible with Unreals IBL, lights are set according to a 360° image using the Median Cut algorithm.
A big thank you to Gertrud Gottlieb who was my partner in crime for this project and helped with dissecting the physics involved, and to Gero Müller, one of the heads behind the axf format, for patiently answering our questions.