Phlanka Logo
Phlanka
Docs / Substance Painter

AI-generated documentation

These docs were generated with the help of AI and may contain inaccuracies. If something looks wrong, please open a ticket in our Discord server and we will get it corrected.

Substance Painter Addon

The Phlanka DayZ Exporter is a Substance Painter plugin that exports your painted textures in the formats DayZ expects, and optionally generates the .rvmat material file and a config.cpp class definition — all from a single dialog inside Substance Painter.

Everything the plugin produces lands in a folder of your choice. You walk away with ready-to-use DayZ texture files and, if you want, the supporting material and config files as well — no manual channel packing or file renaming required.


Installation

The plugin is delivered as a .zip file. You do not need an installer — just extract the folder and place it in the right location.

  1. 1

    Download the zip

    Download the plugin zip from your Phlanka dashboard.

  2. 2

    Extract the zip

    Extract the zip file. You will get a single folder called Phlanka_DayZ. Do not rename this folder — Substance Painter loads the plugin by that exact name.

  3. 3

    Copy the folder to the plugins directory

    Move or copy the Phlanka_DayZ folder into your Substance Painter plugins directory:

    Platform Plugins folder path
    Windows C:\Users\YourName\Documents\Adobe\Adobe Substance 3D Painter\python\plugins\
    macOS /Users/YourName/Documents/Adobe/Adobe Substance 3D Painter/python/plugins/

    If the plugins folder does not exist yet, create it manually. The final structure should look like:

    python/
      plugins/
        Phlanka_DayZ/
          __init__.py
          custom_export.py
          ...
  4. 4

    Launch Substance Painter

    Start (or restart) Substance Painter. The plugin loads automatically on startup — no manual enable step is required. You will see a DayZ Export menu appear in the top menu bar.

  5. 5

    Activate your license

    Open any project, click DayZ Export → DayZ Export Options, then go to the About tab to enter and activate your license key.

Do not rename the folder

The folder must be named exactly Phlanka_DayZ. Renaming it will prevent Substance Painter from loading the plugin.


Getting Started

Once the plugin is installed and your license is activated, open any Substance Painter project and follow these steps.

  1. 1 Paint and bake your textures as normal inside Substance Painter.
  2. 2 In the top menu bar, click DayZ Export to reveal the plugin menu.
  3. 3 Click DayZ Export Options to open the main export dialog.
  4. 4 Work through the tabs from left to right. At minimum, fill in the Export tab, then click the Export button at the bottom.

No project open?

If no Substance Painter project is loaded when you open the dialog, most controls will be disabled and a notice will appear asking you to open a project first. Load your .spp file, then re-open the dialog.


Export Tab

The first tab in the dialog. You will use this on every export. It controls where files are saved, what they are called, how large they are, and which texture types are produced.

Export Preset Bar

Sits at the top of the Export tab. Lets you save and restore your entire export configuration so you do not have to re-enter the same settings for each project. See Export Presets for full details.

Dropdown

Lists all saved export presets by name. Select one to instantly load its settings into every field on the Export tab.

Save Preset

Opens a small prompt asking for a preset name. Saves your current prefix, output path, resolution, texture checkboxes, and SMDI channel mapping as a named preset.

Delete Preset

Removes the currently selected preset. A confirmation dialog appears before the preset is permanently deleted.

Image Name Prefix

A text input field. Whatever you type here is prepended to every exported filename, followed by an underscore and the texture set name. It is required — the Export button will not work if this field is empty.

  • No spaces are allowed. Use underscores to separate words, e.g. my_sword.
  • Keep it short and descriptive. It forms part of every filename and the RVMAT filename.
  • If you try to export with this field empty or containing spaces, a warning dialog appears and the export is blocked.
Prefix: my_sword  +  Texture set: blade  →  my_sword_blade_CO.png

For full filename patterns see File Naming.

Output Location

Shows the currently selected export folder as a read-only text label. All textures, the RVMAT file, and the config.cpp are saved into this single folder.

Select Output Folder

Opens your operating system's folder browser dialog. Navigate to the folder where you want the files saved and click OK. The path label updates immediately.

