> For the complete documentation index, see [llms.txt](https://plugn-play.gitbook.io/ultimate-dice-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://plugn-play.gitbook.io/ultimate-dice-system/custom-dice.md).

# Custom Dice

Create your own D6 mesh and replace the face textures in M\_DiceMaster.

Use this workflow to replace the supplied D6 with your own mesh and artwork. The current system supports six-sided dice with results from **1 to 6**.

## 1. Build the mesh at 1 m

Create the dice mesh at **1 m × 1 m × 1 m** at scale 1. In Unreal's default centimetre units, that is **100 × 100 × 100 cm**.

Keep the pivot in the centre, use a uniform scale, and align the six faces with the mesh's local X, Y and Z axes. Match the supplied die's orientation so the existing face detection and forced-result poses work with your artwork.

The Data Asset's **Basic Settings → Dice Size** controls the in-game scale. With a 1 m source mesh, the default size of **0.1** produces a die approximately **10 cm** across. Keep the source mesh at its 1 m size and use this setting for gameplay sizing.

Add simple collision suitable for physics simulation and make sure it follows the shape of the die. Use material slot **0** for the dice surface.

## 2. Prepare the UVs and textures

Unwrap the six faces and centre each face's markings inside its UV island. Keep the artwork clear of bevels and island edges, with enough padding to avoid neighbouring faces bleeding into one another.

You can reuse the supplied UV layout or create your own. If you change the layout, all replacement face masks and normal maps must use that same layout.

Prepare these matching texture pairs:

| Appearance | Face mask                               | Normal map                        |
| ---------- | --------------------------------------- | --------------------------------- |
| Numbered   | Numbers 1–6 on the corresponding faces. | Matching numbered surface detail. |
| Dotted     | Pip patterns 1–6 on those same faces.   | Matching dotted surface detail.   |
| Unknown    | Concealed markings for every face.      | Matching unknown surface detail.  |

Follow the supplied masks' black/white convention: the mask blends the material's two colours. Keep each mask aligned with its normal map so switching appearance also switches the correct surface detail.

## 3. Replace the textures in M\_DiceMaster

Open **Materials/M\_DiceMaster** in the Material Editor. The face textures are assigned directly to **Texture Sample** nodes in this master material; they are not texture fields in the Data Asset or texture parameters exposed by `MI_Dice`.

Select each sample node and replace its **Texture** in the Details panel:

| Material group | Current texture    | Replace with                                                        |
| -------------- | ------------------ | ------------------------------------------------------------------- |
| Dice Mask      | `T_Dice_Numbers`   | Your numbered face mask.                                            |
| Dice Mask      | `T_Dotted_Dice`    | Your dotted face mask.                                              |
| Dice Mask      | `T_Dice_Unkown`    | Your unknown face mask; the supplied asset name uses this spelling. |
| Dice Normals   | `T_DiceNumbered_N` | Your numbered normal map.                                           |
| Dice Normals   | `T_DiceDotted_N`   | Your dotted normal map.                                             |
| Dice Normals   | `T_DiceUnknown_N`  | Your unknown normal map.                                            |

Replace the textures while preserving the existing connections, then **Apply** and **Save** the material. Keep normal maps configured as normal maps when importing them.

Preserve the runtime scalar parameters **UseNumberedDice** and **Unknown**:

* `UseNumberedDice`: 0 = dots, 1 = numbers.
* `Unknown`: 0 = reveal the selected style, 1 = unknown markings.

These parameters let the Blueprint change appearance for each die and each permitted viewer. A static switch cannot replace either runtime control.

Changing `M_DiceMaster` affects all material instances that inherit from it. If you need the original and custom artwork to coexist, duplicate the master first, replace the texture samples in that copy, and create a material instance from it.

## 4. Assign the custom dice in your Data Asset

Under **Appearance → Dice**:

1. Set **Dice Mesh** to your imported mesh.
2. Set **Dice Material** to `MI_Dice` if you edited the existing master, or to an instance of your custom master.
3. Enable **Use Numbered Dice** for numbers, or disable it for dots.

Set colours, **Switch Colors** and **Normal Int** in the material instance. The runtime system handles revealing and hiding through the same material; no separate unknown material is needed.

Assign the Data Asset to **BP\_DiceManager → Dice Configuration** before initialization.

## 5. Match the face values

The supplied face mapping is under **Advanced → Face Mapping**:

| Local face | Value |
| ---------- | ----- |
| +X         | 2     |
| -X         | 5     |
| +Y         | 3     |
| -Y         | 4     |
| +Z         | 1     |
| -Z         | 6     |

Put the correct number or pip pattern on each corresponding face. Keep the supplied orientation and mapping for compatibility with the existing forced-result poses.

If you change the face arrangement, review both face detection and forced-result orientation; changing the face-mapping fields alone should not be assumed to update every forced pose.

## 6. Check your custom asset

Check that the mesh collides and settles correctly at your intended sizes, each upward face reports the matching value, and forced results 1–6 show the requested face. Also check numbered, dotted and unknown appearances, including owner-only visibility for private rolls.

Size limits and the adjustment step are under **Advanced → Dice Size**. Settling thresholds are under **Advanced → Settling**.

For the material's runtime behaviour, see [Materials, Meshes and Dice Size](https://plugn-play.gitbook.io/ultimate-dice-system/materials-and-meshes.md). For all preset fields, see [Settings Reference](https://plugn-play.gitbook.io/ultimate-dice-system/settings.md).

A D12 or D20 requires additional result detection and forced-result logic; replacing the D6 mesh and textures does not add support for more faces.
