Colorization

From ARK Modding Wiki
Jump to navigation Jump to search

Original Source

OVERVIEW

Asset colorization is done using a 6-channel masking technique based on RGB and CMY colors that can be defined using a single RGB texture map. A colorization mask is painted to set the colorized regions and intensities, which is blended with a full-color RGB Albedo map. Regions that are expected to be colorized in the Albedo map are fully or partially desaturated.


A special "painted" colorization effect is supported, which blends in a paint normal map on top of the asset to give the appearance that a messy coat of paint has been applied. This is used where appropriate, such as on wood and other structures, where simply tinting the Albedo map is not visually pleasing.

ALBEDO MAP

Areas of the Albedo texture that will be colorized should be desaturated so that the colorization is not affected by the base Albedo (unless this is specifically intended). If an area is not going to be colorized it should not be desaturated in the base Albedo texture. It can be OK to add a small amount of base Albedo color variation to desaturated color regions to better match the spirit of the original asset. However, one should be careful doing so as adding a color in the Albedo region that is colorized will make it harder to accurately color that area with certain colors, like white.

DiffuseLevelsAdjustmentExample.jpg


It is possible to use a transparent black overlay in areas to tone down the color strength that will come from the colorization. For example, on metal pieces that have faded out areas you can darken that area's mask region 10-15% to bring out a bit of the underlying desaturated Albedo texture.

MaskDarkeningExample.jpg



Finally, the Albedo should be examined to determine if the desaturated regions are too dark or not. Super dark regions make it hard to achieve accurately colorized values. It is not possible to get a true red if the region it is coloring is too dark everywhere. This means that a levels adjustment should be used in areas that are too dark. It is not good to apply such adjustments uniformly, however, as that will kill the contrast and shadows in the final result.

COLORIZATION MASK

The colorization mask uses red, green, blue and their combinations cyan, yellow and magenta to determine which pixels of the Albedo map are colored. The material uses these specific color regions to apply colorization that mixes with the base Albedo.

Not all areas need to be colored. Areas that have been determined unnecessary to color should be black in the mask.

COLOR MIXING

The main rule with colorization mask creation is that only colors that naturally blend together can actually mix with each other or else they will create an artifact line anywhere they touch that can be affected by another color region.

For example, red and blue should not blend with each other because where they mix is magenta. If magenta is used elsewhere in the mask, the magenta colorization while be applied everywhere red and blue mix. Even if magenta is not used elsewhere it will still create a white line at all blending points due to white being the default colorization value.

ColorRegionBlend.png


It is possible to mitigate this artifact by isolating the mixing to shadow areas in the Albedo.

WOOD COLORIZATION

Any region of an asset that has wood is treated specially. It should be masked in full color but the underlying Albedo texture should not be desaturated. The color region simply tells the material which area will have a special paint effect colorization applied and the paint effects will also show the original base color.

USE IN GAME

Materials must be set on game objects in order for them to be used. In the case of weapons, this must be done on both FPV and TPV assets.