If no folder is selected, the plugin automatically creates a folder called CustomExports in the same directory as your open Substance Painter project file (.spp).

Output Resolution

A dropdown that sets the pixel dimensions of every exported texture. The same value is used for both width and height — all textures are always square.

Resolution When to use
1024Small props, items held in hand. Fast to bake and small file size.
2048Most DayZ assets. Good balance of detail and file size.
4096High-detail assets, large clothing items or vehicles. Larger files.
8192Maximum detail. Only use when the asset warrants it — very large files.

Texture Type Checkboxes

A row of checkboxes — one for each texture type the plugin can produce. Only the types you tick are exported. If a checkbox is unticked, that texture is skipped entirely and no file is created for it.

CO

Always ticked by default. Exports the base colour texture. Untick only if you have a specific reason to skip it.

SMDI

Exports the composite specular/metallic/glossiness texture. Has a Customise button next to it — see SMDI Channels.

NOHQ

Exports the normal map in DirectX format. Tick this if your asset has painted or baked surface detail.

AS

Exports the ambient occlusion composite. Tick this if you have baked AO in your texture set.

EM

Exports the emissive map. Only has any effect if an Emissive channel exists in the texture set — see Texture Types.

Customise

A small link button that appears to the right of the SMDI checkbox. Clicking it opens the SMDI Channel Configuration dialog where you can change what data each RGB channel of the SMDI texture carries. See SMDI Channels for the full breakdown.

Export Button

The large button at the bottom of the dialog. Clicking it starts the export process. A progress bar appears showing each texture set as it is processed. The button is labelled Cancel while an export is running — clicking it mid-export stops any remaining texture sets from being processed.

Before starting, the plugin validates that the Image Name Prefix is set, that any Config fields are filled in correctly if Config Generation is enabled, and that the output folder is accessible. If validation fails, a dialog describes what needs to be corrected.


Texture Types

DayZ uses multiple texture maps to build up the final appearance of a surface in-game. Each is a separate PNG file. The plugin exports each type independently — you only need to produce the ones your asset actually uses. Tick the corresponding checkbox on the Export tab to include it in the export.

CO Colour / Albedo

The base colour of the surface — what it looks like before any lighting, shadows, or reflections are applied. This is your painted Base Color channel exported directly as a full-colour RGB image. Every DayZ asset needs a CO texture. You will almost always want to export this.

The plugin reads all three colour channels (Red, Green, Blue) directly from Substance Painter's Base Color document channel.

Source
Base Color channel
Channels
RGB (full colour)
Format
PNG, 8-bit
NOHQ Normal Map — DirectX Format

Encodes surface detail — bumps, scratches, stitching, panel lines — without adding extra geometry to the model. The colour values in the image represent direction information that the game engine uses to shade the surface as if it has physical depth.

DayZ uses the DirectX normal map convention. Substance Painter's default baked normals follow the OpenGL convention where the Green channel is flipped. The plugin automatically uses Substance Painter's built-in DirectX normal map output so the conversion is handled for you — you do not need to flip the green channel manually.

Source
Generated Normal (DirectX)
Channels
RGB
Format
PNG, 8-bit
SMDI Specular / Metallic / Detail / Intensity

A composite texture where each of the three colour channels carries completely different surface data. This is how DayZ packs multiple material properties into a single file. The default channel layout is:

Channel Default source What it controls in DayZ
R White (solid fill) Specular intensity — how strongly the surface reflects highlights
G Metallic (greyscale) Metallic value — whether the surface behaves like metal or a dielectric
B Glossiness (generated) Surface smoothness — how tight or spread out the specular highlight is

All three channels can be changed from their defaults. See SMDI Channel Customisation for the full list of available sources and how the customise dialog works.

Source
Configurable per-channel
Channels
RGB (independent)
Format
PNG, 8-bit
AS Ambient Occlusion Composite

Carries ambient occlusion data — the subtle darkening that occurs in crevices, folds, and tight corners where ambient light has difficulty reaching. This gives a model a sense of depth and weight that makes it look grounded rather than flat.

The Green channel holds the AO data read from Substance Painter's Ambient Occlusion document channel. The Red and Blue channels are filled with solid white. You need to have baked or painted an Ambient Occlusion channel in your texture set for this to contain anything useful.

G channel
AO (greyscale)
R + B channels
White (solid fill)
Format
PNG, 8-bit
EM Emissive / Self-Illumination

Used for surfaces that emit their own light — indicator lights, backlit screens, glowing elements, luminescent markings. Where the EM texture is bright, the surface will appear to glow in-game even in complete darkness.

The plugin reads all three colour channels (Red, Green, Blue) from your painted Emissive document channel. If no Emissive channel exists in the texture set, the export is silently skipped for that texture set — a message is printed to the Substance Painter log explaining what happened.

When EM is exported, the plugin also automatically updates the emissive multiplier in the RVMAT file to 1,1,1,1 (fully active). When no EM is exported it is set to 0,0,0,0 (off). See RVMAT Settings.

To use EM: in Substance Painter, open the texture set settings and add an Emissive channel. Paint your emissive areas on that channel, then tick the EM checkbox before exporting.
Source
Emissive channel
Channels
RGB (full colour)
Format
PNG, 8-bit

File Naming

Every exported file follows a consistent naming pattern built from three parts.

Part Where it comes from
{prefix}The value you type into the Image Name Prefix field.
{TextureSetName}The name of the texture set in Substance Painter. Each texture set produces its own set of files.
{TYPE}The texture type: CO, NOHQ, SMDI, AS, or EM.

{prefix}_{TextureSetName}_{TYPE}.png

prefix_SetName_CO.png

prefix_SetName_NOHQ.png

prefix_SetName_SMDI.png

prefix_SetName_AS.png

prefix_SetName_EM.png

prefix_SetName.rvmat

config.cpp

Worked example

Prefix: my_sword  ·  Texture sets: blade and grip

my_sword_blade_CO.png

my_sword_blade_NOHQ.png

my_sword_blade_SMDI.png

my_sword_blade.rvmat

my_sword_grip_CO.png

my_sword_grip_NOHQ.png

my_sword_grip_SMDI.png

my_sword_grip.rvmat

config.cpp

All files land in the same output folder. The config.cpp is a single file regardless of how many texture sets exist — it references all of them inside its hidden selections array.


SMDI Channel Customisation

The SMDI texture packs three independent data sources into a single image. By default the channels are set to R = White, G = Metallic, B = Glossiness — but you can change any of them to better match your material's needs.

Opening the Customise Dialog

On the Export tab, tick the SMDI checkbox. A small Customise link button appears immediately to its right. Click it to open the SMDI Channel Configuration dialog.

Inside the SMDI Dialog

The dialog contains three rows — one for each colour channel (R, G, B). Each row has a label and a dropdown. The dropdown lists every available source. Select the source you want for that channel, then close the dialog. Your choices are saved automatically and used the next time you export.

Reset to Defaults

A button at the bottom of the SMDI dialog. Clicking it immediately restores all three channels to their default values: R = White, G = Metallic, B = Glossiness.

Option name What it reads Notes
White Solid white fill (value 255 across the full channel) The channel will be completely white in the output. Use this for any channel that should always be at full intensity — the default for R.
Black Solid black fill (value 0 across the full channel) The channel will be completely black. Use this to effectively disable a channel.
Roughness Roughness channel in Substance Painter (greyscale) Reads from your painted or baked roughness values. Higher values = rougher / less glossy.
Metallic Metallic channel in Substance Painter (greyscale) Reads from your painted metallic values. Use this to drive the metallic response in DayZ. The default for G.
Specular Specular channel (greyscale) Reads from a painted specular channel if one exists in the texture set. If not, the plugin falls back to a generated virtual specular map automatically.
Specular Level Specular Level channel (greyscale) The specular intensity level channel. Distinct from plain Specular — controls the overall level of specular response.
Glossiness Generated Glossiness map (greyscale) A computed glossiness map produced by Substance Painter from your roughness data. The default for B.
Glossiness² Generated Glossiness² map (greyscale) The squared glossiness — same source as Glossiness but with a different contrast curve. Can produce a more concentrated highlight.

Automatic fallback behaviour

When you choose a Roughness, Specular, or Specular Level source but that painted channel does not exist in the current texture set, the plugin does not fail. Instead it automatically falls back to the closest generated virtual equivalent (for example, Specular falls back to a generated specular computed from the PBR data). A message is printed to the Substance Painter output window explaining what fallback was used, so you can check the log if something looks unexpected.


RVMAT Settings

The second tab in the dialog. Controls the generation of the .rvmat material file. When enabled, one RVMAT file is generated per texture set and saved into the same output folder as the textures. The RVMAT tells DayZ how to shade the surface — it references the exported textures and defines the material's light response properties.

Generate RVMAT — Checkbox

The master switch for this tab. When unticked, no RVMAT file is produced and all other settings on this tab are ignored. Tick it to enable RVMAT generation. Once ticked, all the fields below become active.

RVMAT Preset Bar

Appears below the Generate RVMAT checkbox. Works the same way as the export preset bar on the Export tab but saves only RVMAT-specific values (ambient, diffuse, specular, specular power, Fresnel).

Preset dropdown

Lists saved RVMAT presets. Selecting one immediately fills in all the fields below with the saved values. Useful if you work with different material types (fabric, metal, wood) that each need different settings.

Save RVMAT Preset

Prompts for a name and saves the current ambient, diffuse, specular, specular power, and Fresnel values as a reusable preset.

Ambient (R / G / B)

Default: 0.8 · 0.8 · 0.8

Three text input fields — one for each colour component (Red, Green, Blue). Controls the ambient light colour the material receives. Values are decimal (0.0 is no ambient, 1.0 is full). Leave at the default for most assets unless you need a tinted ambient response (for example, a warm-toned material might use slightly higher R).

Diffuse (R / G / B)

Default: 0.8 · 0.8 · 0.8

Three text inputs for the diffuse reflection colour. This influences how much of the scene lighting the surface absorbs and re-emits as diffuse. The default neutral grey works for most assets.

Specular (R / G / B)

Default: 0.3 · 0.3 · 0.3

Three text inputs for the specular highlight colour. Set higher values for metal-like materials that need a bright, white specular, and lower values for matte or rough surfaces. A coloured specular (e.g. slightly warm) can help match real material behaviour.

Specular Power

Default: 25

A numeric spin box. Controls how sharp or spread out the specular highlight is. Low values (e.g. 5–15) produce a large, soft highlight suitable for rough or matte surfaces. High values (e.g. 50–200) produce a tiny, hard highlight suitable for polished metal or glass. Drag the value or click the arrows to adjust.

Fresnel

Default: #(ai,64,64,1)fresnel(1.1,0.3)

A text input that holds the Fresnel shader expression. The two numbers inside the brackets are the N (refractive index) and K (extinction coefficient) values. These control how the material reflects at glancing angles — the rim reflection effect. The default values (1.1, 0.3) suit most common DayZ assets. Only adjust this if you have a specific material type that needs different rim behaviour.

How texture paths get into the RVMAT

The plugin uses a template file and replaces placeholder values at export time. The paths to the NOHQ, SMDI, AS, and EM textures are written in automatically based on whatever was exported. If a texture was not exported (checkbox unticked), the RVMAT falls back to a default DayZ-compatible placeholder colour value for that slot — so the RVMAT will always be valid even if you only exported CO.

The emissive multiplier in the RVMAT is also set automatically: 1,1,1,1 when an EM texture was produced, 0,0,0,0 when it was not. You do not need to edit this manually.

The RVMAT file is always overwritten when you export. If you need custom values in the file, capture them as an RVMAT preset before re-exporting, so they are reapplied automatically. Do not edit the .rvmat file directly — changes will be lost on the next export.

Config Generation

The third tab. Optionally generates a config.cpp file — a DayZ / Arma class definition that wires your item's textures and material into the game. This saves you from writing the boilerplate by hand and ensures the hidden selection names match what you painted.

Generate Config — Checkbox

The master switch for this tab. When unticked, no config.cpp is produced. All other Config Settings fields are only validated and used when this is ticked.

Config Preset Bar

