ATY Scripts Logo
ATY Scripts/Docs/Clothing/How To Take Images

How To Take Images

How To Take Images

The menu can show a picture of every item: clothing, accessories, hair, face types, makeup and the other overlays. aty_clothing takes these pictures itself. An admin runs /clothingphotos, and the built-in photo studio photographs every item on a green screen, cuts the background out and uploads the result to Fivemanage.

Nothing is resized or converted by hand, and nothing is stored in the resource. The images live on Fivemanage's CDN, and the server keeps the list of links.

**Coming from an older version?** You no longer need `fivem-greenscreener` or a resizing app. The studio replaces both, and it reads the game's frames itself: `screenshot-basic` is no longer needed for it (keep it if other resources on your server use it).

What you need

Requirement Why
A Fivemanage API key The images are hosted on Fivemanage.
A green room The default setup expects the GreenscreenFiveM MLO. A map-free fallback is described below.
Admin rights Only clothing admins can open the studio. See Clothing for how admin access works.

1. Add your Fivemanage key

Create an API key in your Fivemanage dashboard and add it to server.cfg:

set aty_clothing_fivemanage "YOUR_FIVEMANAGE_API_KEY"

Restart the server, or type the same line into the server console to apply it right away.

Use **`set`**, never `setr`. `setr` sends the value to every connected player, and anyone holding the key can upload to your account.

For the same reason the key never goes into config.lua, because that file is sent to players. The studio never gives the key to any client. The server hands the admin's game a single-use upload link for each photo instead, and each link expires after ten minutes.

2. Set up the green room

GreenscreenFiveM MLO (default)

The default studio position in Config.Photos.Studio is inside the GreenscreenFiveM MLO. Drop the MLO into your resources and ensure it in server.cfg:

ensure GreenscreenFiveM
ensure aty_clothing

The room is green on every side, which gives the cleanest cut-out. You do not need to change anything in the config.

No map: the game's own green screen

If you cannot stream a map, let the studio place the game's green-screen prop behind the ped:

Config.Photos = {
    Studio = {
        Coords = vector3(15.288, 704.0064, 345.8101), -- where the ped stands
        Heading = -150.5,                             -- which way it faces
        Backdrop = "prop_ld_greenscreen_01",          -- false = expect a green room at Coords
        BackdropDistance = 1.6,                       -- how far behind the ped the screen stands
    },
}

The default Coords point is inside the MLO. With the prop, move it to a quiet, open spot.

3. Check before you start

Type this into the server console:

clothingphotos

It asks Fivemanage for one real upload link, so a wrong key shows up here rather than on the first photo of a run:

[aty_clothing] Fivemanage key: accepted
Console says What to do
Fivemanage key: NOT SET Add the set aty_clothing_fivemanage line from step 1.
Fivemanage key: REJECTED by Fivemanage The key is wrong or was revoked. Create a new one.
could not reach Fivemanage The server cannot reach api.fivemanage.com. Check its firewall and network.
unexpected answer from Fivemanage (HTTP …) Fivemanage answered with an error. Try again later.

4. Run the studio

Join the server as an admin and type:

/clothingphotos

The studio panel opens on the right. Choose what to photograph:

Section Options
Models Male, Female
Clothing Torso, T-shirt, arms, pants, shoes, mask, chain, bags, bulletproof vest, decals
Accessories Helmet, glasses, ears, watches, bracelets
Head Hair, Face types (the 46 heritage faces)
Makeup, hair & skin Beard, eyebrows, makeup, lipstick, blush, blemishes, ageing, complexion, sun damage, moles, chest hair, body blemishes, additional body blemishes
Every texture Photographs every colourway, not just the first one. The menu can then preview each colour, but a run takes many times longer.
Skip what is already photographed On by default. Only items without a photo are taken, so you can stop and continue later.
Test run Takes 10 items from each chosen slot into a separate test folder instead. See Test run below.

Press Start. Your character stays where it is, and your camera moves to the studio. There, a stand-in model that only you can see:

  1. stands in the clothing shop's try-on pose, held perfectly still, facing the camera (or turned, for bags, shoes and wrists);
  2. wears one item at a time, and each item is photographed, cut out and uploaded;
  3. is already wearing the next item while the previous photo is still processing and uploading.

The panel shows the progress and the last image. Use Pause / Resume to take a break and Stop to end the run early. Photos that are already taken are kept. When the run ends, the camera returns to your character.

Your own character is never dressed, so nothing on it can end up in a photo: no worn inventory items, and no clothes that another resource puts back. Your weapons and your outfit are untouched as well.
**While it runs**
  • Keep the game window in the foreground.
  • Turn off graphics mods (ENB, ReShade, visual packs). They tint the green, and the background will not cut out cleanly.

The studio holds the time and weather for you, and nobody else on the server is affected.

When a run ends, the server console prints one line with the count and the speed. A run you stopped says (stopped), and a run that ended on an error prints that error on a second line:

[aty_clothing] photo studio: <done> done, <failed> failed of <queued> queued in <total>s — <each>s per photo (capture <ms>ms, key + upload <ms>ms alongside)

