Porting 3d objects to Cyberpunk
How to replace an in-game item with your custom mesh
Summary
Published: Oct. 14 2023 by manavortex Last documented Update: Mar. 20 2024 by manavortex
This page will give you information on how to get a 3d object into Cyberpunk.
Wait, that's not what I want!
You can find other relevant guides scattered across this wiki, for example
AMM: Textured items and Cyberpunk Materials using Custom Props
Prerequisites
Wolvenkit Blender IO Suite(>= 1.5.5.2 for Wolvenkit 8.14)
Blender (>= 4.1 for Wolvenkit 8.14)
A Wolvenkit project, so that you can pack your mod
Step 0: Finding the right base mesh
To bring 3d data into Cyberpunk, Wolvenkit needs a .mesh file to import into. Read here why.
For the purpose of this guide, it doesn't matter if you are trying toReplace a player item with an NPC item, creating AMM: Custom Props or Adding new items. You will overwrite an existing in-game mesh, the file path doesn't matter.
Static items
If you are creating props, you use a mesh from the template project or grab any static mesh from the game.
Do not take equipment item or weapon meshes — those include a bunch of extra data that you don't need (the armature). You don't need it, and it can have side effects.
As this guide will focus on equipment items, you can skip Step 3 and 4 completely.
Equipment items
If you want V to wear the item that you're currently porting, it needs to move with the player. For that, you need an armature. This guide will show you how to acquire one.
You will delete fewer meshes if you read all of the sections below before starting.
You can use the Wolvenkit search in the Asset Browser to find meshes.
The right slot
Begin by picking a game mash from the right slot. If you're porting shoes, pick a shoe mesh, if you're porting glasses, pick a glasses mesh – you get it.
The right shape
For the sake of future you, pick an in-game item that is as close to your new garment as possible. If you're porting boots, take boots and not slippers. If you're using a baggy sweater, pick one of those or a jacket rather than a skin-tight t-shirt.
The right body gender
Make sure to use an item with the correct armature. You can identify them by prefix in the path:
body gender | Player | NPC |
---|---|---|
male rigged |
|
|
female rigged |
|
|
Wolvenkit search query suggestions
Search for something like this:
For torso items, you can add t1
for inner torso items (tight-fitting) or t2
for outer torso items (worn above t1).
Step 1: Exporting your mesh from Wolvenkit
Export from Wolvenkit
For where to export a mesh, see Tools: Import/Export UI
For how to export a mesh, see Import/Export: Mesh (3d Model)
If your mesh won't export from Wolvenkit, try unchecking the following box(es) in the export settings (by unchecking the boxes):
Once you are done, you can find the exported glb in your project's raw folder (see #project-explorer-tabs or#file-structure-the-raw-folder for details).
Step 2: Importing your mesh into Blender
This part won't be documented here. If you don't have an entry in your import menu, hit up Google - get that thing into Blender somehow.
Step 2.5: getting a grip on the submesh count
The mesh count in Blender corresponds to the submesh/chunk count in Wolvenkit. In Cyberpunk, we have one submesh per material that we want to use.
If you don't know what that means, ignore the information for now - but few meshes use more than five. The current maximum is the player base body with a total count of ten submeshes per , so to be on the safe side, we need to stay below that.
If you want to get fancy, check out Step 2 in the guide about ported items and Cyberpunk materials. Otherwise:
Select all meshes but one by shift-clicking them in the Outliner at the topright of your viewport
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252Fe8YA74UQrVeCVASdAZc3%252Fporting_clothes_too_many_meshes.png%3Falt%3Dmedia%26token%3D389704c4-7b47-44e8-bbee-5849b1d6c610&width=768&dpr=4&quality=100&sign=63abb401&sv=1)
Select the last mesh
Join the meshes together (Shortcut:
Ctrl+J
)
Step 3: Parenting the mesh(es)
The end result
This section will show you how to get the following end result:
one or more mesh(es) with names from
submesh_00_LOD_1
, consecutively numberedparented to the right armature
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FjvGKUzQdPmAyzuq9lk2j%252Farmature_modifier.png%3Falt%3Dmedia%26token%3D0d58e7d1-eb21-438b-9ea5-be6fa5066b9a&width=768&dpr=4&quality=100&sign=e943c111&sv=1)
There are two strategies that you can use. Personally, I use Strategy 1: Replacing the 3d data, since it will retain most of the original mesh's properties.
Preparation
By the end of your section, you should have something like this:
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FnKMGDVqZ7ObwpwZatRQ4%252Fporting_clothing_cleared_up.png%3Falt%3Dmedia%26token%3Dfa351ee1-61be-4e52-87e8-59690a10e546&width=768&dpr=4&quality=100&sign=251d61ec&sv=1)
No matter which strategy you use, we need to get the prerequisites done first. We need an original Cyberpunk armature.
Import the result of Step 1 into Blender (see the Wolvenkit Blender IO Suite's documentation about Importing into Blender)
Clean up any residual modifiers and transforms (we don't want them):
If your mesh has an armature modifier with a non-Cyberpunk armature, delete it
(click on the
x
in the modifier panel)
If your mesh is parented to anything that is not a Cyberpunk armature, unparent it:
Select the mesh(es)
Select Unparent (Hotkey:
Alt+P
)Select the second option "Clear Parent and Keep Transforms"
Strategy 1: Replacing the 3d data
If you are doing this, you can skipStrategy 2: Parenting the meshes.
We start by deleting the original's vertex data.
In , select all of the original meshes.
Switch to Edit Mode (Hotkey:
Tab
)Make sure that all vertices are selected (Hotkey:
A
)Delete all vertices (Hotkey:
x
, option: Vertices)
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FDlbdxiP7efSv1tyncOrS%252Fporting_edit_mode_select_vertices.png%3Falt%3Dmedia%26token%3Dd021fad1-b1ad-4920-9a80-ddc4b3bb971d&width=768&dpr=4&quality=100&sign=817cf7e0&sv=1)
Switch back to Object Mode (Hotkey:
Tab
)
We'll merge our new meshes into the empty containers now:
Click on your new mesh
Click on the empty original mesh in the Outliner (yes, order matters)
Join them (Hotkey:
Ctrl+J
)
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252FbDJVGHWTpA2kjKj1kXvx%252Fporting_clothes_after_merge.png%3Falt%3Dmedia%26token%3Dc6b21ab5-8614-4eb6-9a3f-a34f0d227d88&width=768&dpr=4&quality=100&sign=d134a76&sv=1)
Ctrl+Z
) and select them in the right order. (You could've listened!)Repeat the same for all meshes that you want to import to Cyberpunk.
If you need more submeshes, simply duplicate an existing one (Hotkey: Ctrl+D
, ESC
) and change its name by incrementing the number. Make sure it still ends in LOD_1
, not in LOD_2
— that will tell the game it's low-poly, and cause it to be hidden until you're further away.
That's it. All your meshes are parented to the armature now.
Strategy 2: Parenting the meshes
If you are doing this, you can skip Strategy 1: Replacing the 3d data.
We can simply parent the meshes to our existing armature:
Click on your mesh
Click on the Armature object in the Outliner
Select Parent (Hotkey:
Ctrl+P
)Select "Armature Deform"
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252Fp2jP9a1o8Ljjh9Q2OrDZ%252Fporting_parent_object.png%3Falt%3Dmedia%26token%3D2de3a1ce-ff15-49fb-9eca-be9b4cb58417&width=768&dpr=4&quality=100&sign=148a0cf1&sv=1)
Make sure to rename your mesh: Wolvenkit doesn't know what to do with meshes that aren't part of the sequence starting at
submesh_00_LOD_1
. (Blender's .000 suffixes will be ignored) You can delete the original meshes, or you keep them for Step 4.
Step 4: Weight Transfer
Start by deleting all vertex groups from your new mesh, as we will now replace these and don't want anything funky to stick around to destroy our re-import:
![](https://wiki.redmodding.org/~gitbook/image?url=https%3A%2F%2F1427525421-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F4gzcGtLrr90pVjAWVdTc%252Fuploads%252Fg4Pzd6J72YQloQh2X5nJ%252Fimage.png%3Falt%3Dmedia%26token%3D8abc5924-074d-4a22-be02-eb8b0f7ef9c5&width=768&dpr=4&quality=100&sign=280a01f6&sv=1)
You now need to transfer the weights from your original game mesh. If you deleted or overwrote the armature's original meshes during Step 3: Parenting the mesh(es), you can simply import it again for a second copy.
The Wolvenkit Blender IO Suite has a function to do this for you. For the sake of completeness, the box below contains the full manual process, but we recommend using the plugin's Mesh Tool panel to do this.
Step 4.5: Weight Painting
Nobody likes weight painting.
This is where you pray that you don't have to do this (and I pray that nobody will have to actually write this section), because weight painting sucks. you can find some general information on Meshes and Armatures: Rigging.
This is what you need to do if your mesh moves unevenly or if parts of it are clipping through the body although things are fitting correctly.
Step 5: Exporting from Blender
See the Wolvenkit Blender IO Suite's documentation about Exporting from Blender
Step 6: Importing into Wolvenkit
See the WolvenKit wiki about #importing-mesh-files
Step 7: Success!
… or maybe not. Maybe you should try Troubleshooting your mesh edits now.
If everything worked, here are a few more guides that you might want to look into:
R&R: Refitting (step by step) will teach you how to refit for a certain body mod
Adding new items will walk you through the steps of adding your mesh as a new piece of equipment
AMM: Textured items and Cyberpunk Materials using Custom Props will tell you how materials work, and how you can use them to texture your item
Last updated