Works the same way as the export and RVMAT preset bars but saves config-specific values: class name, base class name, display name, description, and all hidden selection names.

Preset dropdown

Select a saved config preset to populate all the class fields below in one click.

Save Config Preset

Prompts for a name and saves all current class details and hidden selection names.

Config Type

e.g. CfgVehicles

A dropdown. Sets the top-level class name in the config. Choose the type that matches your item: CfgVehicles (characters, clothing, wearables), CfgWeapons (weapons and attachments), or CfgMagazines (ammunition magazines).

Class Name

e.g. DayZ_MySword

A text input. The unique internal identifier for your item in the mod. Used as the class name in the config and in CfgPatches. No spaces or special characters — only letters, numbers, and underscores. This value must be unique within your mod to avoid conflicts.

Base Class Name

e.g. Clothing

A text input. The DayZ class your item inherits from. This must be a valid class that exists in the base game or a dependency of your mod. No spaces. Common examples: Clothing, TShirt_Base, Vest_Base, Rifle_Base.

Display Name

e.g. My Sword

A text input. The human-readable name shown to players in-game (in the inventory, on tooltips, etc.). Spaces are allowed here.

Description

e.g. A sharp blade

A text input. The short description shown in the item's info card in-game. Spaces are allowed.

UV Sets & Hidden Selection Names

Appears as a labelled section below the class detail fields. The plugin reads the names of all texture sets in your current Substance Painter project and displays one text input field for each one.

For each texture set, enter the hidden selection name that corresponds to it in your 3D model. The name you type here must match the selection name defined in the model's LOD inside Object Builder or Blender. No spaces or special characters are allowed in hidden selection names.

What hidden selections do

Hidden selections are named regions on a 3D model's geometry. The config's hiddenSelections[] array lists them, and hiddenSelectionsTextures[] maps each one to a texture path, and hiddenSelectionsMaterials[] maps each to an RVMAT path. The plugin fills these arrays automatically from the hidden selection names you enter and the texture files that were just exported.

If the Generate Config checkbox is ticked and any hidden selection name is left blank, a validation warning appears before the export starts. All fields must be filled in.


Materials Library

The fourth tab in the dialog — and also available as a standalone dockable panel via DayZ Export → Materials Library. The library lets you browse, preview, and apply pre-made DayZ-ready materials directly to your active texture set in Substance Painter, without building them from scratch.

A valid and activated Phlanka license is required to use the Materials Library.

Search Box

A text input at the top of the library panel. Type any part of a material name to instantly filter the list. The search is applied in real time as you type — no need to press Enter. Clear the field to show all materials again.

Category Dropdown

Filters the material list by category (for example Fabrics, Metals, Wood, Concrete). Select a category from the dropdown to see only materials in that group. Select All Categories (the first option) to show everything. The category filter works together with the search box — both are applied simultaneously.

Recently Used Section

Shows thumbnails of the materials you have applied most recently. Appears at the top of the material list so your most common choices are always one click away. This list is stored locally on your machine and persists between sessions.

Material List

The main scrollable list of available materials, each shown as a named thumbnail icon.

Single click

Opens a large preview dialog showing the material name, category, and a full-size preview image. Close the preview to return to the list.

Double click

Applies the material directly to the currently active texture set in Substance Painter. The texture set's channels are filled with the material's layer data. This action cannot be undone through the plugin — use Substance Painter's own undo if needed.

Refresh Button

Re-downloads the material catalogue from the Phlanka server. Use this if you have purchased access to new materials and they are not appearing in the list yet. During the refresh a status label shows the download progress and the number of icons updated.

Apply to Active Texture Set Button

Appears at the bottom of the library panel. An alternative to double-clicking — select a material in the list and then click this button to apply it to the active texture set. Useful if you find double-click difficult to trigger reliably.


About Tab

The fifth and final tab. Contains license information, the plugin version, language settings, and material cache management. You do not need to visit this tab for normal exports.

License Information

Displays the details of your activated license:

Registered to: The email address the license is associated with.
License Expiration: The date the license expires, or "Never Expires" for lifetime licenses.
Days Remaining: A countdown of days left, or "Expired" if the license has lapsed.
Version: The current plugin version number.
Website: A clickable link to phlanka.com.

