The ArmorPaint repository is organized around two distinct layers: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.
/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.
Repository Layout
Engine Architecture
The iron engine provides a layered hardware abstraction: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.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.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./base Source Modules
Key engine source files in base/sources/:
| File | Description |
|---|---|
iron_gpu.h / iron_gpu.c | Graphics API abstraction layer |
iron_draw.h / iron_draw.c | 2D/UI drawing commands |
iron_ui.c | Immediate-mode UI system |
iron_ui_nodes.c | Node graph UI widget |
iron_image.c | Image loading and format conversion |
iron_audio.c | Audio playback abstraction |
iron_json.c | JSON parser / writer |
iron_math.c | Vector, matrix, quaternion math |
iron_gc.c | Garbage collector |
iron_lz4.c | LZ4 compression / decompression |
iron_armpack.c | ArmPack binary format reader/writer |
engine.c | Engine 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
Thepaint/plugins/ directory contains source code for plugins that ship with ArmorPaint:
| Plugin | Description |
|---|---|
io_gltf | glTF 2.0 mesh and scene import |
io_fbx | FBX mesh import |
io_exr | OpenEXR image import/export |
io_psd | Photoshop PSD export |
io_svg | SVG import |
io_tiff | TIFF image support |
uv_unwrap | Automatic UV unwrapping |