What you get

  • 512 × 512 WebP images on a transparent background, cropped tight to the item.
  • Every piece is shown on its own: each slot starts with a shot of the bare model, and whatever that shot already had (the head and neck) is taken out of the piece's photo. Face types and makeup keep the head, because there the head is the piece.
  • Green pieces keep their colour. The bare shot also shows the exact green of the screen behind every pixel, so only that green is removed, not a green bag or shirt.
  • Pieces worn on the head (masks, hats, glasses, earrings) are photographed twice, the second time with the model in a dark skin and different eyes. Whatever changed between the two photos is the model; whatever did not is the piece. So a cap's brim that happens to be the colour of the forehead is not cut out with it, and nothing of the face is left next to a pair of earrings.
  • Stored on Fivemanage under aty_clothing/<gender>/<kind>/<slot>/<drawable>_<texture>.webp. The first folder comes from Config.Photos.Folder. The files are marked retention-exempt, so a retention policy on your Fivemanage account does not delete them.
  • The server records which link belongs to which item in photos/<gender>_<kind>_<slot>.json. An update package never contains these files, so it cannot overwrite them.
When you update, copy the new files over the old folder. Do not delete the folder first, because that also deletes `photos/` and every link recorded in it. The photos stay on Fivemanage, but the menu would no longer know which item they belong to.

Players see the pictures by turning on Show Preview in the menu's hint bar.

