Command line
pbrgen runs from the repository folder through the launcher: .\pbrgen.cmd on Windows, ./pbrgen.sh on macOS and Linux. Every command below is the launcher followed by the words shown.
Exit codes: 0 success, 1 the run failed, 2 bad usage (unknown parameter, bad value, missing input).
pbrgen generate
Derive the maps of one image.
Usage
text
pbrokkr-cli generate [-h] [-p PRESET] [-o OUT] [--set KEY=VALUE] [--macro NAME=VALUE] [--kind {height,photo,normal,procedural}] [--size SIZE] [--profile {standalone,unity_urp,unity_hdrp,unreal,godot}] [--pack [KIND]] [--sheet] [input]Options
| Option | Meaning |
|---|---|
input | input image (omit for --kind procedural) |
-p, --preset | preset JSON path or name in presets/ |
-o, --out | output directory (generate: default out/<input name>) |
--set | override a parameter; repeatable; lists as comma-separated numbers |
--macro | apply a simple-mode macro (see pbrokkr-cli macros); repeatable |
--kind | shortcut for --set input_kind=... (height, photo, normal, procedural) |
--size | shortcut for --set resize=N |
--profile | export profile (engine file set), shortcut for --set export_profile=... (standalone, unity_urp, unity_hdrp, unreal, godot) |
--pack | also write <prefix>.pbrpack, a texture pack for AskrGarden; KIND is generic (default), bark, leaf or ground (shortcut for --set texpack_enabled=true --set texpack_kind=KIND) (generic, bark, leaf, ground) |
--sheet | also write a labelled contact sheet |
pbrgen batch
Derive the maps of every image in a folder or glob.
Usage
text
pbrokkr-cli batch [-h] -p PRESET [-o OUT] [--set KEY=VALUE] [--macro NAME=VALUE] [--kind {height,photo,normal,procedural}] [--size SIZE] [--profile {standalone,unity_urp,unity_hdrp,unreal,godot}] [--pack [KIND]] [--sheet] inputsOptions
| Option | Meaning |
|---|---|
inputs | folder, or glob such as 'textures/*_Albedo.jpg' |
-p, --preset | |
-o, --out | output directory (generate: default out/<input name>) |
--set | override a parameter; repeatable; lists as comma-separated numbers |
--macro | apply a simple-mode macro (see pbrokkr-cli macros); repeatable |
--kind | shortcut for --set input_kind=... (height, photo, normal, procedural) |
--size | shortcut for --set resize=N |
--profile | export profile (engine file set), shortcut for --set export_profile=... (standalone, unity_urp, unity_hdrp, unreal, godot) |
--pack | also write <prefix>.pbrpack, a texture pack for AskrGarden; KIND is generic (default), bark, leaf or ground (shortcut for --set texpack_enabled=true --set texpack_kind=KIND) (generic, bark, leaf, ground) |
--sheet | also write a labelled contact sheet |
pbrgen params
List every parameter with default, choices and doc.
Usage
text
pbrokkr-cli params [-h] [--json] [--lang {en,pt}]Options
| Option | Meaning |
|---|---|
--json | |
--lang | language of the help text (en, pt) |
pbrgen macros
List the simple-mode macros (--macro NAME=VALUE).
Usage
text
pbrokkr-cli macros [-h]pbrgen preset new
Write presets/NAME.json.
Usage
text
pbrokkr-cli preset new [-h] [--from FROM_PRESET] [--set KEY=VALUE] [--macro NAME=VALUE] [--force] nameOptions
| Option | Meaning |
|---|---|
name | |
--from | start from this preset instead of the defaults |
--set | |
--macro | |
--force | overwrite an existing preset |
pbrgen serve
Start the local web app (http://127.0.0.1:PORT).
Usage
text
pbrokkr-cli serve [-h] [--port PORT] [--open] [--app] [--exit-when-closed] [--library DIR]Options
| Option | Meaning |
|---|---|
--port | |
--open | open the browser |
--app | open in its own window (Edge or Chrome app mode; the default browser if neither is found) |
--exit-when-closed | stop the server when its window or tab is closed (what the pbrokkr program does) |
--library | folder for saved materials, exports and layouts (default: the saved setting, else <Documents>/PBrokkR) |
pbrgen mcp
Run the MCP server on stdin / stdout (tools for AI agents).
Usage
text
pbrokkr-cli mcp [-h] [--library DIR]Options
| Option | Meaning |
|---|---|
--library | library folder for saved materials and default exports (default: the saved setting, else <Documents>/PBrokkR) |
Macros (--macro NAME=VALUE)
The sliders of the app's simple mode. Each moves several parameters at once.
| Macro | Range | Neutral |
|---|---|---|
relief_depth | 0.0 .. 3.0 | 1.0 |
detail_scale | -1.0 .. 1.0 | 0.0 |
smooth | 0.0 .. 1.0 | 0.0 |
ao_amount | 0.0 .. 2.0 | 1.0 |
roughness | -1.0 .. 1.0 | 0.0 |
crevices | 0.0 .. 2.0 | 0.0 |
seamless | on / off | null |
invert | on / off | false |
Examples
powershell
# One image, a preset, an output folder and a contact sheet
.\pbrgen.cmd generate rock.jpg -p photo_rock -o out\rock --sheet
# Override parameters and apply simple-mode macros
.\pbrgen.cmd generate rock.jpg -p photo_rock --set normal_strength=12 --macro relief_depth=1.6 --macro seamless=on
# A procedural height (no input image), 2048 px, with the Unity URP file set
.\pbrgen.cmd generate --kind procedural -p proc_bubbles --size 2048 --profile unity_urp -o out\bubbles
# The same, plus a texture pack that AskrGarden imports as a bark material
.\pbrgen.cmd generate --kind procedural -p proc_ropes --pack bark -o out\bark
# Every image of a folder
.\pbrgen.cmd batch textures -p photo_rock -o out\batch
# Reproduce a run exactly from the file it wrote
.\pbrgen.cmd generate rock.jpg -p out\rock\rock_params.json -o out\rock_again
# The web app in its own window, with the library in another folder
.\pbrgen.cmd serve --app --library D:\Textures\PBrokkR