# 3D Modeling

Anything pertaining towards editing 3D Models

# Gear Item Weights

Weights control how a mesh rotates and deforms based on the underlying skeleton animations.

## Tips and Tricks

### Transferring Weights

One way to quickly get weights onto a gear item is to transfer them from the body mesh or another similarly shaped gear items.

Click the mesh to transfer from and then shift click the mesh to transfer to. Then switch to `Weight Paint` mode and select `Weights` -&gt; `Transfer Weights`

[![weights-transfer-weights-steps.gif](https://xivmodding.com/uploads/images/gallery/2024-06/Yv8YfaLJ2AEUperC-weights-transfer-weights-steps.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/Yv8YfaLJ2AEUperC-weights-transfer-weights-steps.gif)

Use the following settings to transfer the weights. (there is no confirm action, the mesh is automatically updated as settings are picked)

[![weights-transfer-settings.png](https://xivmodding.com/uploads/images/gallery/2024-06/scaled-1680-/XFsCOYc548wvK0H8-weights-transfer-settings.png)](https://xivmodding.com/uploads/images/gallery/2024-06/XFsCOYc548wvK0H8-weights-transfer-settings.png)

### Smoothing Weights

If you notice your weights have harsh edges and deform the mesh poorly. You can use the smooth tool to clean this up some. In the following picture you can see that the vertex group for bone `j_sebo_b` has some harsh lines.

[![weights-smoothing-harsh.png](https://xivmodding.com/uploads/images/gallery/2024-06/scaled-1680-/C9PSnbi0jz7A38FX-weights-smoothing-harsh.png)](https://xivmodding.com/uploads/images/gallery/2024-06/C9PSnbi0jz7A38FX-weights-smoothing-harsh.png)

[![weights-smooth-example.gif](https://xivmodding.com/uploads/images/gallery/2024-06/LmtQkNuexvU1S26Y-weights-smooth-example.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/LmtQkNuexvU1S26Y-weights-smooth-example.gif)

Ensure you have the vertex group selected for the bone you want to smooth. Switch to `Weight Paint` mode and then select `Weights` -&gt; `Smooth`. You will need to play around with the settings until you get results you like.

[![weights-smooth-settings.gif](https://xivmodding.com/uploads/images/gallery/2024-06/yx6xQQXw1zShYxTh-weights-smooth-settings.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/yx6xQQXw1zShYxTh-weights-smooth-settings.gif)

Here is the same bone rotations after smoothing.

[![weights-after-smooth.gif](https://xivmodding.com/uploads/images/gallery/2024-06/XsNWDV2ewYMQYyVp-weights-after-smooth.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/XsNWDV2ewYMQYyVp-weights-after-smooth.gif)

# Adding a hat to a Minion

Do you want your minion to have a cool hat? ![😃](https://stoia.info/_assets/svg/twemoji/1f603.svg) Read on

## Preparing our files

There are a few different ways to get files from the game. For this guide lets use Penumbra's `Import from Screen` combined with model export (textools can also accomplish this).

We are going to put the "Calfskin Rider's Cap" onto the "Meercat" minion. Equip the hat on your character and summon the minion. Then in Penumbra's Mods tab, make a new blank mod (call it whatever you like) and open `Advanced Settings`.

[![image.png](https://xivmodding.com/uploads/images/gallery/2024-06/scaled-1680-/G7ApXRDllAyqnnfD-image.png)](https://xivmodding.com/uploads/images/gallery/2024-06/G7ApXRDllAyqnnfD-image.png)

Open the `Import from Screen` tab, click `Refresh Character List` at the top left. Then click the `Add a copy...` button at the far right for the "Calfskin Rider's Cap" `mdl` on your character and the minion body on the Meerkat.

[![image.png](https://xivmodding.com/uploads/images/gallery/2024-06/scaled-1680-/HcQNMltddCVL0Ljq-image.png)](https://xivmodding.com/uploads/images/gallery/2024-06/HcQNMltddCVL0Ljq-image.png)

Now we will export these model files so that we can edit them in blender. Go to the Models tab of Advanced Editing (the window that we already have open).

For each model, select it in the dropdown, expand the `Import/Export` tab, and click `Export to glTF`. Put these files somewhere you will remember cause we will need them in the next step ![😃](https://stoia.info/_assets/svg/twemoji/1f603.svg) (You may want to put them in a folder as they will also export all the textures for the model)

[![image.png](https://xivmodding.com/uploads/images/gallery/2024-06/scaled-1680-/JtWUNkz0W5kAK3gr-image.png)](https://xivmodding.com/uploads/images/gallery/2024-06/JtWUNkz0W5kAK3gr-image.png)

## Blender!

(Note: This guide is using Blender version 3.6.2)

### Importing the files

Open blender and clear out the tree navigation to the right.

[![image.png](https://xivmodding.com/uploads/images/gallery/2024-06/scaled-1680-/qs4kbvxfuhMqWWZu-image.png)](https://xivmodding.com/uploads/images/gallery/2024-06/qs4kbvxfuhMqWWZu-image.png)

Now we will import our models. We will first import `m8320b0001.gltf` then we will import `c0801e6116_met.gltf`. Go to `File -> Import -> glTF 2.0` and find each model and import them.

[![image.png](https://xivmodding.com/uploads/images/gallery/2024-06/scaled-1680-/lHZVzMbQmI6QcQd5-image.png)](https://xivmodding.com/uploads/images/gallery/2024-06/lHZVzMbQmI6QcQd5-image.png)

You should have some items on the right panel now and if you expand them they should look like the following. `mesh 0.002`, `mesh 1.002`, and `mesh 2.002` should be the different level of detail models for the hat as long as blender gave you the same names on import. We are going to use `mesh 0.002`.

[![image.png](https://xivmodding.com/uploads/images/gallery/2024-06/scaled-1680-/NKnX4qWcm6fnxuaf-image.png)](https://xivmodding.com/uploads/images/gallery/2024-06/NKnX4qWcm6fnxuaf-image.png)

Click on `mesh 0.002`, hold shift drag it to `Armature` on the right panel. Then rename it to `mesh 3.0`.

[![guide-minion-hat-blender-move-rename.gif](https://xivmodding.com/uploads/images/gallery/2024-06/f7cTvGNQVuWld124-guide-minion-hat-blender-move-rename.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/f7cTvGNQVuWld124-guide-minion-hat-blender-move-rename.gif)

Select `mesh 3.0` and change its armature modifier to point to `Armature` instead of `Armature.001`.

[![guide-minion-hat-blender-armature.gif](https://xivmodding.com/uploads/images/gallery/2024-06/8kjk307dgNcHx2Bn-guide-minion-hat-blender-armature.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/8kjk307dgNcHx2Bn-guide-minion-hat-blender-armature.gif)

Now right click on `Armature.001` and select `Delete Hierarchy`

[![guide-minion-hat-blender-delete_hierarchy.gif](https://xivmodding.com/uploads/images/gallery/2024-06/oREqpNQuVaTn5CT0-guide-minion-hat-blender-delete-hierarchy.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/oREqpNQuVaTn5CT0-guide-minion-hat-blender-delete-hierarchy.gif)

Your setup should now look like this.

[![image.png](https://xivmodding.com/uploads/images/gallery/2024-06/scaled-1680-/H6qJNe5Gb5v1nHOq-image.png)](https://xivmodding.com/uploads/images/gallery/2024-06/H6qJNe5Gb5v1nHOq-image.png)

### Moving the hat

Click on the hat mesh in the 3d space and select `Object -> Set Origin -> Origin to Geometry`.

[![guide-minion-hat-blender-origin.gif](https://xivmodding.com/uploads/images/gallery/2024-06/g3jpm1s79PPWmOpx-guide-minion-hat-blender-origin.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/g3jpm1s79PPWmOpx-guide-minion-hat-blender-origin.gif)

Now we will use the move and rotate tools to move the hat to the minions head. This part is not an exact science, so use the gif below as a guide and move the head to a position you like.

[![guide-minion-hat-blender-moving-hat.gif](https://xivmodding.com/uploads/images/gallery/2024-06/4cY3mspSEqMfmUYc-guide-minion-hat-blender-moving-hat.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/4cY3mspSEqMfmUYc-guide-minion-hat-blender-moving-hat.gif)

### Adding weights

Now we need to add weights to our hat otherwise it will not move with the minions head. We are getting off a little easy with this mod as we only need to give the hat weights for one bone to make it look correct. Weights can be much more complicated for other clothing items, but we will keep it basic in this guide.  
First lets figure out the bone that controls the minions head. In the gif below we can see that the bone for the head is `j_head`.

[![guide-minion-hat-blender-hat-bone.gif](https://xivmodding.com/uploads/images/gallery/2024-06/VUL62pysxewHAjn3-guide-minion-hat-blender-hat-bone.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/VUL62pysxewHAjn3-guide-minion-hat-blender-hat-bone.gif)

Now lets add weights for the hat to that bone. Switch back to object mode in the top left dropdown. Then select `mesh 3.0`, open the data panel (green triangle looking one), and delete all current vertex groups.

[![guide-minion-hat-blender-delete-groups.gif](https://xivmodding.com/uploads/images/gallery/2024-06/cMQNM43uSXgr2eIC-guide-minion-hat-blender-delete-groups.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/cMQNM43uSXgr2eIC-guide-minion-hat-blender-delete-groups.gif)

Add a new group called `j_head` and switch to `Weight Paint` mode.

[![guide-minion-hat-blender-add-group.gif](https://xivmodding.com/uploads/images/gallery/2024-06/512eoN7GCNsm7zh4-guide-minion-hat-blender-add-group.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/512eoN7GCNsm7zh4-guide-minion-hat-blender-add-group.gif)

Ensure your weight slider is set to `1.0`. Switch to the gradient tool, and make the whole hat red.

[![guide-minion-hat-blender-add-weights.gif](https://xivmodding.com/uploads/images/gallery/2024-06/D6rL0heCwFkItx7x-guide-minion-hat-blender-add-weights.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/D6rL0heCwFkItx7x-guide-minion-hat-blender-add-weights.gif)

Verify! Now we can switch back to our Armature then in pose mode we can verify the hat is attached to the head bone now.

[![guide-minion-hat-blender-verify.gif](https://xivmodding.com/uploads/images/gallery/2024-06/pNLbWVldu029Onat-guide-minion-hat-blender-verify.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/pNLbWVldu029Onat-guide-minion-hat-blender-verify.gif)

### Export

Now we can export for the game. We will be exporting as a `glTF`. There are a few settings we need to change for the export as well. Specifically we will enable `Tangents` and `Custom Properties` as they are not included by default. Please see the [Penumbra Model Info](https://github.com/xivdev/Penumbra/wiki/Model-IO#user-content-9b49d296-23ab-410a-845b-a3be769b71ea) if you are having issues with this.

[![image.png](https://xivmodding.com/uploads/images/gallery/2024-06/scaled-1680-/mcMzDCSvoZeOywGm-image.png)](https://xivmodding.com/uploads/images/gallery/2024-06/mcMzDCSvoZeOywGm-image.png)

[![image.png](https://xivmodding.com/uploads/images/gallery/2024-06/scaled-1680-/YjSK7zhP9FhO1KR4-image.png)](https://xivmodding.com/uploads/images/gallery/2024-06/YjSK7zhP9FhO1KR4-image.png)

### Import back into game

Before we import the updated minion model, we will need to grab the hat material and redirect it to the minions folder in game so that the new mesh can use it. Lets use the `Import from Screen` tab in `Advanced Settings` to import this material from our character, then update the file redirect to put it in the minions material folder.

[![guide-minion-hat-adding-hat-material.gif](https://xivmodding.com/uploads/images/gallery/2024-06/kOoz7glowMCvX7J7-guide-minion-hat-adding-hat-material.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/kOoz7glowMCvX7J7-guide-minion-hat-adding-hat-material.gif)

We can also delete the hat `mdl` file from our modpack while we are at it as it is no longer needed. Make sure to remove the file redirect then click `Apply Changes` before deleting the file or you will cause issues with your hat in game.

[![guide-minion-hat-blender-delete-hat-model.gif](https://xivmodding.com/uploads/images/gallery/2024-06/IRSo1fcPnmVZKsX2-guide-minion-hat-blender-delete-hat-model.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/IRSo1fcPnmVZKsX2-guide-minion-hat-blender-delete-hat-model.gif)

Now lets import our new minion. Go back to the model tab, select the minion model, select `import from glTF` and find your minion model you exported from blender. (Do not check the checkboxes above the import button, we should not need them.)

Click `Save to File` after import is done.

[![guide-minion-hat-blender-import-to-game.gif](https://xivmodding.com/uploads/images/gallery/2024-06/ExjXzg5m2UrVZ2tl-guide-minion-hat-blender-import-to-game.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/ExjXzg5m2UrVZ2tl-guide-minion-hat-blender-import-to-game.gif)

## All Done!

That's it. Enable your modpack and redraw your minion and you should see the hat ![😃](https://stoia.info/_assets/svg/twemoji/1f603.svg)

[![guide-minion-hat-done.gif](https://xivmodding.com/uploads/images/gallery/2024-06/603tpXnZzTOHaqDT-guide-minion-hat-done.gif)](https://xivmodding.com/uploads/images/gallery/2024-06/603tpXnZzTOHaqDT-guide-minion-hat-done.gif)

# Customize+ Edits Applied in Blender

### **How to use a Blender Script to read your Customize+ edits!**

##### Something to know before you start!  


This method sadly makes you lose all bone parents, but not bone weights! so you will have to re-parent every bone manually. But I personally think that's much easier than Scaling, Rotating, and Positioning manually

##### **Step 1 Locate your .JSON file:** 

1. Your Customize+ template data can be found in *%appdata%\\XIVLauncher\\pluginConfigs\\CustomizePlus\\templates*
2. Change the path "**<span style="color:rgb(53,152,219);">\\</span>**" to "**<span style="color:rgb(186,55,42);">/</span>**" for example "%appdata%**<span style="color:rgb(224,62,45);">/</span>**XIVLauncher<span style="color:rgb(224,62,45);">**/**</span>pluginConfigs**<span style="color:rgb(224,62,45);">/</span>**CustomizePlus<span style="color:rgb(224,62,45);">**/**</span>templates**<span style="color:rgb(224,62,45);">/</span>**<span style="color:rgb(0,0,0);">example.json"</span>

##### **Step 2 Add the Location to Your Blender Script:**

1. Using this script **[Import Customize+ Public](https://xivmodding.com/attachments/30)**, locate the 'json\_path' and replace the red text saying 'PUT YOUR .JSON HERE'  
    Note: Its important you keep the ' at the beginning and end. Leaving those out will lead to errors.  
    <span style="color:rgb(126,140,141);">*(The text may not be red in the actual script, It is located at the bottom of the script.)*</span>  
    ```python
    # Update the armature
    bpy.context.view_layer.update()
    
    # Path to the JSON file
    json_path = 'PUT YOUR .JSON HERE'
    armature_name = 'n_root'
    
    apply_transformations_from_json(json_path, armature_name)
    ```
2. Save the script with the added .JSON location

##### **Step 3 Blender:**

1. After you've opened blender, and assuming you have already extracted your model using FFXIV Textools, import your model and <span style="text-decoration:underline;">**DO NOT**</span> change any bone names!
2. Go into edit mode and hit the A key to select all bones, after doing so right click and select **Parent**&gt;**Clear**&gt;**Clear Parent**. Then return to object mode.
3. Next go to the Scripting tab and import the script by hitting the folder icon at the top of the script area.
4. After that, select "**n\_root**" aka your armature and hit **Text**&gt;**Run Script**.
5. I personally use a script called **CATS** to apply transforms. I don't know where I got this exact version from but be sure to support the makers of it! **[CATS Github](https://github.com/absolute-quantum/cats-blender-plugin?tab=readme-ov-file) - [CATS\_version i have installed](https://xivmodding.com/attachments/31)**
6. Go to **Layout**&gt;**CATS&gt;Model&gt;Apply as Rest Pose**
7. Manually re-parent every bone so it all works properly!

**And You're done! Hope this helps anyone who was trying to figure out how to get C+ edits onto a model!**