Advanced Clothing Addon Example
This section will break down the elements of a more advanced clothing addon, using all of the available addon features.
A zip
file containing the addon mesh, textures, and config can be downloaded here:
Concept
A futuristic robot arm for HD-chan. This arm replaces HD-chan's existing arm and shows off some translucency effects.
Mesh
This is the mesh we have created for our addon:
The mesh has two material slots: one for the metal parts and one for the translucent plastic parts.
The mesh's vertex weights are set to match the mannequin's real arm, so that it will move in the same way. Because this is an inorganic model that shouldn't deform, we weight one side of the elbow joint 100% to the bicep, and the other side 100% to the forearm.
Textures
This is the mesh with all textures applied:
To achieve a translucent effect on the outer plastic parts, the diffuse texture for that material slot has a low alpha value.
Mask
Our arm mesh currently overlaps with a lot of HD-chan's existing arm. We can hide the areas that overlap by painting a mask.
If we preview this mask by applying it to the mannequin, we can see that the overlapping areas have been correctly hidden:
Decal
In addition to our mesh, we want to add a design to HD-chan's skin at the point where it meets the robot arm. We can achieve this using a decal:
Decals must be created using the mannequin model's decal
UV map and a 4K (4096x4096) texture.
Our decal only occupies a small area of the whole texture, so we can crop it, making a note of the distance from the top-left corner of the original texture to the top-left corner of the cropped area:
Our final decal filename is therefore robotarm_decal_0_1610_1430.png
.
Tip
This cropping step is not essential, but will make the addon smaller and quicker to load in-game.
Config
Our config file looks like this:
{
"display": "Robot arm",
"category": "Bionics", // (1)!
"bra": false,
"shoe_type": "none",
"covers_nipples": [false, false],
"covers_fingernails": [false, false],
"covers_toenails": [false, false],
"covers_hair_main": false,
"covers_hair_bangs": false,
"covers_hair_temples": false,
"translucent": [1], // (2)!
"view_offset": 1.0
}
- This category doesn't exist by default, so it will be created when this addon is loaded.
- The second material slot (slot
1
, counting from0
) represents a translucent plastic material. The first slot does not need translucency and so is not included.
In Game
The completed addon appears in the new "Bionics" category and when equipped, we see that all rendering features appear to be working correctly: