User Tools

Site Tools


assets:low-level_image_filtering

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
assets:low-level_image_filtering [2018-12-15 18:32] skyjakeassets:low-level_image_filtering [2018-12-15 18:35] (current) skyjake
Line 1: Line 1:
 +====== Low-level image filtering ======
 +
 +The Doomsday 2 file system supports basic image filtering operations. This means that image files associated with [[:assets]] can be modified when they are loaded. The mechanism works with all assets.
 +
 +To apply a filter operation, the following syntax is used:
 +
 +> filePath/filterOperation
 +
 +For example:
 +
 +  path = "images/heights.png/HeightMap.toNormals"
 +
 +   * File path is: **images/heights.png**
 +   * Filter operation is: "HeightMap.toNormals"
 +
 +It is also possible to chain multiple operations:
 +
 +  path = "images/heights.png/HeightMap.toNormals/Multiply:mask.png"
 +
 +That would first load **images/heights.png**, then apply the heightmap-to-normals conversion, and finally multiply with **images/mask.png**.
 +
 +^ Operation ^ Description |
 +| Color.desaturate | Desaturate colors of the image (convert to grayscale). |
 +| HeightMap.toNormals | Convert a grayscale heightmap to an RGB normal map. |
 +| Multiply:(path) | Multiply RGBA channels separately by the RGBA values from another image. (path) is relative to the first file. |
 +
 +
 +
 +