Language Dropdown

Lets you change the language of all UI text in the plugin. Select a language from the dropdown. The available options are: English, Chinese (Simplified), Chinese (Traditional), French, German, Spanish, and Russian.

After changing the language, restart Substance Painter fully for the change to take effect across all parts of the plugin.

Clear Material Cache Button

Removes the locally cached material thumbnails and index data. Use this if material icons look incorrect or if you want to force a full fresh download on the next library Refresh. A status label below the button confirms when the cache has been cleared and reports how many icon files were removed.


Export Presets

Presets let you save your current settings and reload them instantly for future projects. There are three independent preset systems — one for each tab that has configurable settings. They are stored locally in files alongside the plugin and persist between sessions.

Saving a preset

  1. 1. Configure all the settings the way you want them.
  2. 2. Click the Save Preset (or Save RVMAT Preset / Save Config Preset) button on the relevant tab.
  3. 3. A small input prompt appears. Type a name for the preset and confirm.
  4. 4. The preset is saved and immediately appears in the dropdown.

Loading a preset

Click the preset dropdown at the top of the relevant tab and select the preset you want. All saved values are immediately applied to the fields on that tab. You can then adjust individual fields without affecting the saved preset.

Deleting a preset

Select the preset in the dropdown and click Delete Preset. A confirmation dialog appears before the preset is permanently removed. Deleted presets cannot be recovered.


Tips & Troubleshooting

Common issues and how to resolve them.

Nothing was exported — no files appeared in the output folder

Check that the Image Name Prefix field on the Export tab is filled in and contains no spaces. Also confirm that at least one texture checkbox is ticked and that the output folder exists and is writable. The Substance Painter output window will contain a log message explaining which validation check failed.

The SMDI texture looks wrong — the colours or brightness are unexpected

Click the Customise button next to the SMDI checkbox and verify which source is assigned to each channel. Also check the Substance Painter output window — the plugin logs exactly which source was used for each channel, and whether any automatic fallback was triggered. See SMDI Channel Customisation for the full channel reference.

The RVMAT file is missing texture paths, or paths are wrong

The RVMAT is completely regenerated on every export. If a texture was not exported (checkbox unticked), the corresponding path in the RVMAT falls back to a DayZ default placeholder — it will not carry over a path from a previous export. To get the full set of paths in the RVMAT, tick all the texture checkboxes you need and re-export. See RVMAT Settings for details.

The EM texture was not exported — the EM file is missing

The Emissive map can only be exported if an Emissive channel exists in the texture set. In Substance Painter, open the texture set settings for the relevant texture set, add an Emissive channel, paint your emissive areas, and then export again with the EM checkbox ticked. See Texture Types → EM.

I edited the .rvmat file manually and my changes were lost on re-export

The RVMAT is always overwritten when you export. Any values you want to keep must be entered through the RVMAT Settings tab fields and saved as an RVMAT preset before exporting again. Do not edit the .rvmat file directly.

The export button is greyed out or does not respond

Make sure a Substance Painter project is open. The plugin cannot export if no project is loaded. If a project is open and the button still does not respond, check the Image Name Prefix field — it must be non-empty and contain no spaces before the export can proceed.

The dialog opened but most controls are disabled and a warning is shown

This happens when no Substance Painter project is currently open. The plugin requires a loaded project to read texture sets and run the export. Open your .spp file and then re-open the dialog.

Materials are not appearing in the Materials Library

Click the Refresh button in the Materials Library tab to re-download the catalogue from the server. If materials still do not appear, check that your license is valid on the About tab and that you have an active internet connection.

Material icons look corrupted or are showing as blank squares

Go to the About tab and click Clear Material Cache, then return to the Materials Library and click Refresh. This forces a complete re-download of all material thumbnails.

The config.cpp was not generated even though Generate Config is ticked

All fields in the Config Settings tab must be filled in before the config can be produced. Check that Class Name, Base Class Name, Display Name, Description, and all Hidden Selection Name fields are filled in and do not contain spaces. A validation message will identify the specific field that is missing or invalid.