Jump to content

Mod Loader/Reference/Garment starter

From Threadbox

Download the workshop ZIP for the original OBJ, exporter, meshes, and images. The placket still has seam and fit problems; use a spare save when testing it.

Panel files

File Triangles Base panel
pieces/back.mesh.json 202 1
pieces/front-right.mesh.json 127 2
pieces/front-left.mesh.json 87 3
pieces/placket.mesh.json 20 0

The base is Split Crew Neck Bodice, variant 0. The base-panel numbers above choose which panel zones and grain settings each imported mesh inherits.

Panel preparation

The original OBJ contains four objects. The placket is a closed shape: two surfaces joined by thin side walls. Its front and reverse surface occupy the same UV area, while the walls have no UV area. Those walls cannot form a cutting pattern.

The exporter keeps one placket surface and removes the reverse surface and walls. After triangulation, this reduces the model from 496 to 436 triangles. It keeps the original positions and UVs and does not scale or move the model. For another OBJ, inspect its panels and UVs before reusing this cleanup.

Images

icon.png is a 256-pixel square mesh projection. sketch.png is a 512-pixel square projection with triangle edges. Both have transparent backgrounds and can be replaced with your own artwork.

Saved IDs

The garment ID is yuuma.side-placket-top.top. The custom tag is yuuma.side-placket-top.SidePlacket. Use your own pack ID for a different mod; keep an existing ID when updating that item.

Known problems

  • Placket seam: only one edge on the placket has both endpoints aligned with an edge on the smaller front panel. The rest of that join doesn't line up vertex-for-vertex. Check this join if the game shows a missing or unusually short seam.
  • Sketch: the supplied sketch shows mesh triangles and doesn't fit the sketchbook page well. Replace it with a drawing sized for the page.
  • Fit: the pack loads, but a complete cut-and-sew test and final mannequin fit have not been verified. Use a spare save and follow the garment testing steps before using it in a released pack.

Open the model in Blender

  1. Open Blender. Delete the default cube, then choose File > Import > Wavefront (.obj) and select the OBJ.
  2. Find the four objects in the Outliner. Select each one and press the numpad decimal key to frame it.
  3. Open UV Editing. In Edit Mode, select all faces to inspect the pattern layout.
OBJ object Part Exported mesh
sideplacket_top_b Back back.mesh.json
sideplacket_top_r Large front panel front-right.mesh.json
sideplacket_top_l Smaller front panel front-left.mesh.json
sideplacket_placket Narrow placket strip placket.mesh.json

The OBJ is already in metre-sized game coordinates, about 35.2 cm high. Do not move it to the origin or scale it to millimetres. Keep it in position relative to the mannequin. You can inspect and edit it in Blender; the supplied exporter can also read the original OBJ without opening Blender.

Prepare and export the panels

Run export_panels.py to split the supplied model into .mesh.json panels. Packs with separate OBJ panels can use those files directly.

The exporter separates the OBJ into the four panel files above. It also removes the placket's overlapping reverse surface and thin side walls. That cleanup is specific to this model; see the panel preparation notes before adapting the script for another OBJ.

Install Python 3 if you do not already have it. Open PowerShell in the extracted workshop folder and run:

python .\export_panels.py '.\sideplackettop (1).obj' .\side-placket-top

On macOS, use python3 and forward slashes. It overwrites the four files in side-placket-top/pieces, leaving your manifest and images alone. Copy the folder first if you have edited those meshes.

The UVs become the flat cutting pattern. When you reshape a panel, check both the UVs and the edges where it meets other panels. See the example's known problems under Sewing and fit.

Choose the base and panel mapping

This example uses Split Crew Neck Bodice, variant 0. Its base panel indices come from BepInEx/config/DressmakerMods/garment-reference.json, written when Mod Loader starts. Open that file and search for the component ID when mapping your own garment.

Our mesh basePanel Inherited zone
Back 1 BodiceBack
Large front, OBJ _r 2 BodiceFront, BodiceLeft
Smaller front, OBJ _l 3 BodiceFront, BodiceRight
Placket 0 BodiceFront

The OBJ's left/right names differ from the base's zone names. Match the geometry and side of the mannequin instead of matching names. Panel numbers begin at zero. Providing a panels list replaces the base variant's entire panel list, so include every panel you intend to keep.

The base also supplies a natural-waist skirt connection and sleeve compatibility. Changing the mesh does not create new attachment rules. Test the skirt and sleeves you intend to use with your top.

Back to the Mod Loader guide