Exporting and importing meshes

How to export and import meshes (WolvenKit <=> Blender)

Summary

Created by @manavortex Published November 05 2022

This guide will show you how to - export meshes from the game for use in other projects - import those meshes back into WolvenKit

It will not show you anything else. For other use cases like exporting characters, please check Wait, this isn't what I want!

Assumed skill level: You are able to read ;)

Tool
Tool version

>= 8.8.0 (8.7.0 works, but has a slightly different UI)

>= 3.1 stable

Wait, this isn't what I want!

Would you rather…

You can find a collection of useful Python scripts for Blender on Simarilius's github.

You can import and export meshes via WolvenKit or Noesis - both methods work.

Exporting the mesh

glTF Binary (*.glb)

WolvenKit <= 8.8: Use the Import/Export tool. It is pinned to the sidebar on the right.

WolvenKit > 8.8: Use the Export tool. You can toggle it from the "Tools" menu on the top bar.

If the export fails, try unchecking the following properties in the export settings (you have to do this for each individual mesh)

  • Export Materials

  • Export Garment Support

    You have to do this for each mesh individually, or you can copy and paste the settings with the buttons

You should now havemeshName.glb in your WKit project's raw directory.

Wolvenkit > 8.8 will by default export with materials for the Cyberpunk Blender Plugin.

Path example

Assuming you are exporting t2_002_pwa_vest__puffy.mesh, WolvenKit will do the following:

Path of mesh: <yourModDir>\source\archive\base\characters\garment\player_equipment\torso\t2_002_vest__puffy\t2_002_pwa_vest__puffy.mesh

Path of glb: <yourModDir>\source\raw\base\characters\garment\player_equipment\torso\t2_002_vest__puffy\t2_002_pwa_vest__puffy.glb

Blender: Saving the mesh

Some meshes (such as eyelashes and hair) are two-sided. See here for details on how Wolvenkit handles that.

glTF Binary (*.glb)

You can (and should) use the Cyberpunk Blender Plugin — it will take care of the necessary settings.

Make sure to check the box under Data > Mesh > Tangents, as Wolvenkit will not export without it.

Export settings: "Tangents" must be checked

Importing to *.mesh

If you are following a guide with pre-made resources and it tells you to import via Noesis, you'll want to follow the advice, as the elements in the exported structure will have different names.

Alternatively, you can run this script on your blend file, which will automatically fix that for you.

glTF Binary (*.glb)

In Blender, you should have overwritten your previously exported glb. With WKit's Import/Export tool, you can now simply Import it back in.

WolvenKit will map any *.glb file under raw to the mesh with the same name under source.

Example:

<yourModDir>\archive\raw\base\characters\garment\player_equipment\torso\t2_002_vest__puffy\t2_002_pwa_vest__puffy.glb

will be imported over

<yourModDir>\archive\source\base\characters\garment\player_equipment\torso\t2_002_vest__puffy\t2_002_pwa_vest__puffy.mesh

Import/Export: _doubled

Normally, a mesh's backfaces are invisible/transparent - you aren't supposed to see a mesh from below, so it doesn't matter. But some, like hair and eyelashes, are different, and need to be doubled.

When importing via Noesis, you need to do this by hand: duplicate all the vertices in the mesh, and flip the normals. When importing via WolvenKit, it will automagically do that for you if a mesh name ends with _doubled.

The suffix also indicates that Wolvenkit de-duplicated a mesh on export!

Thanks to Na for the screenshot

Troubleshooting

If your mesh won't export from Wolvenkit, try exporting it without materials by unchecking the box.

For a list of troubleshooting steps, check the corresponding wiki page.

Last updated

#647: Add info on downloading Phantom Liberty DLC files for rollback

Change request updated