Monday, 30 March 2015

Tutorial: using KgTools to bodyslide an outfit mesh

This is a small step-by-step tutorial showing how to use the KgTools Clothing Converter to convert a custom nif_0 to a nif_1; this can be use in the reverse way (_1 to _0) or between different body types, but I'm focusing only in the 0 to 1 weight morphing.

0 - Previous Notes:

- This tutorial uses the 0.89k version from KgTools;
- Please always make backups of all your files involved in the process;
- Use this procedure in meshes finished, tested and ready to play; the _0 to/from _1 process should be the last thing before creating the final plugin in the Creation Kit, but you should make sure the mesh is working in game.

The mesh that will be bodyslided is ElvenHunter.nif, a WIP skinned for the 7Base body weight 0:

1 - Get started: 

First, grab KgTools for the website and extract it to a folder; I recommend using the same folder where you keep your works in progress or the backups, but any place is good; after the extraction, your folder should look like this:

For this tutorial we will only need to use two .bat files, the Convert Clothing.bat and Make Lattice.bat, but first open the Clothing Converted folder to get familiar with the folders; it should have this folder structure:

Those folders will store all your process files. The lattice folder is a good place to store the lattice files (we will create one soon), the target folder will store the .nif you want the convert and the output folder will store the .nif file after the conversion.

Now you want to copy the body nif files needed to create a lattice; for this outfit, I need the femalebody_0 and femalebody_1 from the Sevenbase body, but for UNP, CBBE or vanilla is the same basic idea, just copy both 0 and 1 nif files from the body you want to slide. Store a copy of both in the "from" and "to" folders from the directory above.

Finally pick up the mesh you want to convert and copy it to the Target folder, and rename it if needed, using a _0 in the end as you are converting from 0 to 1 (use a _1 if you are converting from 1 to 0). In my example, I have renamed the ElvenHunter.nif to ElvenHunter_0.nif. Now let's start using the tools.

2 - Make Lattice: 

Run the Make Lattice.bat and you should get a display window similar to this one:

Go to File, Convert From... and select the Femalebody_0 inside the "From" folder. Then, File again, Convert To... and select the Femalebody_1 from the "To" folder. Finally, File one last time, Save As... and save it in the "Lattice" folder using a file name that clearly states what is the lattice for; since you are converting from Sevenbase weight 0 to SevenBase weight 1, a suitable file name could be, but use the file name you want. Check if the program has the same buttons enable/disable as the image above, click OK and wait until the program (a DOS window) exit.

Now you have a lattice that can be used multiple times for converting from 0 to 1 meshes skinned to Sevenbase. This lattice is basically a template that stores both bodies (meshes) data needed to create the morph. We're going to use it right now on the mesh.

3 - Clothing Converter

Now it is the step where you will convert the outfit from one size to another. Open the Clothing Converter.bat, and you should get a window like this:

Go to File, Select Lattice and browse to find the lattice you have created in the previous process step. Then File, Target Mesh Options, and select the folder where is the nif you want to convert (Target folder, ElvenHunter_0.nif). Make sure you have the same options toggled on/off as the image above, then hit OK and wait for the program to finish, like in the Make Lattice process. For simple meshes, the process is very fast. For complex meshes (more polys), the process can take several minutes.

Note: you can drop multiple files in this target folder if you plan to run all of them, assuming that you want to make a similar conversion. The program will run any file there or a single file depending on your choice.

When done, go to the Output folder and you should have an ElvenHunter_0.nif inside; rename it to ElvenHunter_1.nif.

Now the weight slide is done. Grab both .nif files (ElvenHunter_0.nif from the Target folder and ElvenHunter_1.nif from the Output folder), copy them to your "data\meshes\your mod folder" and import them to the game via CK (don't forget that you only need to select the _1 file in CK Armor and ArmorAddon):

If in the end you still have some clipping issues, just open the Output nif file in Max or Blender and adjust them manually (it is the best practice). Don't delete vertices as your mesh will surely bugged out while sliding between 0 and 1.

There are some good users that share their lattice files, so if you are getting weird results due to a poor lattice (this can happen most when converting from different bodies, not when creating the weight slide) check the link.

Credits and Thanks:

Gerra6 for his amazing tools and instructions.
LL community for being an awesome to learn and exchange knowledge. 

No comments:

Post a Comment