Skip to content

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:

Example Download

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:

mesh

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.

weights

Textures

This is the mesh with all textures applied:

textures

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.

overlap

mask

If we preview this mask by applying it to the mannequin, we can see that the overlapping areas have been correctly hidden:

mask_applied

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:

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:

decal

decal

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:

robotarm.json
{
    "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
}
  1. This category doesn't exist by default, so it will be created when this addon is loaded.
  2. The second material slot (slot 1, counting from 0) 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:

thumbnail

ingame