EDGEMAT / DOCS

EDGEmat design

EDGEmat is the EDGEmodders material editor for Cyberpunk 2077: a VS Code extension and an MCP server. A modder picks a garment, clicks a layer, chooses a color and sees it on the model. Or they skip the UI and tell REDagent or Claude “make this jacket red”.

Status: draft 0.2. Agreed with the user on 2026-10-14: a standalone extension in the EDGE family, .mlsetup editing first, an MCP server beside the UI, and MlsetupBuilder studied for behavior, never copied. M0 done on 2026-10-16: the behavior spec is checked against the game and agreed, and Neurolinked contacted. Since then the design gained the activity bar container, opening files from anywhere, the game folder and bridge through REDcode’s API, and the preview split with REDcode. M1 done on 2026-10-16, M2 on 2026-10-19, M3 on 2026-10-20 (released as the 0.3.0 preview; 0.3.1 on 2026-10-21). Next: M4 Make. Revised 2026-10-19 with the owner: Generate a material from words or a photo, game materials on a new mesh, and a new phase M4 Make ahead of the preview, so EDGEfab’s clothes and objects get materials sooner. Phases are now M0 to M7.

Mission

EDGE brings modding to everyone, especially non-coders: easy, fun and fast. For EDGEmat this decides every UI question:

Rule In practice
The first result in seconds Open an item, click a layer, pick a color, see it on the model. No file formats to learn first
Plain words first, details one click away “Leather, dark red, 41% of the jacket” before colorScale, mltemplate and level ranges. Every raw value stays reachable for experienced modders
Everything the UI does, an assistant can do Each feature ships in the UI and in the MCP server in the same phase
The best editor even with AI switched off The MCP server does nothing until an assistant connects. No telemetry, and no network calls except to an AI service the modder chose, only when they ask: Generate, with their own key (revised 2026-10-19, as EDGEfab’s rule says)

What EDGEmat edits

The file roles are from community knowledge (WolvenKit, the modding wiki, MlsetupBuilder) and are unverified here. M0 checks each one against real files through REDbridge.

File Class What it is
.mlsetup Multilayer_Setup A multilayered material’s layers. Each has a .mltemplate, a color preset, tiling, offsets, opacity, levels for normal, roughness and metalness, and a microblend (a small detail texture with its own tiling and contrast)
.mltemplate Multilayer_LayerTemplate A surface (leather, chrome, denim): its textures and its list of named color and level presets
.mlmask Multilayer_Mask One mask per layer: where on the mesh that layer shows
.mesh CMesh Material entries, local or external, and the appearances that pick a material per submesh. A multilayered material points at an .mlsetup and an .mlmask
.mi CMaterialInstance A baseMaterial (a .mt or another .mi) and the parameters it overrides
.mt CMaterialTemplate A shader and its parameters with defaults. Read, rarely edited

Two facts that matter most, both unverified:

Shape

