Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/armory3d/armorpaint/llms.txt

Use this file to discover all available pages before exploring further.

The ArmorPaint repository is organized around two distinct layers: /base, which contains a general-purpose 3D engine (iron), and /paint, which contains all ArmorPaint-specific application code and assets. This separation means the engine can evolve independently of the painting application, and the paint/project.js simply subprojects base/project.js to pull in the complete engine before adding the application layer on top.
The iron engine is based on Kore by RobDangerous, a C hardware abstraction layer. The Kong shader compiler embedded in /base/sources/kong/ is based on Kongruent, also by RobDangerous.

Repository Layout

armorpaint/
├── base/                        # General-purpose 3D engine (iron)
│   ├── sources/                 # C source files for the engine
│   │   ├── backends/            # Platform & GPU-specific backends
│   │   ├── libs/                # Minimal header-only / single-file libraries
│   │   ├── kong/                # Kong shader compiler (minikong)
│   │   └── miniclib/            # Minimal C stdlib for WASM
│   ├── shaders/                 # .kong shader files for the UI renderer
│   │   └── raytrace/            # Pre-compiled hardware RT shaders
│   ├── tools/
│   │   ├── amake/               # Build tool source (aimage.c, ashader.c, make.js)
│   │   └── bin/                 # Pre-built amake binaries per platform
│   ├── assets/                  # Engine-level assets (fonts, noise, color wheel)
│   ├── docs/                    # Developer documentation
│   └── project.js               # Engine build manifest

└── paint/                       # ArmorPaint application
    ├── sources/                 # All ArmorPaint C source files
    │   ├── nodes_material/      # Material node implementations
    │   ├── nodes_brush/         # Brush node implementations
    │   ├── nodes_neural/        # AI / neural node implementations
    │   ├── render/              # Render pipeline stages
    │   ├── ui/                  # UI panels and dialogs
    │   ├── io/                  # Import / export handlers
    │   └── util/                # Utility functions
    ├── shaders/                 # Paint-specific .kong shaders
    ├── assets/                  # Application assets
    │   ├── export_presets/      # Export configuration presets
    │   ├── keymap_presets/      # Keyboard shortcut presets
    │   ├── locale/              # Localization JSON files
    │   ├── meshes/              # Default mesh assets
    │   ├── plugins/             # Plugin asset bundles
    │   └── readme/              # Bundled readme
    ├── plugins/                 # Built-in plugin source directories
    └── project.js               # Application build manifest

Engine Architecture

The iron engine provides a layered hardware abstraction:
1

GPU Abstraction (iron_gpu)

iron_gpu.h / iron_gpu.c define the graphics API-agnostic interface. The actual implementation is provided by one of the four backend files selected at compile time: direct3d12_gpu.c, vulkan_gpu.c, metal_gpu.m, or webgpu_gpu.c.
2

OS Abstraction (iron_system)

iron_system.h / iron_system.c define the OS-agnostic interface for window management, input, and timing. Platform-specific backends (windows_system.*, linux_system.*, macos_system.*, etc.) provide the concrete implementation.
3

Higher-Level Engine Modules

On top of the hardware abstraction, the engine provides: iron_draw (2D rendering), iron_ui (immediate-mode UI), iron_image (image loading/processing), iron_audio (audio playback), iron_math (vector and matrix math), iron_gc (garbage collection), and more.
4

Application Layer (paint/)

ArmorPaint’s main.c initializes the engine and application state. All painting, project management, node graph evaluation, and UI panels are implemented on top of the engine layer in the paint/sources/ tree.

/base Source Modules

Key engine source files in base/sources/:
FileDescription
iron_gpu.h / iron_gpu.cGraphics API abstraction layer
iron_draw.h / iron_draw.c2D/UI drawing commands
iron_ui.cImmediate-mode UI system
iron_ui_nodes.cNode graph UI widget
iron_image.cImage loading and format conversion
iron_audio.cAudio playback abstraction
iron_json.cJSON parser / writer
iron_math.cVector, matrix, quaternion math
iron_gc.cGarbage collector
iron_lz4.cLZ4 compression / decompression
iron_armpack.cArmPack binary format reader/writer
engine.cEngine initialization and main loop

/paint Key Source Modules

main.c

Application entry point. Initializes the iron engine and kicks off the ArmorPaint startup sequence.

context.c

Defines and manages context_t, the global application state struct. Nearly all runtime state (active layer, active material, viewport settings, etc.) lives here.

config.c

Handles loading and saving of config_t, the persistent user configuration (preferences, window layout, recent files).

project.c

Manages ArmorPaint project files: opening, saving, importing, and exporting .arm project archives.

plugin.c

Plugin lifecycle management: loading plugin bundles, calling plugin init/update/cleanup hooks, and managing the plugin registry.

minic_api.c

Binds ArmorPaint’s internal C functions to the MiniC scripting API, making them callable from plugin scripts and the node graph scripting system.

parser_material.c

Traverses the material node graph and generates shader source code at runtime. This is the core of ArmorPaint’s procedural material system.

viewport.c

Drives the 3D viewport rendering loop: camera control, mesh display, paint overlay rendering, and viewport mode switching (solid, material, paint, raytrace).

/paint Source Subdirectories

nodes_material/

One .c file per material node type (e.g. image_texture_node.c, noise_texture_node.c, mix_color_node.c). Each file implements the node’s shader code generation and UI.

nodes_brush/

Brush node implementations. Defines the node graph system for procedural brush shapes and dynamics.

nodes_neural/

AI/neural node implementations: text_to_image_node.c, image_to_pbr_node.c, upscale_image_node.c, neural_node.c, and others.

render/

Render pipeline stages: render_path_base.c, render_path_deferred.c, render_path_forward.c, render_path_paint.c, render_path_raytrace.c, and baking pipelines.

ui/

All UI panels and dialogs: tab panels (tab_layers.c, tab_materials.c, tab_brushes.c, etc.) and modal dialog boxes (box_preferences.c, box_new_project.c, etc.).

io/

Import and export handlers for meshes, textures, fonts, and project files. Formats include OBJ, glTF, FBX, EXR, PSD, and the native .arm format.

Built-in Plugins

The paint/plugins/ directory contains source code for plugins that ship with ArmorPaint:
PluginDescription
io_gltfglTF 2.0 mesh and scene import
io_fbxFBX mesh import
io_exrOpenEXR image import/export
io_psdPhotoshop PSD export
io_svgSVG import
io_tiffTIFF image support
uv_unwrapAutomatic UV unwrapping

Build docs developers (and LLMs) love