description |
---|
Changing how an item looks in-game |
Published: November 05 2022 by manavortex
Last documented edit: Jun 29 by manavortex
This guide will teach you how to edit an item's material, changing its appearance.
- For a step-by-step walkthrough for a recolour of the Netrunner suit, check r-and-r-colour-editing.md
- If you want to edit emissive (glowing) material, check r-and-r-emissive.md -> #changing-the-presets
- For an overview of base materials and example files, you can check here.
- If you want to learn how mesh material assignment works in general, you can check the corresponding page.
- For details on changing materials, check ..
- If you just want to use a textured material, check using-a-textured-material.md
- You can find a video guide on youtube (It's also embedded below)
- Wolvenkit's most recent version (Nightly | Stable — guide has been written with 8.11)
- A Wolvenkit Project
- Most likely MLSetupBuilder >= 1.6.7 (get the latest release)
- If you are editing a basegame material, you need to install Material and Texture Override from Nexus.
For a complete noob, including setup of the tool(s): ~1h
Once you know what you're doing: <5 minutes and as much time for fine tuning as you want
This guide will take you through the following steps:
Please keep in mind that video guides might be outdated, as they are much more difficult to update than a wiki page. Refer to the written guide below if you run into any troubles!
{% embed url="https://youtu.be/HLwjKM8YDlA?si=U6aHXud4BRu8rLqi" %}
Estimated time: ~5 minutes for total noobs, unless you get side-tracked badly
{% hint style="warning" %} This process is detailed under spawn-codes-baseids-hashes.md -> #step-by-step.
Make sure to follow it so you're editing the correct material! {% endhint %}
This file picks the mesh appearance
One per body gender (m/w), this is shared by all appearances (basic_01
, basic_02
, rich_01
, rich_02
). For the female vest, it's
base\characters\garment\player_equipment\torso\t2_002_vest__puffy\t2_002_pwa_vest__puffy.mesh
This picks the appearance from the mesh file, which you'll need for the next step. Here's how they connect:
basic_01 | default |
basic_02 | bbstripes |
rich_01 | gbstripes |
rich_02 | pwstripes |
{% hint style="warning" %} Again, you can look these up in the .app file! {% endhint %}
- Find the file from mesh.DepotPath in your Asset Browser.
- Add it to your Wolvenkit Project (double-click or right-click -> Add to Project)
{% hint style="info" %}
To learn how appearances and materials connect, you can read 3d-objects-.mesh-files.
This is not necessary for this guide.
{% endhint %}
- Open your mesh file in Wolvenkit by double-clicking it.
- Find the array
appearances
at the very top, and expand it. - Find the appearance by the name that you found in Step 0 (example:
bwstripes
), and expand it - Find the chunk material names. These define the material:
- Starting with Wolvenkit 8.15, you can right-click on a chunk and click on "Select Material" from the context menu. For earlier versions, you have to find the material yourself - proceed to the next step.
Wait, I don't know which material I'm supposed to edit!
To find the right appearance:
Go back to #step-0-finding-the-.mesh-and-the-appearance and look it up in the .app file
To find the right submesh:
Click on the "Mesh Preview" tab directly above the editor. Here, you can toggle submeshes on and off to see which is which.
Depending on your mesh, the material instance will be in one of two places: either under localMaterialBuffer.materials
, or under preloadLocalMaterialInstances
.
(If you don't see preloadLocalMaterialInstances, that means it's empty and has been hidden.)
Inside the array, find your material by name:
{% hint style="warning" %}
If you see multilayered.mt
as the baseMaterial
, you have to edit this with MLSetupBuilder. Fortunately, it's not very difficult.
If you'd rather use a textured material, see the using-a-textured-material.md sub-page. {% endhint %}
{% hint style="info" %}
Most materials in Cyberpunk use multilayered.mt
as base material — this is how everything looks so good without 100 GB of extra textures. It's slightly more complex than editing textures because you need an extra tool, but you will love it once you're over the worst shock.
{% endhint %}
You will (hopefully) see a material with three entries in values
(order doesn't matter):
Key | Value (DepotPath) |
---|---|
MultilayerSetup | base\characters\garment\citizen_casual\torso\t2_002_vest__puffy\textures\ml_t2_002_ma_vest__puffy_bwstripes.mlsetup |
MultilayerMask | base\characters\garment\citizen_casual\torso\t2_002_vest__puffy\textures\ml_t2_002_ma_vest__puffy_default.mlmask |
GlobalNormal | base\characters\garment\citizen_casual\torso\t2_002_vest__puffy\textures\t2_002_ma_vest__puffy_n01.xbm |
Do you want to know more?
In this guide, we'll focus on editing the MultilayerSetup.
- For a detailed explanation of those properties, see multilayered-material-properties.md
- If you want an explanation of the Multilayered shader, check here.
- To learn more about MultilayerMasks (or how to make your own), check custom-multilayermasks.md
- For more intel on normal maps, check self-made-normal-maps
First, add the .mlsetup to your project. You can either expand the CKeyValuePair
and click the yellow button, or copy the depot path and use the Asset Browser.
- In the project explorer under Wolvenkit's
archive
folder, right-click on themlsetup
file
&#xNAN;This folder will only be visible in the "source" or "archive" tab of your project explorer - Select "Convert to JSON"
{% hint style="info" %} If you don't have MLSetupBuilder installed, you need to do that now. If you don't know how to use it, please check #using-mlsb {% endhint %}
- Optional: If you don't see an
mlsetup.json
in your project, switch the Project Explorer tosource
orraw
. - Right-click on the file and open it in MLSetupBuilder.
Optional: by hand
Open up MlSetupBuilder and load your .mlsetup.json file.
If you select WolvenKit's "Open in File Explorer" option, you can copy the path from the explorer's address bar and paste it into the MlSetupBuilder's address bar.
{% hint style="success" %}
For a documentation of multilayer properties, see here.
For a list of reference images, check multilayered-previews.md
{% endhint %}
- Draw the rest of the owl and edit the mlsetup.
- Export the file, overwriting the original
.mlsetup.json
- Switch back to Wolvenkit
- Right-click on the
.mlsetup.json
and import it from json.
{% hint style="success" %} This is already working. You can pack the project and see it in action!
If it doesn't work, you need to install Material and Texture Override from Nexus. {% endhint %}
Congratulations! You modded an item! If that's all you wanted, you can now go and do whatever you want. You can even delete the mesh from your mod and pack only the .mlsetup
!
Of course you have only changed an in-game texture, which may cause side effects — especially if other mods do the same.
To change that, keep reading!
Instead of changing an in-game file, you can also replace it with your own.
- Rename your file to something nobody else will touch, e.g.
manavortex\mlsetups\my_custom_vest_appearance.mlsetup
- Copy the new relative path (right-click), and update your mesh:\
{% hint style="warning" %} Keep your folder and file names unique! If you have two mods adding a file at the same location, the second one will be unable to overwrite it and will use the first mod's file. That is, unless your mods are in REDmod format, which will be loaded even later and in order of their folder names.
Understood? No? That's fine. Just keep it unique. :D {% endhint %}
You can rename a material by changing the "name" property inside the CMeshMaterialEntry
in the materials
array:
{% hint style="warning" %} As of Wolvenkit 8.15, chunkmaterials will not auto-update, but you can use Search and Replace from the Context Menu to rename everything at once. {% endhint %}
To add a new material to a mesh, you can simply right-click on the materials
array:
{% hint style="info" %} Consider converting your mod to use archivexl-patching-appearances.mdfor much better compatibility and smaller mod size! {% endhint %}