Customizing the meshes
Last updated
Last updated
With our character creator options configured, we are now ready to start creating our custom tattoo.
Since I am demonstrating with the chest tattoo template, we will also be looking at the .morphtarget file.
Now would be a good time to start importing our custom textures into our WolvenKit project. Having our textures ready will help us visualize how they will look once projected onto the mesh, and help us confirm that our meshes are configured properly.
Go ahead and export the template .xbm files:
If you closed the import/export tools earlier, you can bring them back now
Once you've exported the textures, open them in your preferred image editor (they will be located in the "raw" folder inside your project's "source" folder):
The template project came with UV maps, which can be found in source > UV Maps. Use those to help when creating your texture:
Once you've created your textures, save them over the original templates, and import them back into WolvenKit:
Now that we have our custom textures, we can begin customizing our .mesh files.
Our mesh contains a single appearance, which is referenced by our .app file when we select a tattoo in the game.
chunkMaterials are the materials the appearance will use that make up our tattoo. The name of our submesh must point to a materialInstance.
Let's look at our materialEntries:
We have one material entry for our tattoo. It is a local instance because we are defining it in the localMaterialBuffer :
CMaterialInstance is the definition of our material in materialEntries
baseMaterial is a resource path to our .mi file. This is what turns our .xbm into an actual texture. We won't be modifying the .mi in the tutorial, but you can rename it. Be sure to update the path if you do.
All of these options have been configured for you in the template and will work out-of-the-box with our custom .xbm files. To see this in action, toggle the "mesh preview" tab in the mesh file:
Here you will see a blank version of the tattoo mesh. If you click "Generate Materials" it will render our texture onto the mesh:
If that works, then you're ready to Ctrl + S and repeat for opposite gender.
In vanilla Cyberpunk 2077, Female V can manipulate her breast size between three different options by visiting a ripper. Instead of configuring a .mesh for each breast size, we use a .morphtarget (essentially a mesh, but with the ability to shapeshift, so-to-speak). Our player_woman_average chest tattoo mesh is actually just a reserve for our tattoo appearances, and provides the default mesh for the morphtarget.
The only thing for us to do in this project is ensure that the information in our .morphtarget file is accurate:
Is baseMesh path pointing to our femV mesh?
Is baseMeshAppearance pointing to the tattoo appearance in our femV mesh?
If you answered yes to both of these questions, then you are ready to carry on!
Value points to our .xbm file, and Key determines how to use it. Read more about it
If you're not working on a chest tattoo, you can
If you haven't already, you really need to check out