generate_normal_map
Creates a pixel-crisp normal map from a sprite's silhouette and shading for dynamic 2D lighting in game engines, with OpenGL or DirectX green-channel conventions.
Instructions
Make a normal map of a sprite for dynamic 2D lighting in a game engine.
The form is estimated from the silhouette and colour areas, plus (with use_luminance) the sprite's own shading. Pixel-crisp, same size as the sprite, transparent where the sprite is.
Args: filename: Aseprite file output_filename: PNG to write (e.g. hero_n.png) layer_name: Layer or group ("" = all visible) frame_index: Frame strength: Bumpiness, 0.3-3 use_luminance: How much the existing shading adds detail, 0-1 convention: "opengl" (Godot, Unity: green up) or "directx" (green down) as_layer: Also add it to the sprite as this (hidden) layer
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filename": "<filename>",
"output_filename": "<output_filename>"
},
"name": "generate_normal_map"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as_layer | No | ||
| filename | Yes | ||
| strength | No | ||
| convention | No | opengl | |
| layer_name | No | ||
| frame_index | No | ||
| use_luminance | No | ||
| output_filename | Yes |