Skip to content

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

OptionMeaning
inputinput image (omit for --kind procedural)
-p, --presetpreset JSON path or name in presets/
-o, --outoutput directory (generate: default out/<input name>)
--setoverride a parameter; repeatable; lists as comma-separated numbers
--macroapply a simple-mode macro (see pbrokkr-cli macros); repeatable
--kindshortcut for --set input_kind=... (height, photo, normal, procedural)
--sizeshortcut for --set resize=N
--profileexport profile (engine file set), shortcut for --set export_profile=... (standalone, unity_urp, unity_hdrp, unreal, godot)
--packalso 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)
--sheetalso 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] inputs

Options

OptionMeaning
inputsfolder, or glob such as 'textures/*_Albedo.jpg'
-p, --preset
-o, --outoutput directory (generate: default out/<input name>)
--setoverride a parameter; repeatable; lists as comma-separated numbers
--macroapply a simple-mode macro (see pbrokkr-cli macros); repeatable
--kindshortcut for --set input_kind=... (height, photo, normal, procedural)
--sizeshortcut for --set resize=N
--profileexport profile (engine file set), shortcut for --set export_profile=... (standalone, unity_urp, unity_hdrp, unreal, godot)
--packalso 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)
--sheetalso 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

OptionMeaning
--json
--langlanguage 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] name

Options

OptionMeaning
name
--fromstart from this preset instead of the defaults
--set
--macro
--forceoverwrite 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

OptionMeaning
--port
--openopen the browser
--appopen in its own window (Edge or Chrome app mode; the default browser if neither is found)
--exit-when-closedstop the server when its window or tab is closed (what the pbrokkr program does)
--libraryfolder 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

OptionMeaning
--librarylibrary 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.

MacroRangeNeutral
relief_depth0.0 .. 3.01.0
detail_scale-1.0 .. 1.00.0
smooth0.0 .. 1.00.0
ao_amount0.0 .. 2.01.0
roughness-1.0 .. 1.00.0
crevices0.0 .. 2.00.0
seamlesson / offnull
inverton / offfalse

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