Part What it is
extensions/edgemat The VS Code extension, id edgemodders.edgemat, with its own activity bar container: the .mlsetup editor, the library and find views (In VS Code), and the material bake that REDcode’s viewer shows (Preview)
extensions/edgemat/src/core Everything that is not UI: the bridge client, the material library, reading and editing setups, finding an item’s materials. No VS Code imports, so the MCP server bundles the same code, as redcode-mcp does with REDcode’s bridge client
packages/edgemat-mcp The MCP server over stdio, for Claude Code, REDagent or any MCP client
packages/edgemat-core The core as an npm package, @edgemodders/edgemat-core, for other tools’ extensions and MCP servers (EDGEfab’s Add to Project calls materialsFromModel with its own REDbridge through bridgeOver). Built from the same source, released with EDGEmat at the same version. Before 1.0, a change to an export’s request or result raises at least the middle number and is named in the changelog (EDGEmat #7, built 2026-11-12)
REDbridge Every game file read and write: archives, CR2W as JSON, textures to PNG, mesh export. EDGEmat asks for new methods as REDbridge issues labelled request
Relationship How
REDbridge A separate process over JSON-RPC on stdio, the boundary REDcode keeps. EDGEmat is MIT; REDbridge is GPL-3.0
REDcode Not required. Projects are WolvenKit projects, so EDGEmat writes into source/archive itself. When REDcode is installed, EDGEmat uses its API (REDcodeApi version 1, extension edgemodders.redcode-cyberpunk, REDcode 0.9.0) for the game folder, the bridge and the open project (below), and for packing (pack()), never importing its code
The UI and the MCP server together Both edit files. The editor follows changes on disk, so a modder watching the editor sees the assistant’s edit land
EDGEkit Bundled as a built-in extension once released

In VS Code

EDGEmat has its own place in the activity bar, as REDcode and EDGEdeck do. It works with no folder open: a modder opens EDGEmat, not a workspace.

Part What it is Phase
Activity bar An EDGEmat view container. Its icon is tools/brand/activity.svg: the family’s two HUD corner brackets around a material sheet over a second layer, 24 × 24, stroke 2, one color (currentColor). The theme paints it: in the REDnode HUD theme from REDcode, yellow when inactive and white when active. M1 copies it to extensions/edgemat/images/activity.svg, where REDcode and EDGEdeck keep theirs. The Marketplace icon is docs/assets/brand/icon.png (the “EM” mark) M1
Desk view Above Game Materials: the meshes and setups the modder is working on before they are in a project (The Desk). Built 2026-10-25 M3
Game Materials view Templates and microblends from the modder’s game, with thumbnails, filtered by plain words (Filter Game Materials, a funnel; called Search until 2026-11-13: it narrows the list in place, so it is a filter; Find is EDGEmat’s search). Called Library up to 0.3.1; renamed 2026-11-06 (EDGEmat #8, The EDGE Library). Its ids stay edgemat.library, edgemat.searchLibrary and edgemat.rebuildLibrary, and the MCP tool stays mat_library M1
Find view Items, meshes and setups, from the game and the open project. Built 2026-10-17: clothing items by in-game name or record id (1,997 items, read from TweakDB once per game version, 8.5 s, then cached), meshes by path. An item opens into its looks per body, each into its meshes and their materials; a multilayered material opens its setup with the mask set the material names, and the editor says so. Setups are found through Open Setup. Added 2026-10-26 (owner’s ask): the other way, from a mesh look to the game’s items that wear it, so a modder knows which item to give V in REDnode’s Console (addItem; CET until 2026-11-13) after changing the mesh: an index of every clothing item’s meshes and mesh appearances (both bodies, first and third person), built in about ten seconds once per game version and cached beside the item list (worn.json); shown in the setup editor (In the game, with each item’s Game.AddToInventory command and Copy), in a look’s tooltip on the Desk and in Find, and as Copy CET Command on a look, material or item. NPC-only looks have no item. Not yet: items from mods (ArchiveXL), and the open project M2
View in 3D Built 2026-10-19, the owner’s hand test passed the same day: an eye on each mesh row in Find (and in its right-click menu) opens the mesh in REDcode’s 3D view, which asks EDGEmat for its materials. A first renderMaterials, colors only and marked approximate: a layered material shows its color map (the setup editor’s, each layer’s color through its mask), a textured material shows its own color texture (BaseColor, DiffuseTexture, Albedo or Diffuse, sampled from the game). Bumps, shine, metal and microblends come with the bake (M5). Changed 2026-10-26 (the owner’s in-game check of a leather recolor): microblends cut the masks in the color map already (behavior spec, section 5); the rest stays M5. Shine built 2026-11-30: roughness and metal maps go with the colors (a layered material’s baked from each layer’s surface maps through its Roughness and Metal presets, mixed by the masks; a textured one’s from its own maps, scale and bias), lit by REDcode’s environment and light (REDcode #31, 0.10.15). A garment whose UVs run past the 0 to 1 square showed a seam until REDcode repeated textures (REDcode #16, shipped in REDcode 0.10.4). REDcode opens a mesh at its first look, so EDGEmat names the look to pick in the status bar. Needs REDcode. Not yet tried: a mesh in a project (its own setups and textures are read first, by design). The assistant’s twin is mat_render (M5) M2
Container title bar Open File, Find, Rebuild Game Materials. Built 2026-10-17: Open Setup (from the game by name, a file on disk, or a mod archive), Search, Rebuild Library M2
Surface page An editor tab for one surface (.mltemplate) or microblend, opened by clicking it in Game Materials. One preview tab, reused as the modder clicks around, as Explorer does. It shows the large image; every color preset as a named swatch; the roughness, metalness and normal presets in plain words; the defaults; tiling; the textures with their game paths, raw values one click away. Read-only: a game surface is shared by every item that uses it, so it is never edited in place. With a setup editor open, “Use on this layer” applies it there (M3). “Make a custom copy” starts a custom surface with free colors (M6). The MCP twin is mat_colors. Built 2026-10-17: one tab reused until “Keep open”; the image tinted with the picked color (an approximation, said so on the page); a filter by words and “closest to” a typed or picked color (OKLab distance); plain color names generated by EDGEmat (139 distinct across the game’s 155,099 presets); roughness and metal described as fixed values when the surface uses a flat default map M2
Setup editor A custom editor tab for .mlsetup. Opens from EDGEmat’s views, from REDcode’s Project and Game Assets trees, from the Explorer, and from Open File M2
  Editing built 2026-10-20 (M3): the selected layer’s details edit it: surface (a searchable list from the library), color (the surface’s own swatches, filtered by words), the five presets as drop-downs in plain words, tiling, offsets, opacity, microblend and its numbers. Each change applies live and is one VS Code edit (Ctrl+Z, Ctrl+Y; unsaved edits survive a reload). Checks from the behavior spec: a new surface resets the six presets to its defaults; a preset must be the surface’s own; None is never written; overrides and unknown fields are kept (an unedited setup writes back byte for byte). Save to Project (a page button, an editor title icon, and Ctrl+S on anything that is not a project’s own file): as a new setup with the meshes pointed at it, in place, or at a typed path; then REDcode’s Pack and Play. A project’s own file saves in place with Ctrl+S, and warns once if it is at a game path (MTO). The MCP twin is mat_edit, with a preview mode M3
  Built 2026-10-17, read-only: a custom editor for *.mlsetup and *.mlsetup.json on any URI: files on disk and in projects, REDcode’s redcode-game: files, EDGEmat’s own read-only edgemat-game: file system for game setups it opens, and files taken out of mod archives. Each layer in plain words (surface, color, finish, metal, bumps, microblend, share of the texture), why a layer does not show, and warnings (a color the surface lacks shows white). A color map: each layer’s swatch laid over the ones below through its mask, in texture space, with each layer’s share; click a spot to select its layer; the selected layer’s mask lit in the accent color. The mask set is the best name match beside the setup (on disk, in the mod, then in the game folder), or one the modder chooses: a setup does not name its mask, the mesh’s material does. REDcode’s CR2W editor also claims *.mlsetup; VS Code lets the modder pick, and Reopen Editor With switches M2

The Desk

Asked for by the owner on 2026-10-25; built the same day. Reworked 2026-10-26 into entries with their own edits, so variations of one mesh can sit side by side (the owner’s test found two pairs of slim-fits sharing one edit). A modder finds a mesh in REDcode, wants to change its materials, and has not decided on a project yet. The Desk is where it waits, with any edits, until it goes into one; trying a few versions of the same thing and keeping the one they like is part of that.

Part Behavior
Put on the Desk Open in EDGEmat on a .mesh’s right-click in REDcode’s Game Assets and Project views, in VS Code’s Explorer and on an editor tab, and from REDcode’s 3D view (edgemat.openMesh, REDcode #13). Add to Desk on a mesh in EDGEmat’s Find view does the same, with the look it was found in (added 2026-10-26, owner’s ask: Game Assets searches paths, so an item’s in-game name is found in Find); since 2026-10-27 also as a + on the mesh line. The Desk view comes forward with the entry selected and open: its looks, and the look asked for (else the one the most game items wear, else the first) open on its materials. A game .mlsetup goes on the Desk alone and opens; a .mltemplate opens on its surface page
Entries and variations Each line on the Desk is an entry with its own edits. Opening a file that is on the Desk already reuses a copy with no edits yet; once every copy there is edited, it starts a new one with the game’s look: variation 2, 3 and so on (the owner’s choice, 2026-10-26). Rename… in an entry’s right-click menu names it (“dark red”). A project’s file shows “from ", or "from , not found" when its folder is gone; it stays that project's file whether or not REDcode has the project open. An entry with edits reads "edited on the Desk"
A material A click on a multilayered material opens its setup in the setup editor. From a Desk entry, Ctrl+S saves it in that entry: a copy at its game path in the entry’s folder. Next time it opens from that copy. Another entry, or the same mesh from Game Assets, still opens the game’s. A project mesh’s setup that the project already holds opens as the project’s file, saved in place as before. Save to Project still works from the editor; from the Desk it also updates the entry’s copy
3D view View in 3D on an entry opens the entry’s own copy of the mesh (a game mesh extracted into the entry’s folder on first use; a project’s copied fresh each time), which reads the entry’s edits, saved or still open in an editor, then the project it came from. The game’s mesh, opened from Game Assets, always shows the game’s look; a project’s mesh shows the project’s files. Live edits follow the same rule. Changed 2026-10-26: at first every mesh using an edited setup showed the Desk’s edit, the game’s too, which the owner’s test found wrong
Add to Project on an entry The new-file icon on an entry’s line (EDGEfab’s Add to Project icon, since 2026-11-10; a + before) (on hover, and in its right-click menu): that entry goes into a project, after a confirm dialog (Add to Project, or Add and Take It Off the Desk). A project REDcode does not have open is opened afterwards (the owner, 2026-11-13): in this window when it has no folder open (it reloads), else a new window; EDGEmat then focuses REDcode’s Project view and shows the message with Pack and Play (it starts in a folder with a .cpmodproj, and waits for REDcode’s REDbridge rather than start a second). Selecting the mesh there waits for REDcode #27. Each setup edited on it is saved as a new setup (_<project> name) with the entry’s mesh copied in and pointed at it, as Save to Project’s “As a new setup” does (no other mod needed). A setup entry alone goes in at its own path (over the game’s: needs Material Texture Override). A mesh with no edits is copied in as it is; one already in the project is kept. When the project’s own copy of the mesh no longer uses a setup edited on the entry (it wears a new material, say), a question comes first: Replace with the Desk’s (the project’s copy becomes the game’s mesh pointed at the new setup) or Keep the Project’s (the entry stays on the Desk with its edits). Adding twice updates the same files. Setups with unsaved edits are named first. The conflict question was added 2026-10-26, after the owner’s test wrote nothing into such a project and said only “0 files written”
+ in the title bar The whole Desk, as above. In the game one mesh path wears one setup per material, so a file on the Desk more than once asks first which variation goes in, or to skip it (the owner’s choice, 2026-10-26); the others stay on the Desk. Two different meshes that edited one setup differently get setups of their own (_<project>_2). Add and Clear the Desk takes off only what went in
Remove, clear An × on each entry (Remove) removes it with its edits (after a confirm when it has any); Clear the Desk empties it, edits included. Nothing in projects or the game changes
Storage %LOCALAPPDATA%\EDGEmat\desk\: desk.json lists the entries (id, file, project, variation, name); items\<id>\source\archive\ holds each entry’s edited setups and its mesh copy at their game paths. Project-shaped on purpose: the code that reads a project’s copies reads an entry’s the same way. Not in the library cache, so a rebuild keeps it. A Desk from 2026-10-25 (one shared source\archive) is moved over on first start: each entry gets an id and a copy of every edit, so nothing is lost
Assistant mat_desk (list with ids, add, remove, rename, clear, to_project with ids, replace and clear; it lists variations and conflicts and writes nothing until the modder chooses) and mat_edit with save: "desk" and desk_id. The Desk view follows desk.json, so an assistant’s changes show at once

Not yet: adding a look to a mesh on the Desk (M4’s Looks editor), non-multilayered materials (M6), two variations of one mesh in the game at once (a new item: EDGEfab), and REDcode’s Game Assets marking file kinds (REDcode #15), so until then Open in EDGEmat shows on every non-texture game file there and says what it takes.

The EDGE Library (proposed)

Not built, and in no phase yet. The EDGE Library is the one folder every EDGE tool shares, the modder’s long-term store (shared rules, in EDGEbuilder’s docs). The rules list EDGEmat among the tools that put assets there, and say a tool whose work belongs there offers a Library view. EDGEmat #8, from REDcode, pointed out the clash with EDGEmat’s own Library view, so on 2026-11-06 the owner agreed the names below.

Name What it holds Lasts
Game Materials What is in the modder’s game, read-only, rebuilt from it, cached in %LOCALAPPDATA%\EDGEmat Until the next game update
Desk EDGEmat’s work in hand Across restarts, not kept for good
Library The modder’s own materials, in folders they choose, shared with every EDGE tool Long term
Part Proposal
View A Library view showing EDGEmat’s kinds from the shared root. The order becomes Desk, Library, Game Materials, Find, which follows work in hand into the store and leaves the game’s list below it
Items Assets as the rules shape them: <name>.mlsetup.asset and <name>.mi.asset, each with asset.json, source/archive and source/raw
Add to Library On a Desk entry, with the folder picker and Use the game path the rules ask for. A Desk entry is already a project-shaped folder, so it is close to a copy
Add to Project From the Library, writing the project’s came-from note, source/library.json, as every tool does
No Library Never forced: without a root, EDGEmat works as it does now. The first Add to Library offers Documents\EDGE Library
Assistant An MCP twin, its name open. mat_library keeps meaning Game Materials

Open: which kind a generated material is (mi, with its textures, is likely); whether a setup is useful without its mesh, or a mesh on the Desk goes in as a mesh asset; and whether the buttons that fit Game Materials loosely (Open Setup, New Material, Connect an Assistant) move to the Desk’s title bar when this view arrives.

The game folder and the bridge

A modder with REDcode set up configures nothing in EDGEmat. EDGEmat finds the game folder in this order, and takes a folder only when it holds bin\x64\Cyberpunk2077.exe (REDcode’s own test):

# Source Notes
1 edgemat.gamePath EDGEmat’s own setting, empty by default, meaning “use the next source”. It exists because VS Code lets an extension write only settings that an installed extension declares, so EDGEmat cannot save redcode.gamePath when REDcode is absent
2 REDcode’s API, gamePath() REDcodeApi version 1 from extensions.getExtension("edgemodders.redcode-cyberpunk") (REDcode 0.9.0, REDcode’s API doc). It returns undefined when REDcode’s folder is not the game. It carries REDcode’s game discovery and its Set Game Folder choice. REDcode stays optional: EDGEmat does not list it in extensionDependencies
3 redcode.gamePath Read with getConfiguration("redcode"), for when REDcode is not active. Its default is the standard Steam folder, which on most machines is not the game until REDcode’s first run fixes it; hence the check. EDGEmat watches this setting to follow a later Set Game Folder (the API has no change event for the game folder)
4 EDGEdeck’s API, gamePath() extensions.getExtension("edgemodders.edgedeck").exports, API version 1, only when EDGEdeck is already running (REDcode does the same, to avoid racing a window reload)
5 EDGEmat’s own discovery Steam libraries, GOG, Epic, then default folders, as REDcode’s gameFinder.ts does. That file has no VS Code imports; copy it or share it, the same choice as the bridge client (open questions)
6 Ask A folder picker, saved to edgemat.gamePath

The bridge. When REDcode is active, EDGEmat uses REDcode’s running bridge (bridge()), so the machine runs one REDbridge with one archive index instead of two, provided its bridge.info version has the methods EDGEmat needs. Otherwise EDGEmat starts its own, found the same way as the game: edgemat.bridgePath, then redcode.bridgePath, then a copy bundled with EDGEmat or on PATH; edgemat.dotnetRoot, then redcode.dotnetRoot. M1 checks that sharing one bridge holds up while the library builds. The MCP server runs outside VS Code and always starts its own bridge, reading the same settings from the user’s settings.json, as redcode-mcp does, after its own --game and --bridge arguments and environment variables.

The project. REDcode’s project() and onDidChangeProject give the open WolvenKit project and its folders, the default target for Save to Project.

Open any file, then save it into a project

A modder has a setup somewhere on their computer: downloaded from a mod page, inside someone’s mod, or left from an old project. They want to look at it, perhaps change it, and use it in their own project. Supported in the UI and through MCP:

Step Behavior
Open Open File takes a file anywhere on disk, not only in the open folder: a binary .mlsetup, WolvenKit JSON (.mlsetup.json), or a mod’s .archive, from which the modder picks a setup (REDbridge archive.openMod, archive.extractFromMod)
Inspect The setup editor shows it like any other setup: layers in plain words, swatches, masks. The original file is never written. Masks and the model need the mesh that uses the setup: EDGEmat takes it from the same mod archive, from the game file at the same game path, or lets the modder pick one. Without a mesh the layers still show, without a model
Edit Allowed. Edits stay in the editor, unsaved, until the modder saves them into a project
Save to Project An editor title button, in the style of REDcode’s “Save JSON to Project”. It asks for the project (the open WolvenKit project, a recent one, or a .cpmodproj to browse to) and writes the binary to source\archive\<game path>. The game path is suggested from the file’s own path when it holds one (...\source\archive\base\..., or the entry in a mod archive), else from a game file with the same name, else the modder types it. If a file is already there, EDGEmat asks before replacing it
Assistant mat_describe takes a file on disk or a setup inside a mod archive; mat_edit writes the result into a project the same way. Built 2026-10-17: mat_describe takes a game path or a file on disk; a setup inside a mod archive is not yet supported there (the UI’s Open Setup handles it)

Preview: REDcode shows meshes, EDGEmat renders materials

The goal for a modder: preview meshes with their appearances and materials in REDcode or EDGEmat, author a new material in EDGEmat, and see it on the mesh. Agreed with the owner on 2026-10-15: one viewer, two jobs, loosely coupled. Neither extension requires the other.

Job Owner Why
Viewing a mesh, its submeshes and LODs REDcode Its viewer (three.js, webview/meshViewer.ts, done in REDcode 0.7.0) already does this. EDGEmat does not build a second one
Viewing and switching a mesh’s appearances REDcode Viewing: pick an appearance and see it. An appearance is mesh data: the material each render chunk uses
Turning a material into something renderable EDGEmat Layered materials need what EDGEmat knows: setup, masks, templates, microblends, the level math (spec sections 3 to 5). Later .mi and .mt
Authoring materials EDGEmat Its purpose
Authoring a mesh’s appearances: its looks, which material each submesh uses, new looks and variants. “Save as new look” in a recolor is one case EDGEmat Revised with the owner on 2026-10-16: an appearance is a set of materials, so its editor belongs beside the material editor. EDGEmat’s Looks editor (Custom assets)
An item’s or entity’s appearances (.app, .ent), and generic editing of any file REDcode, then EDGEfab REDcode’s CR2W editor edits any file raw. Guided item appearances for new assets belong to EDGEfab (Custom assets)

How they connect. EDGEmat exports an API (apiVersion 1, src/api.ts) with renderMaterials(mesh, appearance). A first version shipped 2026-10-19 (M2): colors only, from what M2 already makes, so modders see a garment’s colors in 3D long before the bake; REDcode’s side was already in place (REDcode 0.10.0). The full contract:: per material name, baked PBR maps (color, normal, roughness, metalness) as PNG bytes, marked approximate until M5 checks them against the game, and an event when a material changes. REDcode’s viewer asks for them when EDGEmat is active and keeps flat colors otherwise, the way REDcode reads EDGEdeck’s API. Baking to plain maps keeps the contract small and serves three more uses: mat_render, glTF exports with real textures, and library thumbnails. Requested as REDcode #6 on 2026-10-15, with appearance switching, and with REDcode’s planned layered material preview (C6) handed to EDGEmat.

From the viewer to EDGEmat (owner, 2026-10-22): REDcode’s 3D view gets an Open in EDGEmat button, the way its audio player has Open in EDGEwave. It runs EDGEmat’s command edgemat.openMesh with { mesh, appearance }: mesh as the viewer names it to renderMaterials (its game path, or the file on disk), appearance the look on screen. EDGEmat shows the mesh in Find with that look open; a project file reads the project’s copies. Changed 2026-10-25: the mesh goes on the Desk instead, with the same arguments. From M4 the same command opens the Looks editor instead, so the button does not change. Built in EDGEmat 2026-10-23; the button is a REDcode request. onDidChangeMaterials fires after each save that changes a material, so the viewer draws again.

REDcode’s sector view (EDGEmat #17, built 2026-11-21): REDcode draws a picked thing in a sector with its real material, through EDGEmat’s API or, without EDGEmat, through @edgemodders/edgemat-core. Its M2 (owner, 2026-11-21): pick a mesh, Open in EDGEmat puts it on the Desk, change a part’s material there, the sector redraws it in place. Two pieces from EDGEmat. (1) The Desk’s version: a change to one Desk entry fires onDidChangeMaterials with mesh set to the entry’s copy of its mesh (a .mesh file in the entry’s folder, its path ending in the game path), and edgemat.openMesh answers { desk, mesh } with the same file; renderMaterials on that file draws the entry’s edits, on the game path the game’s look. Other changes still fire without a mesh, so every view redraws. (2) Without the library: openSetup reads only the templates a setup’s layers use, from the game (templatesFrom, once per process), so the core alone draws a layered material as the library does; before, a world material came out a flat grey. Since 2026-11-25 the part commands (a game surface or a game material, and Back to the Game’s Material) work on a game mesh on the Desk too, in the entry’s copy of the mesh, and fire the same event; a surface’s files go in <mesh folder>\edgemat\<mesh name>, and Add to Project carries the changed mesh and them.

EDGEmat’s own editor embeds the same viewer for live preview while editing. Later: factor the viewer out of REDcode into a shared component (an npm package) that REDcode, EDGEmat and other EDGE tools embed; until then EDGEmat uses REDcode’s bundled viewer or a copy (both MIT).

Toward the game’s look (M5 plan, agreed 2026-12-02)

The owner, 2026-12-02: an accurate view of a material is key, so a modder sees a change without a round trip into the game. The game’s layered shader does two jobs, and they are not equally within reach:

Job What the game does How close EDGEmat gets
The material Per pixel, up to 20 layers: each layer’s surface tiled, under its preset, cut by its mask and microblend, giving color, roughness, metal and bumps Close. The bake already does this from what the game shows (behavior spec, section 5). It is deterministic and checked against in-game pictures
The light The game’s renderer: its light model, exposure and tone mapping, global illumination, ray tracing, skin’s subsurface scattering Approximate. REDcode’s three.js view has standard PBR light with an environment. Similar, never the same

Rebuilt, never copied. The game’s shaders ship compiled in its archives and their source is not public. EDGEmat does not decompile or port them, for the same reason it never copies MlsetupBuilder: everything comes from what the game shows.

Step What Who Done when
1. Calibrate A reference set: the same items pictured in the inventory preview (a fixed light) and in photo mode under set light, and in REDcode’s view. Settles preset colors (sRGB or linear, open questions), exposure (the near-white garments at Light 2.5×, EDGEweb’s pictures of 2026-12-01) and each template group’s look EDGEmat; in-game pictures by the owner or EDGEweb Each pair reads the same in color and brightness
2. The live shader The bake’s math as GLSL: layer surfaces, masks and microblends in array textures, presets and tiles as uniforms. Full texture resolution, and a slider drag redraws without a bake EDGEmat writes and checks the shader (a flat UV square, shader beside bake); REDcode’s view runs it (REDcode #43) The shader matches the bake at the bake’s size; the Arasaka jacket redraws while a layer’s tile and color are dragged, and fine grain stays sharp up close
3. The light Tone mapping, exposure and environment matched to step 1’s pictures, perhaps a “Game light” preset in REDcode’s view. Also a glow’s spread: REDcode’s view has no bloom, so a glow is brighter but flat, with no light round it (the owner, 2026-12-04, the sneakers’ amber strip); the game’s bloom at each strength is in “How glow works in the game” REDcode, asked with measured numbers after step 1 Step 1’s pairs still read the same with the shader on
4. Special materials Glass and glow first (REDcode #42, built on REDcode’s main 2026-12-01), then car paint’s clear coat, skin, hair, eyes and decals, in order of use EDGEmat sends; REDcode draws Each checked against an in-game picture

The bake stays. glTF exports, thumbnails, mat_render, older REDcodes and a shader that fails to compile all use the baked maps, so EDGEmat sends them beside the shader.

Custom assets: from a model to the game

The ultimate goal (owner, 2026-10-16): modders create and modify custom assets, such as new clothes and objects, fully textured and with appearances, and see them in the game fast. EDGEmat is at the center of this, because every asset needs materials and looks. It is not the whole of it: the workflow spans several EDGE tools, and this section says who does what. These are goals and recommendations for planning, not yet phases with tests, except where the phase table says so.

The four goals

# Goal Owner Notes
1 Import a textured model from Blender or an AI model service such as Tripo REDbridge (geometry, images), EDGEmat (materials, looks) glTF and GLB first: Blender exports them natively, Tripo and most AI services offer GLB, and WolvenKit’s importer, which REDbridge’s project.import runs, reads glTF. FBX and OBJ through Blender (EDGE can call an installed Blender in the background to convert) or asked for as GLB. Geometry becomes a .mesh; the model’s images become .xbm (both exist in REDbridge 0.7.0). Unverified: WolvenKit’s importer appears to import over an existing .mesh (“keeps the replaced file’s settings”), so a new asset may start from a template mesh; to check with REDbridge
2 View the model with its in-game appearances REDcode’s viewer Before import, a GLB shows its own textures: three.js loads them already, REDcode’s viewer currently paints flat colors instead. After import, the viewer switches appearances and gets materials from EDGEmat (REDcode #6). Authoring the appearances is EDGEmat’s Looks editor (the table above)
3 The whole asset workflow, from a model to a working item or object Several tools, guided by EDGEfab Below
4 Hot-load updated archives into the running game REDnode (game side), REDcode (pack), EDGEdeck (deploy) Below

What EDGEmat adds for this

Feature What it does Phase
Materials from a textured model Turns a model’s PBR textures (base color, normal, metallic-roughness, emissive) into the game’s material for plain textured assets: a .mi on engine\materials\metal_base.remt (the usual choice for custom assets, unverified for all cases), with the images imported as .xbm. Handles the format gaps: glTF packs roughness and metalness in one image; normal-map conventions may differ (unverified). Built 2026-11-04 for EDGEfab (#4, with glow from #6): core materialsFromModel (fromModel.ts), MCP mat_from_model, the API’s materialsFromModel. metal_base takes every map glTF has: the packed map is split (green Roughness, blue Metalness), a flat channel becomes a value, the color factor is BaseColorScale; glow is Emissive (the map, or the game’s white.xbm for a whole part), EmissiveColor and EmissiveEV = 1 + log2(strength), never below 1 (“How glow works in the game”). Left out and said: ambient occlusion, transparency, texture transforms, a second UV set M4
Generate a material A new material from words (“brown leather”) through an AI image service the modder chose, or from a photo. Below M4
Game materials on a new mesh A surface and color, or a game .mi, picked from the game and put on a new mesh. Below M4
Looks editor A mesh’s appearances: list them, see each on the model, pick the material for each submesh, add a look, duplicate a look as a variant. Writes the mesh’s appearances and materialEntries M4 (recolor’s “save as new look” in M3)
Layered materials for new assets A multilayered material with several layers on a custom model needs masks painted for its UVs: mask painting (a later feature in the behavior spec) becomes how a modder makes one M6

For EDGEfab (owner, 2026-10-19): EDGEfab makes clothes and objects, and gets their materials from EDGEmat in one of two ways: a new material made by Generate (EDGEmat calls the image service), or an existing game material picked and applied. It calls EDGEmat’s API from its extension, and an assistant calls EDGEmat’s MCP tools (mat_generate, mat_find, mat_colors, mat_apply). Fitting clothes to the body is EDGEfab’s and Blender’s (EDGEfab design, “Clothing”).

How glow works in the game

Measured on game 2.5 on 2026-11-05 with the glow check (docs/testing.md), on metal_base, wearing the cowboy hat with a cyan glow. These are what EDGEmat’s glow is built on.

EmissiveEV Map and color In the game
4 Full-white map, full color Washes out to white, with a wide bloom and a tint on nearby clothing. Color only at the edges and in the halo
1 Six map levels, full color Lit, with no wide bloom. All six levels show, full down to an eighth, in a dark room and in daylight. The top levels are pale, the lower ones hold their cyan
1 Six map levels, the color at a quarter Lit and saturated: the top stripes hold full cyan instead of going pale. Two to four levels show; the rest fade into the base. Direct street light can wash the lower ones out
0 Six map levels, full color Dark all over, the full-level stripes too
0 Bands, color at a sixteenth Dark
-2, -4 Bands, full color Dark
What it means Detail
EmissiveEV 0 or below is off There is no separate switch: this value is it, and no map or color brings the glow back. It fits metal_base’s default (EV 0, black color). No material with a color in the game’s survey sits between EV 0 and 1.45. So the survey’s EV 0 materials are probably unlit states, not dim glows (unverified)
The map dims smoothly above it Levels hold in steps, down to an eighth, with hard edges kept. So a glow map’s own brightness carries through
The rule EmissiveEV = 1 + log2(strength), never below 1. Strength 1 is a soft glow for small details, 8 is white-hot. Under strength 1 the color dims instead, which holds the color best: strength 0.25 is a saturated glow. About an eighth of strength 1 is the limit of what shows on a full-white map; materialsFromModel says so below it
Bright is normal Of 98 glowing metal_base materials surveyed, 33 sit at EV 6 or more, and 79 of the 94 maps measured are plain white.xbm. A white middle with a colored rim is how a lamp looks in this game

Unverified: where exactly the glow starts between EV 0 and 1, and the shader’s formula (2^EV - 1 would fit, a guess). Whether EmissiveColor is read as sRGB. How ray tracing changes it. One early run contradicts the table: its archive was meant to be EV 0 and glowed, white with a thin rim, brighter than the confirmed EV 1. It was not read back at the time, so the earlier EV 2 archive was probably still in place.

Generate a material

The goal (owner, 2026-10-19): a modder who is not an artist makes a new material from words, such as “brown leather” or “red concrete”, or from a photo, and puts it on an object.

A textured .mi, not a layer. A layer of a multilayered material has no color texture: it is a surface’s grey detail maps plus one color preset. An image’s colors and patterns cannot go into a layer. So recoloring a game garment stays a surface plus a color, which Game Materials and mat_colors already find with no AI. A generated image becomes a textured .mi on engine\materials\metal_base.remt, the same output as Materials from a textured model.

Step What Where
1. An image From the modder’s words, through an AI image service they chose; or their own photo or image, with no service and no key The service, or a file
2. Seamless Made to tile. Image services do not reliably tile, even when asked EDGEmat, on the PC
3. The other maps Bumps (normal) and shine (roughness) derived from the image; metal as a choice. Plain-words sliders: “bumpier”, “shinier” EDGEmat, on the PC
4. Into the game Resized to a game size (1024 or 2048), imported as .xbm, the .mi written into the project REDbridge
5. Recorded How it was made, beside the material: service, model, prompt, date. Mod sites may ask for AI content to be labelled (Nexus Mods, unverified) EDGEmat

On a garment (agreed with the owner 2026-10-20, from the tiling check). A garment’s material carries its own normal map, which draws its folds and seams at the scale of the whole garment. LayerTile repeats every map, so a repeat above 1 would shrink and repeat the folds too. So on a garment EDGEmat bakes the repeat into the color texture (the seamless image laid out N × N in one 2048 px texture), keeps LayerTile at 1, and keeps the garment’s normal map, with the material’s bumps (repeated the same way) laid over it in one 2048 px normal map by a whiteout blend; Bumps Flat keeps the folds alone (added 2026-11-18, when the first bumps test showed none on the slim-fits). On an object or a new mesh, whose material has no such map, LayerTile is the repeat. Either way the UI calls it Repeat, and the prompt asks for no text or logos, since some islands are mirrored.

The prompt. One general prefix, then the modder’s words. The prefix asks for a seamless tiling texture seen straight on; flat, even light with no shadows, highlights or reflections, since the game lights it; the material filling the frame, with no objects, text, borders or vignette; and a real-world scale. It should work for every surface (unverified). A detail size (fine, medium, coarse) sets the scale. Kinds of output are added only if tests show the need; the likely one is a decal or emblem: one design on a plain background, not tiled. The whole prompt stays editable, one click away.

Services. Opt-in, with the modder’s own key and credits.

Service Models
Google Gemini Nano Banana and Nano Banana Pro
OpenAI GPT Image, current version checked when built

Model names come from the service’s own model list where it has one, as EDGEwave does, not hard-coded. Exact model IDs are unverified until built.

Checked 2026-10-20 (the services’ docs, and price pages that cite them; prices unverified against the official pages):

Service Models named in the docs Call EDGEmat makes About per image
Google Gemini gemini-nano-banana-2.1 (recommended), gemini-3.1-flash-image (Nano Banana 2), gemini-3.1-flash-lite-image, gemini-3-pro-image (Nano Banana Pro), gemini-2.5-flash-image (legacy) models/{model}:generateContent with image output, 1:1, 2K where the model takes a size. The docs now show a newer Interactions endpoint; generateContent is still current $0.04 (Nano Banana) to $0.13 (Pro, 2K)
OpenAI gpt-image-2.5-flare (everyday), gpt-image-2.5-sunburst (edits); gpt-image-1.5 and gpt-image-1-mini retire 2026-12-01 v1/images/generations, 1024 × 1024 PNG. GPT Image may need the organization verified first $0.005 (low) to $0.21 (high)

The list of models comes from the key’s own account (Gemini’s models list, the image models; OpenAI’s models list, gpt-image-*), so new models show without an update. Google marks every image with SynthID; the record beside the material says which service and model made it. Gaps in EDGEwave’s version, fixed here: a time limit and Cancel on every call, the chosen model remembered, a failed model list said in words, and no call before the modder asks for one (Generate, or a press on the model list’s refresh).

The UI follows EDGEwave’s voice tools (owner, 2026-10-19), with one change for images:

EDGEwave EDGEmat
A dialog over the page: prompt, options, Generate The same, on a New Material page, opened from the Game Materials title bar and later from the Looks editor
Each press adds a take, newest first, each with Add The same, as image tiles. A selected take shows tiled 3 × 3, so seams show before Add
The key from REDcode’s shared key store, asked for the first time it is needed; Set and Clear key commands The same, one key per service (gemini, openai, tripo), from REDcode’s Keys (REDcode #33, REDbridge 0.18.0’s keys.*) since EDGEmat #18 (K4d, built 2026-11-22): api.keys.get(service, "EDGEmat"), else api.keys.ask, and onDidChange; Set opens REDcode’s box, Clear points to REDcode’s Keys view. With a REDcode that has no keys, VS Code’s secret storage as in 0.3.3 (edgemat.gemini.apiKey, edgemat.openai.apiKey). A key in that storage moves into the store once, through a REDbridge of EDGEmat’s own started with --keys (core keyStore.ts), and EDGEmat’s copy is removed. An environment variable (GEMINI_API_KEY, OPENAI_API_KEY, TRIPO_API_KEY) wins. History: from 2026-10-30 to 2026-11-11 the keys were in an earlier shared store (REDnode #23), shelved after the Marketplace refused EDGEhack 0.1.0, most likely for its bundled PowerShell decryption (EDGEmat #10). The store now lives in REDbridge, so no extension bundles a store or decryption
“Spends your credits” in the dialog The same

MCP. mat_from_image makes a material from an image file. mat_generate asks a service. The MCP server reads each key at each call: the service’s environment variable (GEMINI_API_KEY, OPENAI_API_KEY, and TRIPO_API_KEY for mat_reshape) when it is set, else REDcode’s Keys through a REDbridge of its own started with --keys and no game (keys.get, tool EDGEmat MCP; EDGEmat #18). So a key set or removed in REDcode’s Keys counts at once, VS Code’s MCP registration and Connect an Assistant put no key in the server’s environment or a client’s settings file, and a plugin such as EDGEchat or REDnode’s in-game copy (E1) may still pass one. With a REDcode that has no Keys, VS Code’s registration and Connect pass the keys in EDGEmat’s secret storage, as in 0.3.3. Wardrobe Designer and the check scripts read the environment only (Wardrobe through REDnode’s secrets.askShared).

Compose a material: a planner chooses or makes the layers (proposed)

Proposed 2026-10-29 with the owner. A modder or a player describes a whole material in words, such as “a shiny but scratched aluminium surface” or “a dull blue cotton cloth”. An AI planner turns the words into a multilayered setup: it chooses game surfaces, colors and microblends, and makes a new texture only when the game has nothing that fits.

Game surfaces first. They look right under the game’s lighting, which a generated image rarely does. Both examples need no image service (checked in the library on 2026-10-29):

Words Layers
“A shiny but scratched aluminium surface” 1. aluminium polished 01 300 over the whole material. 2. aluminium rough 01 300, showing only through a scratch microblend (the game has 8, such as scratches_random_01)
“A dull blue cotton cloth” 1. cotton twill clean 01 30 (750 colors): the closest blue, a rough finish

Wear without painted masks. A layer shows where its mask plus its microblend’s value is over 1 (behavior spec, section 5, measured on the slim-fits). So a scratch, wear or dirt layer can take one flat value for its whole mask and let the microblend place it. That works on any mesh, with no mask painted for its UVs. Unverified in the game on a new setup.

Making what the game lacks:

Need How
A print or pattern (polka dots, camo, a logo) First a generated textured material over the whole material, as mat_generate and mat_apply make today: the pattern is in the image, so no mask is needed (owner, 2026-10-30), and the garment keeps its folds. Later, for the game’s look, a pattern as a new layer’s mask, so it sits on the garment’s own surface (see Wardrobe Designer, step 6)
A grain no surface has (an unusual weave) A new surface from a generated image’s bumps and shine: a custom .mltemplate (M6)

The pieces:

Piece What it does
mat_compose (name not settled) Takes a recipe: layers, each with a surface, a color in words, finish, tiling, microblend and coverage (“all”, “light wear”, “scratches”). Writes a new .mlsetup and .mlmask, puts them on mesh materials, and returns the description and color map. Checked as mat_edit is
The planner An assistant reads the words, searches mat_templates, mat_microblends and mat_colors, writes the recipe, and calls mat_generate when nothing fits
Its brief In EDGEmat’s MCP server instructions (it has none yet) and the tools’ descriptions, as EDGEchat’s rule says (EDGEchat design, “Where knowledge lives”, 2026-10-23): search game surfaces first; wear is a flat mask and a microblend; generate only when nothing fits; preview before saving. Worked recipes go in a guide page that EDGEchat copies into a skill at build, and REDagent can copy too
In the UI A Describe a material box on the New Material page. EDGEmat makes one Claude call with the user’s own key (in VS Code’s secret storage, as the image keys are) and only when pressed, sending the brief, the matching surfaces and microblends, and the words. The recipe opens as layers in the setup editor, to adjust before saving

Who plans: EDGEchat (Claude Code) outside the game; REDagent in the game, with EDGEmat’s tools since REDnode 0.45.0 (E1); the Describe box for modders without either.

Checks first: a new .mlmask written through REDbridge from images, and a new setup on a new mesh shown in the game. Phase: M4, beside game materials on a new mesh; custom surfaces stay M6.

Game materials on a new mesh

EDGEfab’s other route: pick a material from the game and put it on a new mesh.

Kind On a new mesh
A textured game .mi that tiles (many world materials) Used as the mesh’s external material. Textures painted for one mesh’s UVs, as most garments’ are, do not fit another mesh
A layered surface (leather, denim, chrome) A one-layer setup: one surface, a color preset and tiling. Layer 0 covers the whole part and reads no mask, so the .mi names any game mask. Fits any UVs. Checked in the game 2026-11-17 (EDGEfab’s F1 check: red car paint on a generated vending machine’s body)
Several surfaces on one garment One submesh per part (body, collar, buttons), made in Blender, each with its own one-layer material. Several layers in one material need masks for the new UVs (M6)

Built 2026-11-18 for a prop’s parts (EDGEmat #12, from EDGEfab; EDGEfab 0.1.0 waits on it). Core parts.ts, the UI in partCommands.ts, MCP mat_apply (surface, mi, model), mat_parts, mat_materials, API parts, usePartSurface, usePartMaterial, partBackToModel:

Part action What EDGEmat does
Use a Game Surface… Writes <mesh folder>\materials\<part>.mlsetup (one layer: the surface, its color, tiling) and .mi (on multilayered.mt, naming that setup and a game mask, nothing embedded), then points the part’s entry at the .mi. One pair per part, rewritten on each change. Tiling by default: one repeat a metre of the part (its surface over its UV area, from WolvenKit’s export; SurfaceRepeat; car paint looked the right size on EDGEfab’s vending machine in the game, 2026-11-18). The setup editor then opens it like any setup
Use a Game Material… A game .mi as it is, on the part’s entry. Offered from the game’s materials that suit any shape (materialFit): not layered, not a decal, parallax, terrain or effect shader, and every texture along its chain from base\surfaces, ep1\surfaces or engine\. Read once per game version from all 10,660 of the game’s .mi (9 s on 2026-11-18, the path filter skipping most; 331 suit any shape: 112 glass, a few glows, few tiling world materials) and kept in game-materials.json. Any other .mi by path, after a warning that says why it may not fit
Back to the Model’s Texture The part’s own .mi from EDGEfab’s record (source\raw\<mod>\props\<name>\<name>.edgefab.json)
New Material Here As before (Generate)

The swap lives only on the part’s material entry (agreed with EDGEfab on #12): EDGEfab reads the entry when it adds the prop again and keeps it. EDGEmat writes no other record. The parts show on the Desk (Open in EDGEmat on a project mesh), one row per material entry, the model’s own ones marked.

Game Materials, Find, mat_templates and mat_colors choose the material; mat_apply puts it on the mesh in a look.

The workflow, step by step

Two kinds of asset, with different hard parts: an object (a prop placed in the world) needs no rig; clothing must be skinned to the player’s rig and layer with other garments. Objects come first.

Step What happens Tool
Make or get a model Blender, or an AI model service. EDGE does not build a 3D modeler. An assistant can drive Blender through a Blender MCP server (EDGEfab design) Blender; an AI service, opt-in, as EDGEwave does for voice
Import Geometry to .mesh, images to .xbm REDbridge through REDcode (exists)
Rig and fit (clothing only) Weights for the player’s rig, fitted to the body types; garment layering parameters Blender with the community WolvenKit Blender add-on, which carries the body dummies and refitters; guided by EDGEfab (EDGEfab design, “Clothing”). An “Edit in Blender” round trip is in REDcode
Materials and looks Materials from the model’s textures, generated or picked from the game; recolors, variants EDGEmat
Make it a game thing Object: an entity with the mesh. Clothing: entity and .app appearances, an ArchiveXL factory and .xl, a TweakXL item record (entity name, appearance name, display name, icon), localized text, an inventory icon EDGEfab
Place it (objects) Drop it in the world and bake it into a sector EDGEbuilder, once its index reads mod archives as well as the game’s
Pack, deploy, try Pack the project, deploy it, hot-load it, spawn it or put it on V REDcode, EDGEdeck, REDnode (and REDagent: “give V the new jacket”)

A new EDGE tool for asset assembly: EDGEfab. Agreed with the owner on 2026-10-16; the repo is EDGEfab, scaffolded the same day, with its own design brief. No tool owns “make it a game thing”, and it is the step non-coders find hardest: many small files that must agree with each other. A guided tool, a VS Code extension like EDGEmat with an MCP server, would create new items and objects (and later vehicles or weapons) from a mesh and its looks: the entity, appearances, factory, .xl, TweakXL record, text and icon, checked against each other. It would use EDGEmat for materials and looks, REDcode’s viewer, REDbridge for files, EDGEdeck and REDnode to try the result. Without it, EDGEmat would grow into an item editor, which blurs its purpose.

Hot-loading archives

The game loads .archive files at startup, so today every change means a restart. Options, in order:

Option Notes
RED Hot Tools (a community RED4ext plugin) Reloads archives from a hot folder in a running game. Works (2026-10-20 on the owner’s laptop; REDnode uses it). The official 1.3.0 can end the game when it replaces an archive in a mod folder with names in capitals, such as EDGEmat_M3.archive; the Edgemodders build v1.3.0+edgemodders.1 fixes it (upstream PR psiberx/cp2077-red-hot-tools#20)
An EDGE hot loader Not needed so far: REDnode 0.26.0 and later drive RED Hot Tools with checks and a queue around it (archives.reload, MCP archives_reload), and refuse a swap the official build would get wrong
Refresh what is on screen A reloaded resource shows only when the game loads it again. Since REDnode 0.26.20 a swap re-applies the appearance of the clothing V wears, so a recolored garment should show at once (unverified for material changes). Other objects still need the game to load them again

The flow for a modder: Pack and try in REDcode packs the project, deploys it to the hot folder (EDGEdeck’s deploy, so the mod list stays right), and asks REDnode to reload and refresh. Setups replaced in place also need Material Texture Override (spec section 6), unknown whether that holds for hot loading. This also serves the runtime-materials goal in Later ideas.

Requests this implies

Filed on 2026-10-16, each to its repo as a request:

Repo Request
REDcode #6 updated: show a GLB’s own textures in the viewer; Looks authoring is EDGEmat’s, REDcode views and switches. #7: “Pack and try” (hot load) and “Edit in Blender”
REDbridge #5: mesh import for a new asset (from a GLB, or over a template mesh); what the importer keeps and drops; material names
REDnode #12: hot-load archives (through RED Hot Tools, or REDnode’s own); refresh what uses a reloaded resource
EDGEbuilder #1: index the user’s mod archives, so custom objects can be placed
A new repo EDGEfab, created by the owner and scaffolded on 2026-10-16

Wardrobe Designer: restyle what V wears, in the game (proposed)

Proposed 2026-10-29 by the owner, to come sooner rather than later. A REDnode app for players, not modders. Named Wardrobe Designer by the owner the same day, for now. It lives in this repo and installs on its own as a REDnode app.

The idea. The player opens the inventory screen, with V in view, and the app’s window beside it. They pick a piece of clothing V is wearing, type how it should look (“make it red leather”, “yellow denim”, “yellow with black polka dots”) and press a button. An AI plans the materials, EDGEmat makes them, and the result is packed and swapped into the running game. The player sees the jacket change in the inventory screen.

How it works. Each step reuses something already built:

Step How State on 2026-10-29
1. The window A REDnode overlay app, left on in menus (no hideWith: menu) Checked 2026-10-30 (owner, the W0 build): the window shows over the inventory screen and takes clicks there
2. What V wears The game API: EquipmentSystem.GetData(V), then GetItemInEquipSlot for each clothing area (head, face, outer and inner torso, legs, feet, outfit). The game gives each item’s TweakDB id as a hash (0x + the name’s length + its CRC32), which maps back to the item id and in-game name in EDGEmat’s item index. V’s body from GetResolvedGenderName Checked 2026-10-30 in the game: four worn items read and all four found in the index (V’s Pants, V’s Sneakers, the netrunning suit, the chest holster); GetResolvedGenderName and UIGenderHelper.GetIconGender both say Female on the owner’s V. Unverified: a V whose body and voice differ
3. Its look on V EDGEmat’s core: the item to its appearance, meshes and mesh look for V’s body, then each setup’s layers in plain words Built: mat_find, the worn-items index, describeSetup. Checked 2026-10-30 outside the game: EDGEmat’s core over bridgeOver (core kernelBridge.ts, a BridgeClient whose calls go to another REDbridge, as REDnode’s kernel.bridge() gives it) read V’s Pants, feminine look: 12 shown layers, 9 bridge calls, 7.4 s with the item index cached. Checked in the game the same day (owner, the W0 build): the same over REDnode’s own REDbridge, 2.1 s
4. The plan The Compose planner, on the layers V’s item already has (a restyle, not a new setup). agent.ask to REDagent: the player’s words, with the look’s materials in context. REDagent searches surfaces, colors and microblends with EDGEmat’s read tools, which it has in the game since REDnode 0.45.0 (E1) and which run without asking, and answers with a recipe as JSON. A package’s question is read-only by REDnode’s rule, which fits: REDagent plans, the app writes Built in REDnode and REDagent. Checked 2026-10-30 (owner, the W0 build): three recipes as JSON in 3 to 6 s, $0.01 to $0.06 each; REDagent used EDGEmat’s tools in the game (it named real presets of the right color that were not in the context). Recipes mix preset names and color words, as mat_edit’s word form takes them. Unverified: that REDagent gets EDGEmat’s server instructions (the planner’s brief) through E1. Paid from the player’s Anthropic key, within REDagent’s daily limit per package ($0.25 unless the player changes it)
5. The materials The app’s Node mod bundles EDGEmat’s core (MIT) and applies the recipe with mat_edit’s checks: each layer gets a surface and one of its color presets (words pick the closest). Each changed setup is saved beside the game’s (..._wardrobe.mlsetup), with the look’s meshes copied into a work project in the app’s data folder and pointed at it. A second restyle starts from the first Built 2026-10-30 (W1): core restyle.ts (describeLook, applyRecipe, the planner’s brief RestyleBrief), and the MCP tool mat_restyle. Checked outside the game on V’s Pants: a restyle and a second one from the copy, a skipped change said in notes, both bodies’ looks
6. Patterns Polka dots, stripes or camo are not a layer color: a layer is a surface’s grey detail plus one color. Two ways. (a) A generated material (first): Generate makes a seamless texture of the pattern from words, and it replaces the whole material, as mat_generate and mat_apply do today. The pattern is in the image, so no mask is needed (the owner’s point, 2026-10-30), its colors are the image’s own, not presets, and the garment keeps its folds (its own normal map). What it loses: the material’s other layers (other fabrics, metal trim, dirt and wear), so the pattern covers all of that material, and the surface grain is the image’s. (b) A pattern mask (later, the game’s look): the pattern as a new layer’s mask over the garment’s own layers, so the dots sit on the leather with its grain and wear, and only where the words say. Simple patterns (dots, stripes, checks) can be drawn by EDGEmat with no image service. Proposed 2026-10-31 (owner): (a) painted by Tripo on the garment’s own shape instead of tiled from Generate, if the paint check shows Tripo keeps the garment’s UVs (open questions, “Paint a garment by words”). Generate stays for materials of their own. Found 2026-10-31: Tripo keeps the UVs but paints no repeating pattern, from words or a style image; it paints colorways and details per part instead. So patterns stay with (a) Generate or (b) a mask EDGEmat draws, and Tripo is a candidate for whole-garment looks (“all yellow with a black waistband”, “worn and dusty”) (a) Built 2026-10-31 (W2’s first slice, owner’s go): the planner answers a pattern as patterns beside the layer edits (the material, the pattern in words, its repeat and shine; core restyle.ts applyPatterns, the brief says when), the app gets the player’s Gemini key through REDnode’s shared keys (keys:gemini, secrets.askShared: REDnode’s own Key request window asks the first time), Generate makes the texture and makeMaterial puts it on each of the look’s meshes with the garment’s own normal map. A new pattern removes the one it replaces; layer changes to a patterned material take the pattern off (core apply.ts restoreMaterial puts the game’s material entry back), so “red leather” after “polka dots” works. mat_restyle takes patterns too. Checked outside the game on V’s Pants with stand-in images (dots, then tartan over it, then plain red: folds kept each time, each old pattern’s files removed); the in-game test with Gemini is open. A pattern breaks at UV island borders (tiling check). Needs the player’s image key (REDnode #23, K1 built). (b) Needs a new .mlmask written through REDbridge (unverified), and a mask follows the UV layout without repeating (unverified). Shares this work with Compose a material
7. Pack REDbridge’s project.pack, through REDnode’s kernel.bridge(): REDnode’s own REDbridge, so no second one runs. The archive is WardrobeDesigner.archive Built 2026-10-30 (W1); packed outside the game: 2 files, in under 0.1 s
8. Into the game archives.reload: REDswap adds the archive to archive/pc/mod, and REDnode refreshes what V wears and the inventory’s preview of V Built 2026-10-30 (W1; the app asks for the archives permission). Found in the first W1 run: with the inventory open and V’s clothes in the base slots (no Equipment-EX), REDnode refreshes neither V nor the preview, since V’s items read empty_appearance_default then (REDnode #28); the app resets the restyled item on the preview itself until REDnode does. Checked by the owner 2026-10-29: a material change (the EDGEmat_Desk slim-fits recolor) swapped in on the inventory screen shows on the preview at once; game 2.5’s new ways to update the inventory’s puppet make it work better
9. Undo Restore takes the item’s files out of the work project, puts the game’s own meshes, unchanged, in their place, and swaps the archive in again, so the game’s own look shows. The meshes must be there: REDswap clears the game’s cached copies only of the files the new archive holds, so a mesh just left out would keep its restyled look until a restart (REDnode #29). They stay until the next restyle. REDbridge reads only the game’s archives, so those are the originals Built 2026-10-30 (W1)

Limits of a first version:

Limit Why Later
Everyone wearing that look changes, NPCs too The mesh copy replaces the game’s mesh at its own path A new appearance for V only, through ArchiveXL
Colors are the surface’s presets A layer’s color must be one of its surface’s presets A free color needs a custom .mltemplate (M6)
The archive stays after a restart, outside EDGEdeck It is a mod archive, WardrobeDesigner.archive in archive/pc/mod: a restyle stays until Restore Hand it to EDGEdeck as a mod, or keep it in REDnode’s development folders. To agree with EDGEdeck
Needs REDnode 0.45.0, REDbridge, REDagent with its key, and game 2.5 Every step above  

For assistants. EDGEmat’s rule is every feature in the UI and the MCP server. mat_restyle (built 2026-10-30) is the app’s restyle in one call: without a recipe it returns the item’s look, which is what to plan on; with one it applies it into a project, which REDcode packs. Its description carries the planner’s brief, so EDGEchat plans as REDagent does.

Where it lives. A REDnode package in this repo (apps/wardrobe-designer/, started 2026-10-30 with the W0 build), built with EDGEmat’s core bundled. Released on its own (owner, 2026-10-30), as REDnode releases its app packs: its own version, changelog, workflow (release-wardrobe.yml, tags wardrobe-designer-v*) and Nexus page (mod 36636); guide: Wardrobe Designer. It ships as its own download on EDGEmat’s GitHub releases, and later on Nexus Mods, the way EDGEwave ships edgewave-voice. Its manifest asks for bridge, archives and agent, and later the image key once #23 has shipped.

Phases (proposed, see Phases): W0 Checks (done 2026-10-30: the window, what V wears, the core on REDnode’s REDbridge and REDagent’s recipe all passed in the game), W1 Restyle by words (surfaces and colors on the layers V’s item already has; no image service; built and passed in the game 2026-10-30), W2 Patterns (first a generated material over the whole material, from pieces already built: built 2026-10-31, in-game test open; then a pattern mask, after the .mlmask check). W3 Reshape (proposed 2026-10-31, below): pictures changed by words, made 3D by Tripo, fitted by EDGEfab.

Reshape: a garment’s shape changed by words (proposed)

Proposed 2026-10-31 by the owner, for Wardrobe Designer after W2: “make the coat ankle-length”, “add a hood”. Tripo changes no model’s shape from words (open questions, “Paint a garment by words”), so the change is made in pictures first, which the player can refine, and only then made 3D.

The flow Wardrobe Designer exposes (the owner’s reference for the process, 2026-10-31). The player stays in one window over the inventory screen from start to end; some steps are other tools’ work, which the app calls:

Step What the player sees and does in Wardrobe Designer How Provided by State
0. Keys first The first time (and whenever a key it needs is missing), Wardrobe Designer opens a short Keys panel before anything else: one line per key its features use, each with what it is for, where to make it and what it costs, and Ready or Needed. Set on a needed line opens REDnode’s Key request window for that key; the line turns Ready when the player allows it. Continue when the ones the player wants are Ready; a feature whose key is still missing says so when pressed. A Keys button reopens the panel (owner, 2026-11-02: an easy onboarding, the unset keys asked for first) secrets.shared(service) per key for Ready or Needed (it never asks, and answers nothing both when a key is not set and when the app is not allowed yet, so both show Needed); secrets.askShared(service, { reason }) behind Set, one key at a time. The key goes only into REDnode’s window, never through the app. The keys, kept few (owner, 2026-11-02): anthropic (REDagent plans every restyle; REDagent asks for its own), openai (GPT Image, for Patterns and Reshape’s pictures), tripo (Reshape’s models); gemini only when the player switches Patterns to Gemini (Patterns: GPT Image button, kept in the app’s settings.json) REDnode’s shared keys (#23), Wardrobe Designer’s manifest: keys:openai and keys:gemini since 2026-11-02, keys:tripo with Reshape Not built. Tripo as a known service in REDnode’s Keys asked on #23 (2026-11-02)
1. Pictures of the garment Picks what V wears (as in W1) and presses Reshape: the garment appears front, side and back The garment drawn from its own mesh (WolvenKit’s export through REDbridge, as the paint check does) with its current look EDGEmat (its core; renderMaterials draws colors only today) or the overlay itself (a web page can draw a GLB) Checked 2026-11-02 in the reshape check (a drawing of the mesh, four orthographic views, the garment half the square so a change has room); not in the app
2. Change them by words, and refine Types the change (“make it ankle-length”); the three views come back changed. Types again (“longer”, “no buttons”) until happy; Back undoes one round An image service edits the pictures. The four views (front, left, back, right) go as one picture, two by two and come back the same way, so they change together and stay consistent, then are cut apart EDGEmat’s image services (core editImage), the player’s key through REDnode’s shared keys. OpenAI’s GPT Image 2.5 (gpt-image-2.5-sunburst) by default (owner, 2026-11-02); Gemini (Nano Banana Pro) as the other choice Checked 2026-11-02: the views stay in step, and the pictures decide the result: Tripo and the fit follow them faithfully, mistakes included. GPT Image drew “make the brim twice as wide” right from all four sides; Gemini kept the old brim inside the new one, or changed one side only. The prompt says a changed part replaces the old one. A few tens of US cents a round
3. Make it 3D Presses Make it once happy, and sees the cost first; a progress line while Tripo works (about a minute) Tripo’s multiview to model: front plus at least one other view (front, left, back, right) to a textured mesh Tripo, the player’s key (keys:tripo); EDGEmat’s client for now, as the paint check’s: small and simple, and Reshape is a proof of concept. It may move to EDGEfab, whose design has its own, later as a design improvement (owner, 2026-10-31: the tool driving a feature may carry a small piece that belongs elsewhere, weighed case by case; see the progress log’s decisions) Checked 2026-11-02: about 2.5 minutes and 30 credits for the model (1.5 million triangles, facing +X), then Tripo’s retopology to a game’s face count with the texture baked on, 2 minutes and 30 credits. Loose scraps beside the model at times. Tripo has no top view, so it guesses a brim’s outline from above
4. Fit it onto the game’s garment Waits; then a short report in plain words (fitted to both bodies, what was simplified) Below EDGEmat’s core first (owner, 2026-11-02: built here for Wardrobe Designer, without VS Code, and refactored into EDGEfab when EDGEfab resumes; EDGEfab #3) For a garment on one bone, done in the reshape check and passed in the game 2026-11-02 (the cowboy hat); the rest is EDGEfab’s
5. Into the game V wears it, on the inventory’s preview and in the world; Restore puts the game’s back The fitted mesh over the original’s path in the work project, packed and swapped in Wardrobe Designer and REDnode, as W1 Built for materials (W1)

Step 4: what fitting a generated mesh onto a game garment takes. Tripo returns a new mesh: its own vertices, triangles and UVs, normalized to 1 m tall and centred, with no bones and no game data. The game’s garment has a skeleton, weights, garment support, submeshes per material, LODs and one mesh per body. So “keep the bones and physics” is a transfer, not a keep:

Part What it needs Notes
Place Scaled and moved onto the original’s box, as the paint check fitted Tripo’s result Generated proportions will not match exactly: the next rows carry the fit
Weights Each new vertex takes the bone weights of the nearest point on the original garment’s surface (not the body’s), so it follows the bones the original did, including any bones of the garment’s own How the game’s long coats swing (extra “dangle” bones in their rig, or something else) is unverified. If dangle bones: a tail made longer than the original’s bones does not swing past where they end
Out of the body Vertices inside V’s body pushed out, with a small gap, for that body Needs V’s body mesh (EDGEfab’s fab_body). Tight clothes are the hardest: small errors show as skin through cloth
Garment support The layering data that squashes a garment under one worn over it. The game keeps it as vertex data and a GarmentSupport shape key (seen in V’s Pants’ export) Transferred from the original, or made again: which works is unverified. The modding wiki calls garment support on import experimental
Both bodies The masculine and feminine meshes (_pma_, _pwa_): the generated mesh fitted to each, or a refit from one to the other Restyles already change both when the item uses both
Submeshes, materials The game’s materials kept, by default (owner, 2026-11-17: Reshape changes the shape, Restyle the material; core transfer.ts): the game mesh is bent onto the new shape (each vertex pulled to it and the new surface pulling back, the pulls smoothed, so a part made wider stretches the old part with it), then each new triangle takes the submesh and UV island of the nearest game triangle facing its way, and its corners that island’s UVs and vertex colors. Every look keeps its own materials and Restyle works on the result. Game triangles closely covered by another surface (the crown under the band) are left out; small UV islands lying over another surface (the band) and small submeshes (the buckle, its glass) stay the game’s own geometry, bent and lifted 2.5 mm, with the new surface under them tucked 4 mm down: a band one or two of Tripo’s triangles tall came out jagged. Tripo’s paint as a textured material (the paint check’s path) stays as wears: "tripo", one look only Stretch: a part made twice as wide has its texture stretched with it. A part the new shape adds takes the material of the nearest game surface; a part it removes that was kept as the game’s (a band) stays. The garment’s own normal map follows the carried UVs
Size, LODs Tripo’s face limit near the original’s triangle count; the original’s LODs replaced (dropped, or decimated copies)  
Import The GLB imported over the original mesh with its armature (REDbridge’s project.import, WolvenKit’s importer) REDbridge #5; not tried on a garment
Where it runs Wardrobe Designer runs in REDnode, not VS Code: the fitting must be callable outside an extension (a core without VS Code, as EDGEmat’s is bundled into the app, or an MCP server REDnode runs) Asked in EDGEfab #3. If it needs Blender, a player without Blender cannot reshape

Best and worst garments. Stiff or loose pieces first: hats, helmets, glasses, boots, armor plates, which move with one or few bones and sit away from the skin. Tight clothes last.

A reshape check first, as the paint check was for paint: a hat (it moves with the head only): its views, an image service’s edit, Tripo’s model, then the fit by a script, in the game. Passed 2026-11-02 (Reshape check, scripts/reshape-check.mjs): the Cowboy hat with hardened-leather band, “make the brim twice as wide”, in the game with the brim wide, the crown on the head and the badge in front. What the fit for one bone needed:

Part How
Stray pieces Pieces wholly outside the model’s main box, or tiny, dropped
Turn Tripo’s model faces +X; WolvenKit’s export faces −Z (the game’s forward)
Size Per axis, from the outlines the changed views show, by their known scale
Place The top 30% (a hat’s crown) centred on the game’s: the whole outline put it 4 to 6 cm off the head, and V’s head showed through the crown
Bone Every vertex fully on the garment’s one bone (Head)
Import A .glb shaped as WolvenKit’s export (its armature and skin, one part, tangents from the UVs) at the mesh’s raw path, imported over the mesh through REDbridge: the first garment through REDbridge #5’s path
Material Tripo’s color and roughness as a textured material on the look’s material

Not done: the masculine mesh, the other looks’ materials (they still point at the game’s layered materials, on Tripo’s UVs), Tripo’s normal map, garments on several bones (EDGEfab #3).

The material library

MlsetupBuilder ships about 18 MB of JSON built from the game (every .mltemplate with its color presets, a model list, mask and normal lists) and about 500 thumbnails made from game textures. EDGEmat ships none of it: that is data extracted from the game, which the EDGE repos never commit.

Instead EDGEmat builds the library from the modder’s own game through REDbridge on first run (the Game Materials view; “the material library” is the design’s name for it), and keeps it in a local cache. It stays current with game patches and needs no WolvenKit.CLI.

Built in M1 (2026-10-16), measured on the dev PC (game 2.31, REDbridge 0.8.0):

Part What Measured
Surfaces Every .mltemplate: category and group (from its folder), tiling, textures, the six default presets, every color, normal, roughness and metal preset (levels as scale and bias) 386, matching the game’s listing; 155,099 color presets
Microblends Every .xbm in a microblends folder 131, matching the game’s listing. Setups use 144 distinct microblend paths (spec scan), so a few live elsewhere; found in M2
Counts Setups and mask sets in the game, for later phases 17,734 setups, 5,722 mask sets
Thumbnails 96 px PNGs: a surface’s diffuse map with its levels stretched (grey when near-grey, to avoid speckle), or its normal map as relief when the diffuse is flat; a microblend’s alpha mask 343 files; 4 surfaces have none (unused, two flat plastics, one whose texture the game lacks)
Time and size A full build, then a rebuild with the thumbnails cached 22 to 25 s, then 4 s; library.json 11.3 MB
Where %LOCALAPPDATA%\EDGEmat, one cache shared by the extension and the MCP server. A key from the game’s archive list marks it out of date after a game update  

The models that use multilayered materials, and each mask set’s layers, are left to M2, where finding an item’s materials needs them.

The MCP server

The tools are about intent (“find this jacket’s materials”, “the nearest red”), not file plumbing. Proposed names, settled in M2:

Tool Does
mat_find Finds the materials for an item, appearance, mesh or path: each .mlsetup with the submeshes and appearances that use it. For a mesh, each appearance’s worn_by: the game’s items that wear it, with the CET command that gives V one (2026-10-26)
mat_describe A setup’s layers in plain words and in raw values: template, color name and RGB, how much of the surface each layer covers. The setup can be a game file, a project file, a file anywhere on disk, or one inside a mod’s .archive
mat_templates Searches the library: “leather”, “worn chrome”
mat_colors A template’s color presets with RGB, and the nearest preset to a color given as a word or a value
mat_edit Changes layers (template, color, tiling, levels, microblend) and writes the result into the project, copying the setup first from wherever it came from (the game, a file on disk, a mod archive) when needed. Returns what changed, so it can be undone
mat_render Renders the preview to a PNG, so the assistant can look at its own work before saying it is done
mat_from_image Makes a textured material from an image file: seamless, bump and shine maps, written into the project (M4)
mat_generate The same from words, through an AI image service, with the key from the environment (M4, Generate a material)
mat_apply Puts a material on a mesh’s submeshes in a look, adding the look if asked (M4)
mat_desk The Desk: list (with ids), add a mesh or setup, remove, rename, clear, and put entries in a project. Built 2026-10-25, entries and variations 2026-10-26

“Make this jacket red” is then: mat_find, mat_describe to pick the layers that make up the fabric, mat_colors for the nearest red in each, mat_edit, mat_render, and the user sees it. Packing and installing stay with REDcode’s and EDGEdeck’s tools.

Prior art, and how EDGEmat uses it

Project License What EDGEmat takes
MlsetupBuilder by Neurolinked GPL-3.0 The behaviors a multilayered material editor needs, learned by studying it. No code, no data
WolvenKit GPL-3.0 The file formats and their JSON form, through REDbridge only
The Cyberpunk 2077 modding wiki   How the material system works. Findings that are new go back to it
EDGEwave MIT Its AI generation idiom (a dialog of takes, the key in secret storage), followed by Generate a material

Spec, then build. EDGEmat is not a port of MlsetupBuilder and must not read like one.

Step Who Rule
1. Spec One session studies MlsetupBuilder (code, UI, videos) and the game files Writes docs/design/behavior.md in its own words: features, file fields, workflows, edge cases. No code, no copied text, no copied data
2. Check A session on the dev PC, through REDbridge, without opening MlsetupBuilder’s source Every claim in the spec is checked against real game files and corrected where wrong. MlsetupBuilder is a reference, not the authority. Questions about what MlsetupBuilder does go back to the spec session
3. Build Other sessions, from the spec Never open MlsetupBuilder’s source. Questions go back to step 1
GPL logic worth reusing REDbridge If a piece of MlsetupBuilder’s logic is worth reusing as code, it goes into REDbridge (GPL-3.0) with attribution, never into EDGEmat

Neurolinked is contacted before EDGEmat is announced: credited, told what it is, and offered collaboration. Done 2026-10-16: the owner sent a Discord DM (what EDGEmat is, no code or data from MlsetupBuilder, credit, an offer to collaborate, and the M0 findings that may help MlsetupBuilder). Any reply, and credit wording they ask for, is recorded here.

Phases

Phases are M0 to M7. Unverified: that no other EDGE repo uses M. Each ends with a test on the dev PC.

Revised 2026-10-19 with the owner: M4 Make (materials for new meshes) moved ahead of the preview, so EDGEfab’s objects (its F1) and clothing (its F3) get materials sooner. A textured .mi needs no layered bake to be seen: REDcode’s viewer shows a GLB’s own textures already (unverified for an imported .mi). The preview became M5, Beyond mlsetup M6, Ship M7.

Revised again 2026-10-19 with the owner: no release at the end of M2. The first public preview is 0.3.0, at the end of M3, so it edits with a full round trip into the game, and it takes Generate’s first slice from M4, so it can say it has AI generation. A generated material replaces a whole material, so on a game garment it covers every part that material paints; the preview shows it on objects and simple parts, and does not pitch it as AI recoloring. That is the long-term goal (Later ideas).

Phase Builds The test proves
M0 Spec The behavior spec (steps 1 and 2 above). The file table above checked. The bridge methods EDGEmat needs, filed with REDbridge. Neurolinked contacted The spec is agreed with the user, and every field in it is seen in a real file
M1 Library The extension and MCP skeletons, the EDGEmat activity bar container, the bridge client, the material library built from the game and cached, the library view with thumbnails A full library builds from the game; its counts match the game’s
M2 Read The surface page. The .mlsetup editor, read-only: layers in plain words, swatches, each layer’s mask. Finding an item’s materials. Open File for a setup anywhere on disk, as JSON or inside a mod archive. MCP mat_find, mat_describe, mat_templates, mat_colors A game jacket shows the same layers WolvenKit shows, and Claude describes it correctly. A setup from a mod archive outside any project opens and reads the same
M3 Edit, released as the 0.3.0 preview Change template, color, tiling, levels, microblend; undo and redo; save into a project (REDcode’s or WolvenKit’s, the same layout), including Save to Project for a file opened from anywhere; a new setup at a new path with a mesh copy pointed at it (the no-MTO route); “save as new look” if time allows. MCP mat_edit. Generate’s first slice, from M4: the New Material page (words through Nano Banana, Nano Banana Pro or GPT Image with the modder’s key, or their own photo), takes shown tiled, made seamless, bumps and shine derived, the .xbm and a textured .mi written into the project, and put on one material of a mesh found in Find. MCP mat_generate, mat_from_image and a minimal mat_apply. First, the two checks in Open questions: a new .xbm from a PNG, and a hand-made textured .mi on a garment part in the game A jacket recolored in EDGEmat, and another recolored by asking Claude, each saved into a REDcode project, packed and deployed by REDcode, show correctly in the game. A setup opened from outside the project, saved into it and packed, loads in the game. A material generated from words goes on part of a garment or an object and shows in the game, through the UI and by asking Claude
W0 to W2 Wardrobe Designer (proposed 2026-10-29, owner: sooner rather than later; where it goes in the order is open) Wardrobe Designer, a REDnode app for players. W0 Checks (done 2026-10-30): the window over the inventory screen; V’s worn items and body; EDGEmat’s core in a REDnode Node mod with REDnode’s REDbridge; REDagent answers a recipe. (A recolor swapped in shows on the inventory’s preview: passed, owner, 2026-10-29.) W1 Restyle by words (passed in the game 2026-10-30): surfaces and colors on the item’s own layers, packed and swapped in, with Restore; mat_restyle for assistants. W2 Patterns: first a generated material over the whole material, then a pattern as a layer mask A player wearing the Comfy rocker slim-fits types “red leather” in the inventory screen and sees them change there, with no restart and no modding tool open; Restore puts them back
M4 Make Materials for new meshes, what EDGEfab needs (Custom assets): materials from a textured model (glTF PBR textures to .xbm and a .mi); the rest of Generate a material (its first slice is in M3: what M4 adds is prompt presets if tests show the need, the decal kind, and Generate from the Looks editor); game materials on a new mesh; the Looks editor for a mesh’s appearances. EDGEmat’s API for EDGEfab. MCP mat_from_image, mat_generate, mat_apply. First, an in-game test of a tiled texture on a garment (open questions) A GLB model from Blender gets a generated material and a game material, in two looks, and shows in the game, once through the UI and once by asking Claude. A non-artist makes “brown leather” from words alone
M5 Preview The bake: a layered material to PBR maps, with layers blended through their masks, templates and microblends, updated live. EDGEmat’s API renderMaterials for REDcode’s viewer (REDcode #6); the same viewer in EDGEmat’s editor. MCP mat_render. Started 2026-11-16, ahead of M4’s end (owner): Reshape’s pictures need the game’s colors (Tripo paints what they show), and REDcode’s and EDGEmat’s previews need a more faithful renderer anyway. Color first (each layer’s surface texture under its preset, in linear, by its mask and microblend), then roughness, metal and normals (all three built by 2026-12-01). Then the plan of 2026-12-02 (Toward the game’s look): calibrate against in-game pictures, a live shader, the light, special materials Side by side with an in-game screenshot, the preview reads the same, in REDcode’s viewer and in EDGEmat’s
M6 Beyond mlsetup .mi parameters on game items; custom colors (a custom .mltemplate); layered materials with several layers on a new mesh (masks for its UVs). See Custom assets A non-multilayered game item retextured, a free color used, and a new mesh with a two-layer material, all shown in the game
M7 Ship Open VSX and Marketplace (done early, with 0.3.0 on 2026-10-20), the MCP package (done early, with 0.3.1), docs, a Nexus page, the EDGEkit bundle entry A non-coder recolors an item from the docs alone, in the UI and by asking an assistant. The packaged VSIX, installed with code --install-extension into a normal VS Code (not the F5 development host), works the same

Open questions

Question Notes
The bridge client M1: copied. bridgeClient.ts, types.ts and gameFinder.ts are copied from REDcode at commit 9f54c80 into extensions/edgemat/src/core, each with a header naming the source. A shared npm package for the EDGE tools stays the goal, together with the shared viewer
Saving a recolor: in place or at a new path Settled 2026-10-20 (M3): a new setup beside the original (named with the project’s name) by default, with every mesh that uses the old setup copied into the project and its materials pointed at the new one: no other mod needed. Found by reading the meshes in the garment’s folder (the jacket’s three body meshes in about 0.5 s). A material that names the setup through an .mi gets a copy of the .mi beside the new setup (written, not yet tried in the game). In place stays an option, and warns that it needs Material Texture Override. ArchiveXL patches instead of mesh copies: later, if mesh copies clash with other mods
Sharing REDcode’s bridge M1: EDGEmat uses REDcode’s running bridge when REDcode is active and reads the same game folder; otherwise it starts its own, and the MCP server always does. Whether one bridge copes under load with both tools busy, and what to do when REDcode’s bridge is older than EDGEmat needs, is watched in M2
Preset colors: sRGB or linear The surface page and mat_colors treat preset RGB as screen (sRGB) values, clipped above 1. Many presets then look very dark (about a quarter of all presets are named black or dark grey). If the game reads them as linear, swatches and names should brighten. Checked in M5 against in-game screenshots; one function (core/colors.ts) changes. First evidence 2026-11-16 (the Reshape test): the Cowboy hat’s felt preset, 0.465 grey, is 119 of 255 as a screen value and 182 read as linear; in the game it shows light grey, near white in the inventory’s light. Linear fits; one item, one light
Preview fidelity The game’s shaders are not public. How close the layered blend gets, and on which templates, is found in M5. Plan 2026-12-02: Toward the game’s look; the material close, the light approximate
A tiled texture on a game garment Answered 2026-10-20 in the game (tiling check): a numbered test pattern on the slim-fits pants. The garment’s UVs keep the texture upright (up is up, rows run down the legs) and at one even scale across all islands, with no visible stretch. One leg’s island is mirrored, so text reads backwards there. The pattern breaks at the island borders: down each leg and across the top of the thighs. At LayerTile 1 the whole texture covers both legs and the hips (one eighth of it is about a hand’s width). LayerTile repeats the texture that many times across the UVs, in both directions (4 gives 4 × 4: column 8 meets column 1, row 8 meets row 1), and repeats the normal map too: the garment’s own folds then show as finer wrinkles down the legs (seen in the game by the owner). What follows for Generate is in Generate a material, “On a garment” (proposed). Before that, 2026-10-19: metal_base.remt has a LayerTile scalar (20 parameters: BaseColor, BaseColorScale, Normal, NormalStrength, Roughness, RoughnessScale and RoughnessBias, Metalness with its scale and bias, emissive, AlphaThreshold, LayerTile and others), and garments use it already: Dawn’s pants (l1_001_wa_pants__dawn.mesh) draw their stitching with local metal_base materials (a color texture, a normal map, a color tint). Still unverified: what LayerTile does exactly, and how a tiled texture looks across a garment’s UV islands, which are laid out as one sheet. Checked in the game with EDGEmat’s first written mesh, using a test pattern, before Generate’s UI is built. A new mesh made in Blender sets its UVs to suit
Maps derived from a color image How good bumps and shine made from a color image look in the game. M3, with Generate’s first slice
Paint a garment by words (Tripo) Raised 2026-10-31 by the owner for Wardrobe Designer: edit a garment with Tripo, an AI 3D service, from the player’s words. Researched the same day (Tripo’s v3 API docs): Tripo has no task that changes an existing model’s shape from words (its one edit task edits pictures). Two routes. Paint: the Texture task takes an uploaded model (GLB, up to 150 MB) and a text prompt and paints it in 3D (color and PBR maps; 10 credits, US$0.10, 20 at detailed); the game’s mesh is kept, so bones, garment support and LODs stay; it fits only if Tripo keeps the garment’s UVs, else its paint needs a bake onto the game’s UVs. Answered 2026-10-31 by the paint check: Tripo keeps them (V’s Pants: every vertex and UV, scaled to 1 m tall; each part gets its own material, so parts sharing one game material are put together by UV). In the game it looks as Tripo painted it (owner, 2026-10-31: “looks good”; the paint check passed). Patterns, 2026-10-31: Tripo paints a believable garment (a colorway, a color per part, details at seams, buttons and hems) but no repeating pattern: “large polka dots all over” gave plain yellow with a few dots, and a swatch of dots as its style image gave a black waistband and trims and no dots. Its paint also differs from side to side (the first run’s dots are on one leg only). Reshape: pictures of the garment edited from words (5 credits a view), then a new model from them (30 to 50 credits): a new mesh, which would need the body fit, bone weights copied from the original, garment support, submeshes and both bodies rebuilt; best for stiff pieces (hats, helmets, glasses), worst for tight clothes; EDGEfab’s work, not started. Written up 2026-10-31 as W3 Reshape, with the pictures changed by Gemini first; the fitting asked of EDGEfab (EDGEfab #3). The game side: WolvenKit’s export through REDbridge’s project.export gives the garment as .glb (V’s Pants, masculine: 2 submeshes, 32 bones, 2 UV sets, garment support as vertex data and a “GarmentSupport” shape key); project.import brings a .glb back over a mesh (REDbridge #5). Uploads send the player’s own game files to Tripo with their own key, only when pressed; whether Tripo trains on uploads is unchecked. First the paint check
A new .xbm from a PNG Answered 2026-10-19 (REDbridge 0.10.0): project.import makes a new .xbm, but always with WolvenKit’s default setup (TEXG_Generic_Color, uncompressed, isGamma 0), where a game color texture is TCM_QualityColor with isGamma 1 and a normal map TEXG_Generic_Normal, TCM_Normalmap. A game .xbm of the right kind copied to the target first gives the import its setup (checked on a normal map). EDGEmat does that until REDbridge #8 (a texture setup for project.import) ships
Image services and models Which Gemini and OpenAI image models, their sizes and prices, and whether a general prompt prefix is enough. Checked when Generate’s first slice starts (M3)
Which items first The garments modders recolor most, to list in M0, become the test set
A shared mesh viewer Factor REDcode’s viewer out into a shared component (an npm package) that REDcode, EDGEmat and other EDGE tools embed. Later, once the material hook works; noted in REDcode #6
The sibling repos’ notes REDcode’s roadmap lists the layered material preview under C6 (README, docs/design.html); it should point at EDGEmat, requested in REDcode #6. EDGEkit’s design says new EDGE editor extensions go into REDcode, and its extensions.json should gain EDGEmat. Each repo’s own session makes the change

Later ideas

Not planned into a phase. Kept so they are not lost.

Idea Notes
Redesign a garment by asking an AI The true goal of the AI features (owner, 2026-10-19). Thought through below
Recolor in the live game, through EDGEbuilder EDGEbuilder is a REDnode in-game app. A modder looks at something in the game and says “recolor this”; EDGEbuilder works out the item or mesh and hands it to EDGEmat’s MCP tools (mat_find, mat_colors, mat_edit), and the change is deployed back to the running game. Needs EDGEmat’s MCP server (M2, M3), a way for EDGEbuilder to name what is being looked at, and REDnode’s live deploy. Raised by the owner on 2026-10-14. Thought through below

Redesign a garment by asking an AI

The true goal (owner, 2026-10-19), however far off: a modder asks an AI agent to recolor or redesign a piece of clothing (“make this jacket look like worn desert gear”) and it does. Start small and refine. First notes:

Piece What it needs State on 2026-10-19
1. The whole garment Every material of the item, per look and body: layered setups with their layers, the textured and decal materials (such as the stitching, pasted__decal_stitches) mat_find lists them; mat_describe gives one setup’s layers. An assistant combines the two today
2. How they map onto it Where each layer and material sits on the garment, in a form the agent can reason about: each layer’s share and area in words (“collar”, “sleeves”), and the color map as an image for a model that sees images Shares exist; areas in words and the image through MCP do not
3. The change Per layer, a surface and a color the surface offers (mat_colors, mat_edit); per textured material, a generated or picked texture (mat_generate, mat_apply) M3 builds the tools
4. See it, and try again The result in REDcode’s 3D view, then in the game View in 3D (colors), the bake (M5), hot loading

Likely shape: one MCP call that returns the whole garment at once (mat_item, unverified name), so the agent plans the redesign with everything in view, then mat_edit per layer.

Materials at runtime, through REDagent

A key long-term goal (owner, 2026-10-15): a modder, or even a player, changes materials in the running game by asking REDagent. For example, looking at a brown crate: “make it blue”. Explored when the time comes; these are first notes.

Piece What it needs State on 2026-10-15
1. What is being looked at The running game names the object in view: its entity, mesh component, mesh and mesh appearance Not built. REDnode reads and calls into the running game; a “looked-at object” query is a REDnode or EDGEbuilder request when the time comes
2. The change Find the object’s setup, pick the nearest preset in each layer’s template (or a template with a better match), write the result EDGEmat’s core, M2 and M3. World props use the same multilayered setups as clothing. REDnode 0.45.0 (E1, on REDnode’s main 2026-10-29) runs EDGEmat’s MCP server (0.3.1, pinned) for in-game assistants: REDagent sees the tools as edgemat__mat_*, reads without asking, edits and new materials after the player’s OK. No keys yet: mat_generate waits for REDnode #23
3. Into the running game The game loads .archive files at startup, so a changed file has to be reloaded live Possible today: REDnode’s archives.reload swaps a changed archive into the running game through RED Hot Tools (Hot-loading archives). What is on screen updates only when the game loads it again, except the clothing V wears
Route Notes
Switch to an existing appearance The quick route, and certainly part of it: mods already change an object’s appearance at runtime. Instant, needs no file change, but only offers the looks the mesh already has
Recolor a shared setup One edited .mlsetup changes every object that uses it, everywhere: every crate of that mesh and look turns blue. Right for “all crates”, wrong for “this crate”
Recolor one object A new setup and a new mesh appearance (or material) for that object, and the placed object pointed at them in its streaming sector. EDGEbuilder’s territory
A color no template has Needs a custom .mltemplate (M6)

Open for then: what a player (not only a modder) may change and how it is undone; whether runtime changes are saved as a mod in a project or only last for the session, as REDnode’s TweakDB changes do.