If a clothing item has no studio photo, the menu falls back to the image an older setup created in a clothes resource (nui://clothes/images/...). Previews you already had keep working until you photograph those slots again.

Sharing a run between players

A full run is long, and it goes as many times faster as there are players working on it. In the studio panel, open Players, tick everyone who should help (yourself included, or not) and press Start. The run is split into equal blocks, one per player, and each player photographs their block on their own game. Nobody has to be an admin: for as long as their part of a run an admin started is going, the server lets them upload and record, and then it stops.

  • Everyone who is picked gets the studio panel on their screen, with Pause and Stop to leave their part. Their own character is not touched, as in a normal run.
  • Your panel lists every part with its progress. Stop on the admin's panel stops all of them.
  • Every player's game must list the same items, so everyone needs the same game build and the same clothing packs. The console warns when two games list a different number.
  • A test run is not shared.

From the server console, clothingphotos run <id>,<id>,<id> [skip] [textures] … starts a shared run, clothingphotos stop all stops it, and part=<k>/<n> makes one game take block k of n by hand. The console prints one line per player when their part ends and one line when the whole run does.

Test run

Before a full run, or after you change a camera, take a test run. It photographs 10 items from each chosen slot, spread over the whole range and the same 10 every time, so you can compare one test run with the next. The photos go to a separate _test folder on Fivemanage. The menu's photos and the records in photos/ are not touched.

  • From the panel: turn on Test run and press Start.
  • From the server console, on a clothing admin who is in the game:
clothingphotos test <player id> [male|female] [c<slot> p<slot> o<overlay> hair faces] [n=<per slot>] [d=<drawable,…>]
clothingphotos stop <player id>

With no slots named, every slot is tested. clothingphotos test 1 male c5 c11 tests only the male bags and tops of player 1, and clothingphotos test 1 male p0 d=111,195 only those two hats.

A full run can be started from the console the same way:

clothingphotos run <player id> [male|female] [c<slot> p<slot> o<overlay> hair faces] [skip] [textures] [since=<unix time>]

Without skip every item is photographed again; textures takes every colourway. An item that comes out empty loses any older photo it had, so a stray speck from an earlier run does not stay in the menu. since=<unix time> picks a long run up again after it was stopped: whatever was photographed since that moment is skipped and everything else is taken. The console prints a progress line every 250 items.

A full run with every texture is tens of thousands of photos. A game that has been running for hours streams slowly, and items start failing with `notLoaded`. Stop the run, restart the game, and continue with the same `since=` value.

When the run ends, the console prints one line per slot:

[aty_clothing] photo test male c5: 10/10 ok, head moved up to 0.0mm | cut off: 41(b)
Note Meaning
failed: 12 empty Drawable 12 has nothing to photograph. Normal for the "none" items of a slot.
cut off: 41(b) Drawable 41 ran off the picture: t top, b bottom, l left, r right. The slot's camera needs a wider fov or a different z.
small: 3(140px) Drawable 3 was 160 pixels or less across in the frame, so its photo looks soft even as a thumbnail. Use a lower fov.
head moved up to …mm How far the stand-in moved between the bare shot and the photo. Anything above 0 means the pose is not held; see Pose below.

Every photo's link and measurements are written to photos/_test.json.

Addon clothing

The studio reads the number of drawables and textures from the game, so streamed clothing packs are included automatically. After you add a new pack, run the studio again with Skip what is already photographed on, and only the new items are photographed.

Photographing again

Turn Skip what is already photographed off to redo a slot. New photos replace the old links in the records. The old files stay on Fivemanage until you delete them from the dashboard.

Adjusting the framing

Each slot has its own camera in Config.Photos.Cameras:

Cameras = {
    c = {                                            -- clothing, by component slot
        [11] = { fov = 55, z = 0.26, turn = 0.0 },   -- tops
        [5]  = { fov = 50, z = 0.20, turn = 180.0 }, -- bags, from behind
        -- ...
    },
    p = {                                            -- accessories, by prop slot
        [0] = { fov = 30, z = 0.75, turn = 0.0 },    -- hats
        [6] = { fov = 13, bone = 18905, z = 0.02, turn = -90.0 }, -- watches, from the side
        -- ...
    },
    face = { fov = 18, z = 0.65, turn = 0.0 },
    overlay = {
        face = { fov = 11, bone = { 25260, 27474, 20623 }, z = 0.0, turn = 0.0, frame = true },
        body = { fov = 22, bone = 24818, z = 0.0, turn = 0.0, frame = true },     -- chest hair, body blemishes
        [8]  = { fov = 4, bone = { 29868, 11174, 61839, 20623 }, z = -0.012, turn = 0.0, frame = true }, -- lipstick
        -- ...
    },
},
Key Meaning
fov Camera zoom. Lower is closer.
z Height the camera looks at, relative to the studio point.
turn How far the ped turns away from the camera. 0 faces it head-on, and the ped then also looks into the lens. By default only bags (from behind), and shoes, watches and bracelets (from the side) turn away.
dist Optional. Camera distance in metres. The default is 1.2.
frame Optional. Keeps the camera's own framing (the middle square of the picture) instead of cropping to the piece's outline. Makeup, beards and the other face overlays use it for a close-up of the feature.
pack Optional. Puts the two halves of the picture side by side, so a pair of earrings is not shown across a whole head.
clear Optional. A band down the middle of the picture, as a share of its width each side, where the piece never is. Earrings clear the face between the ears.
fill Optional. Every hole the piece closes in on is filled back as part of it, so a fur or skin-coloured mask has no holes; the eyes show through a mask's eye holes.
minSize Optional. A result smaller than this share of the picture's height counts as empty: an empty mask, hat or glasses slot leaves only a speck.
flip Optional. Photographs each item a second time with the model in another skin, and keeps only what did not change. Used for masks, hats, glasses and earrings; it makes those slots about twice as slow.
fillLimit Optional, with fill. How large a closed-in hole may be and still be filled back, as a share of the model's head. Hats use 0.45, so a helmet's visor shows the face behind it instead of half of it.
minPiece Optional. A loose bit next to the piece smaller than this share of it is left out.
bone Optional. The camera looks at this bone of the ped instead of the middle, and z becomes an offset from it. A list of bones aims at their middle. Gloves and bracelets use the right hand (57005), watches the left hand (18905), and shoes the middle of both feet and toes ({ 52301, 20781, 14201, 2108 }), so the piece fills the picture instead of a whole body.

Config.Photos.HairColor sets the colour that hair, beards, eyebrows and chest hair are photographed in (hair palette), and Config.Photos.MakeupColor the colour of eye makeup, blush and lipstick (makeup palette). Config.Photos.Light is a soft light from the camera, so a face is not half in shadow; false turns it off.

Config.Photos.Pose is the animation the stand-in holds, on its first frame, for the whole run:

Pose = {
    male = { "clothingshirt", "try_shirt_base" },
    female = { "mp_clothing@female@shirt", "try_shirt_base" },
},

If the clip does not play, the console says so and the stand-in is not held still. The head is then not taken out of the photos cleanly.

Troubleshooting

Symptom Cause and fix
Panel says No Fivemanage key Add the convar from step 1 and restart.
Panel says the game cannot read its own frame The game's browser has no WebGL. Update the FiveM client and check that GPU acceleration is on.
The run stops right after it starts Fivemanage rejected the key. Run clothingphotos in the server console to see why.
Photos show the world instead of a cut-out item The green room is not there. Make sure the MLO is started, or set Backdrop as shown in step 2. Check for graphics mods as well.
A few items fail with empty Normal. Some slots contain blank drawables with nothing to photograph.
Items fail with noFrame The frame could not be read within 10 seconds. Keep the game in the foreground.
Items fail with notLoaded, or a run gets slow The item did not stream in within 12 seconds, so it was not photographed and its old photo was kept. A game that has been running for hours streams slowly; restart the game and run again with Skip what is already photographed on (or clothingphotos run <id> skip).
Items fail with providerUnreachable or http… The upload to Fivemanage failed. Check the server's connection and your Fivemanage plan limits.
Photos were taken but the menu shows none Turn on Show Preview in the hint bar.
ATY Scripts LogoATY SCRIPTS

Des scripts FiveM hautement optimisés pour QBCore & ESX. Performance maximale, code précis, zéro lag.

Rejoindre la communauté

Partenaire

Partenaire officiel de Tebex. Paiement sécurisé et intégration Cfx.re Keymaster.

Mentions légales

Non affilié à Rockstar Games, Cfx.re, FiveM ou Take-Two Interactive. Les achats sont soumis aux CGU de Tebex.

© 2026 ATY SCRIPTS. Tous droits réservés.