Koja Scripts
Cloth Tool

3D Preview

The centre panel renders your garment on an actual mpmfreemode01 / mpffreemode01 ped, with your real .ytd textures applied.

3D Preview

The centre panel renders the selected garment on a real freemode ped — mp_m_freemode_01 or mp_f_freemode_01, extracted from your own GTA V install — with your .ytd textures applied. It is where you judge fit, texturing, clipping and silhouette before you build anything.

It is not a still image. The ped can play the game's own animations, and a garment that ships cloth data can be simulated.

Moving the camera

ActionControl
OrbitLeft drag
PanMiddle drag, right drag, or Shift + left drag
Turn the model under fixed lightsShift + middle drag
ZoomMouse wheel
Front / Back / Left / RightViewport options → Scene → Camera angle
Reset cameraViewport options → Scene → Reset camera

What the viewport draws

The Show menu in the viewport header switches between five ways of drawing the same mesh.

ModeWhat it is for
ShadedThe normal view — textures and lighting.
FlatNo texture and no shading. Silhouette and geometry on their own.
NormalsGeometry normals as colour. A face lighting up the wrong way here is inverted in game too.
UVsThe texture coordinates themselves — red across, green up.
CheckerAn even grid on the UVs. Squares that come out stretched are stretched in the texture too.

The same menu holds Wireframe (with its own colour, opacity and a Garment edges only switch that leaves the ped solid), Grid, Floor, Auto-rotate and Only model, which hides the ped and shows the selected garment on its own.

The corner readout gives polygons, vertices and indices for the garment — not for the whole scene.

Viewport options

The gear opens three tabs.

Lighting

Time of day is one slider, and it is the whole lighting rig. It moves the sun, its colour, and the light coming off the sky — every hour has its own sun, sky and exposure, the way the game does it.

Under it, Jump to has six presets: Dawn, Morning, Noon, Golden hour, Dusk and Night.

Shadows makes the ped cast onto itself and onto the floor.

Scene

Backdrop — Studio, Charcoal, White, Greenscreen, Cyclorama, Sunset, Night, Overcast, or Use your own image. The first four are flat colours, which is what a cut-out or a green screen needs. Greenscreen is deliberately kept flat: it must not pick up a horizon or a tint, or it stops being a green screen.

Also here: Camera angle, Reset camera, Rotate speed and LOD, which switches between the model's detail levels.

Body

Hide the base body / Only selected garment strips everything else away.

The ped presets are Default, Dressed and Naked. Below them, Component IDs lets you set each slot by hand to check how your item sits inside a full outfit — -1 means none. Reset components puts them back.

Animation

Enable animation in the viewport plays a clip on the ped. Under Clips you get every clip from the game's own dictionaries, by the name the game knows it by; under Your clips, anything you have made or added yourself. Speed scales playback.

This is what a garment actually has to survive. A coat that reads perfectly in bind pose can fold through the leg the moment the ped walks.

See Animations for making your own clips.

Cloth

A garment that ships a .yld simulates in the viewport, using the constraints and pinned points from the file itself. See Cloth simulation.

When there is no ped

The preview needs your GTA V install to put a body under the garment. If it says so, point the tool at the game in Settings, then Extract base ped — it reads your game files once and caches the result.

A garment with no .ytd draws plain grey. That is the tool telling you it found no texture, not a rendering fault.

Textures not showing

If a garment renders untextured, it is nearly always one of two things: the .ydd has no UV coordinates, so there is nothing for a texture to map onto, or the texture names do not match what the model references.

Switch Show to UVs — if the model shows no coordinates there, that is your answer. See Common Errors.

  • Building — When your project is ready, hit Build and choose the FiveM target.
  • Importing — Select an item and click Import .ydd / .ytd (or right‑click an item → import).
  • Interface — The main window is split into three panels.
  • Items and Textures — An item is one garment or prop.
  • Texture Optimization — Hand-made clothing packs are usually bloated and full of textures the game doesn't like — odd sizes, no mipmaps, wrong compression.
  • Team Collaboration — The Cloth Tool has Git‑based collaboration built in, so a team can work on the same pack without emailing folders around — and you get a full, restorable history of every change.
  • About the Tool — back to the section overview