Jump to content

How to Utilise Custom w2mi in RedKit


Recommended Posts

When revising and editing w2mesh files (in blender or other 3d program), the reimporting process through the RedKit asset browser will sometimes remove material details, depending on how your files are saved. For the most part, this can be circumvented by either right clicking the mesh in Asset Browser and selecting ‘reimport resources’ or by opening the mesh from the Asset Browser and clicking the ‘reimport’ button on the top left. It will refresh the mesh pull without resetting things. Sometimes, though, you may need to make a clean/new reimport, and doing so will remove all materials & parameters from the mesh. To save time, you can edit the values of a w2mesh’s materials, and then save the complete set of parameters/values as a w2mi, making it a few short clicks to reapply a complex or precise material to your reimported w2mesh. A w2mi acts as a Material Instance file, saving not only the diffuse/ambient/normal, but things like specularity, Fresnel, detail material, etc. The steps are simple, but it requires a specific folder hierarchy structure.

For stealing w2mi values from existing mesh, see steps 1-3. If you already have your custom values in your mesh, skip to step 3.

image.png.11b2c2b7c4d946a6e65bd5df807774c6.png

Step 1: Navigate to your source mesh using the RedKit asset browser. In this tutorial, I’ll be using the lace collar item from Blood & Wine.

Step 2: Double click the mesh to open, then navigate to the materials tab on the top right bar. It is not necessary to select a particular material from the list; any will do.

image.png.dddd5420df76b7af73b55ca0ebf9bbcc.png

Step 3: On the far right of the window, select ‘save material’ to create a w2mi. You can save a vanilla item’s material values as w2mi, or you can save your own customized values. If you want to change the material shader (here it is pbr_hair_simple) make sure you do so before saving the w2mi.

image.png.690eb4e9726e06b7b3f4651b5ee0d7c7.png

Step 4: Navigate to your chosen/custom mesh. Double click to open, then navigate again to the same materials tab. Select the material slot again for the part of the mesh you want the w2mi to be applied to.

image.png.cb76519515ebdc5267c120be420e4c7f.png

Step 5: Click on ‘remap materials’ and navigate to your /model directory (this is a very important detail!) because RedKit is not going to be recognizing that there is a w2mi saved if it is not being saved in the /model directory. Don’t worry if you’re not seeing any w2mi files. It will find them.

image.png.0efa81fffc21415c5cbb486598e24c0d.png

Your folder path to the left of the yellow will probably look very different, and is much less important than the highlighted part in yellow. If this folder doesn’t already exist, you will need to add or edit a file in your target /model folder. RedKit must create this directory on its own; you cannot create it via Windows Explorer like in WolvenKit. Once you are inside the /model folder, click ‘select folder’.

image.png.21e6fb1e933dbc57a161af1872fc155d.png

Step 6: You will see a list of the different material slots the mesh is having. Select your w2mi from the drop down menu. You can add multiple w2mi at once this way, but for the tutorial we are only editing the one material value. By default, they aren’t labeled, but if you have custom names for your material slots (ie, named in Blender) it is much easier to see which box/dropdown applies to which part of the mesh. If you want to label these before importing w2mi’s, tick the ‘highlight selected’ box below ‘remap materials’ and it will turn green each section that has a material parameters. Once you pick your w2mi for each field you want to remap, click ok.

Your mesh should now show material using all your pre-edited values (diffuse/ambient, specularity, roughness, etc) and look just as the saved w2mi directs. Picking each part of the mesh and clicking the ‘local instance’ box will allow you to tinker with everything EXCEPT the Material Shader dropdown. If you change this, it will remove your w2mi.

If you make more changes, you can always use Save Material button again, to be creating an overwrite of the w2mi with your new edits to the material instance. You can save w2mi from pretty much any w2mesh or redcloth and apply it to something else. This includes faces, furnishings, and hair

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...