# Capture panel

The Capture panel photographs every clothing item, prop, hair style, beard and tattoo on a green screen, removes the background and stores one image per item.
Those images are the tiles players see in the editor and the shop.
It is also where you give items a name and a price.

:::frame{caption="Auto capture: green screen, ghost cut-out, then the tile."}
![Auto capture animation](https://pub-57d6558d0e204696b4cdeee5d172e561.r2.dev/appearance/capture-auto.fd5aa181cd.gif)
:::

## Access

:::steps

### Turn it on

`Config.Koja.Capture.Enabled = true` and `screenshot-basic` started.
If the resource has another name, set it in `Config.Koja.Capture.ScreenshotResource`.

### Be an admin

You need the ace in `Config.Koja.Capture.AdminGroup` (default `group.admin`) or a framework group from `Config.Koja.Capture.FrameworkGroups`:

```cfg title="server.cfg"
add_principal identifier.license:YOUR_LICENSE group.admin
add_ace resource.illenium-appearance command.add_ace allow
```

Every capture callback checks the permission again on the server.

### Open it

Open the editor (`/pedmenu`, or any shop) and click **Admin Panel** in the top toolbar.
The button appears only for admins.
Capture needs a freemode ped (male or female) or a ped from `Config.Koja.Capture.Models`.

:::

## Choose where images are stored

On the first run a dialog asks where to store the images. **Decide later** is allowed.

:::frame{caption="The first-run storage dialog."}
![Storage dialog](https://pub-57d6558d0e204696b4cdeee5d172e561.r2.dev/appearance/capture-storage-dialog.171e81d8b5.webp)
:::

You can change it any time on the **Storage** tab; the setting only affects new shots — images already captured stay where they are.

| | Folder `shots/` | Fivemanage (recommended) |
| --- | --- | --- |
| Where | `shots/<gender>/<category>/<drawable>[_<texture>].webp` inside the resource | Your Fivemanage account. The database stores only the URL |
| Setup | None | A free account and an API key |
| After capturing | **Restart the resource** so FiveM registers the new files | Nothing, images show at once |
| Size | The resource grows with every image | The resource stays small; players load images from the CDN |

### Setting up Fivemanage

:::steps

### Create a key

Create a free account at [fivemanage.com](https://fivemanage.com), open the **Media** product and create an API key with upload access.

### Save it

Paste it into **Fivemanage API key** and press **Save and verify**.
The key is checked with a test upload, saved in the database and shown masked.

### Manage it

**Test key** checks it again. **Remove key** deletes it and switches storage back to the folder.

:::

The server must be able to reach `api.fivemanage.com`.

:::frame{caption="The Storage tab with a verified key."}
![Storage tab](https://pub-57d6558d0e204696b4cdeee5d172e561.r2.dev/appearance/capture-storage.b6b48a33ef.webp)
:::

## The panel

The panel has four tabs: **Camera**, **Item**, **Batch** and **Storage**.
Pick the gender (**Male** / **Female**), the ped (**Select ped**) and the category on the left; browse items with the asset and texture steppers.
The preview shows the **Saved** image next to the **New** shot.

:::frame{caption="The Capture panel on the Camera tab."}
![Capture panel](https://pub-57d6558d0e204696b4cdeee5d172e561.r2.dev/appearance/capture-panel.ebeaf07075.webp)
:::

### Camera

- **FOV**, **zPos (height)**, **rot (rotation)** and **Distance** move the camera. The preview is live.
- **Hide ped parts**: parts hidden while shooting this category (for example hats when shooting masks).
- **Save preset** keeps the camera and the hide list for this category and gender. **Reset** goes back to the defaults.
- **Ghost shots (clothes only)**: every item is shot twice, dressed and with the slot empty, and only the pixels that changed are kept — no body, head or hands in the image. Hair and beard are shot with the head.

### Item

:::frame{caption="Item tab: With textures, name and price."}
![Capture item tab](https://pub-57d6558d0e204696b4cdeee5d172e561.r2.dev/appearance/capture-item.734f2c9cab.webp)
:::

- **Retake** shoots the current item and overwrites its image at once.
- **Name and price**: the name shown on the tile and the price (`0` = FREE). **Save meta** stores them in the database; the menu and the shop update immediately.
- **With textures**: one image per texture variant (`4_0`, `4_1`, ...) instead of one per drawable. The editor then shows a tile per variant. A dialog asks first, because capture time and disk use multiply by the number of textures. Turning it off goes back to one image per drawable; the texture shots stay on disk.
- **Hair look**: hair colour, highlight and beard density, so hair and beard shots look right.

### Batch

:::frame{caption="Batch tab: auto runs and Capture everything."}
![Capture batch tab](https://pub-57d6558d0e204696b4cdeee5d172e561.r2.dev/appearance/capture-batch.1f15a09229.webp)
:::

| Button | What it does |
| --- | --- |
| **Auto from here** | Shoots every item from the current one to the end of the category |
| **Restart to end** | Starts again from the first item |
| **Stop** | Finishes the current item, then stops |
| **Capture everything** | Shoots every ticked category from the first item in one run. Uploads run in the background while the next items are shot |
| **Only missing images** | Skips items that already have an image |
| **Both genders** | Runs for male and female |

Identical images in a row (duplicates) are skipped.
Progress (`current / total`) is shown while it runs.

:::hint{type="warning" title="Folder mode needs a restart"}
After capturing in Folder mode, restart the resource once so the new files are served.
In Fivemanage mode nothing needs a restart.
:::

## Capturing tattoos

The category list has a **Tattoos** group with one category per tattoo zone: torso, head, left / right arm, left / right leg, and any custom zone in `Config.Tattoos`.
Hair fades are not captured. The group checkbox ticks every zone at once.

:::frame{caption="Tattoo shots with InkOnly: only the ink, no body."}
![Captured tattoo images](https://pub-57d6558d0e204696b4cdeee5d172e561.r2.dev/appearance/tattoos-carousel.71457f22ac.gif)
:::

- Every tattoo is shot on a naked, bald body (`Config.Koja.TattooCapture.Naked`, `BaldHead`) with a mid skin tone (`SkinTone`), with only that one tattoo on.
- Each zone is shot from several views and the views are put side by side in one image: torso front + back, head from 4 sides, arm outer side + front, leg front + side + back. Change them with `Config.Koja.TattooCapture.Views`.
- With `InkOnly = true` the images show only the ink, without the body.
- The camera sliders and **Save preset** work as for clothes; the rotation is added to every view.
- **Retake**, **Auto from here**, **Capture everything**, **Only missing images** and **Both genders** include the ticked tattoo zones.
- Files: `shots/<gender>/tattoo_<zone>/<tattoo name>.webp` (the name is reduced to `A-Z a-z 0-9 _ -`), or Fivemanage.
- **Tattoo name** sets the name shown on the tile. Tattoo prices still come from `Config.TattooCost` (or `cost` in `shared/tattoos.lua`) when `Config.ChargePerTattoo` is on.

The player's own skin, clothes and tattoos come back when you leave the panel.

## Tips for clean shots

- Images blurry or half loaded: raise `Config.Koja.Capture.SettleMs` and `TextureSettleMs`.
- Body still visible in ghost shots: raise `Ghost.Threshold` a little, or set `Ghost.Debug = true` to save the raw frames to `capture_debug/` and look at them. Turn it off afterwards.
- A perfect ghost shot without any cut-out: add a freemode clone with an invisible body to `Config.Koja.Capture.Models`.
