Thumbnail shooter
Part of cc_illumium. The clothing rack shows a picture of each piece of clothing when web/thumbs/ has one, and a numbered tile when it does not. The shooter makes those pictures in game. It dresses a
Part of cc_illumium. The clothing rack shows a picture of each piece of clothing when web/thumbs/ has one, and a numbered tile when it does not. The shooter makes those pictures in game. It dresses a ped on a green screen one drawable at a time, takes a screenshot, removes the green and saves a 256 px webp.
You run it once, and again each time you add a clothing pack.
Before you start
- A screenshot resource must be running:
screencapture(itschip's, the newer one) or the classicscreenshot-basic. The shooter looks forscreencapturefirst, thenscreenshot-basic(ShooterConfig.Capture.provider = 'auto'inshared/shooter_config.lua; set it to one name to force that one). Without either the command refuses and says why. - Give yourself the permission in
server.cfg:add_ace group.admin cc_illumium.shooter allow - The server must be able to write into its own
cc_illumium/web/thumbs/folder. If your host makes resource folders read-only, run the shooter on a local copy of the server.
Running it
In game, in chat or the F8 console:
/illumium_shoot [male|female|both] [category|all] [from] [to]
/illumium_shoot_stop| Example | What it shoots |
|---|---|
/illumium_shoot | Both bodies, every category, every drawable |
/illumium_shoot male tops | Male tops only |
/illumium_shoot female shoes 120 | Female shoes from drawable 120 to the last one |
/illumium_shoot both hats 0 40 | Hats 0 to 40 for both bodies |
The categories are tops undershirts arms legs shoes bags armour decals masks chains hats
glasses ears watches bracelets (the ids in shared/constants.lua).
While the job runs:
- You are moved to a private routing bucket, so nobody sees you or the studio.
- The screen shows the studio camera and a small progress card. The HUD, the radar, the clock and the weather are held until the job ends. Your own ped is frozen where you stood.
/illumium_shoot_stopends the job at any time. Everything is put back: your bucket, camera, HUD, clock and weather. What was saved so far is kept.- The job also ends by itself when it finishes, when you disconnect, when the resource stops, and when the server hears nothing from your client for 90 seconds.
Each job ends by rewriting web/thumbs/index.json, the list the menu reads. Drawables that no longer exist (past the last one the game reports) are taken off the list.
How long it takes
Plan on 1 to 1.5 seconds per drawable: streaming, settling, the screenshot, keying, and the upload. The base game has roughly 2,000 to 2,500 drawables per body, so:
| Job | Roughly |
|---|---|
One category (e.g. male tops) | 5 to 12 minutes |
| One body, every category | 40 to 60 minutes |
both all | 1.5 to 2.5 hours |
The job does not need you at the keyboard. Split a long run by category so that one crash does not cost the whole run.
After the run: ship the pictures
The files are written into the resource folder on the server:
cc_illumium/web/thumbs/<model>/<kind><slot>/<drawable>.webp
cc_illumium/web/thumbs/index.jsonFor example web/thumbs/mp_m_freemode_01/c11/47.webp is male top 47, and web/thumbs/mp_f_freemode_01/p0/3.webp is female hat 3.
- Restart the resource (
refreshthenensure cc_illumium) so clients download the new files. The manifest already listsweb/thumbs/**/*.webpandweb/thumbs/index.jsoninfiles {}; do not remove those lines. - Keep them with the resource. They are part of
cc_illumiumnow. If you updatecc_illumiumby replacing the folder, copyweb/thumbs/across first, or you shoot everything again. If you keep your server in git, commitweb/thumbs/. - Mind the download size. Every player downloads the pictures when they join. A full
both allrun is about 5,000 files and 50 to 80 MB. To make it smaller, shoot only the categories players browse most, or lowerShooterConfig.Output.size(for example to- or
qualitybefore the run.
- or
The run, step by step
- Test one category. Join as an admin. In chat type
/illumium_shoot male topsand leave the keyboard alone. A card at the bottom counts the tops; it takes 5 to 12 minutes. Chat says "Thumbnail job ended (done)" with the count. - Shoot the rest.
/illumium_shoot male all, then/illumium_shoot female all(40 to 60 minutes each). Splitting by body means one crash loses one body, not both./illumium_shoot_stopstops at any time and keeps what was saved. - Restart the resource so players download the new pictures. The shooter does it for you 5 s after a finished job when
ShooterConfig.RestartWhenDoneis true and the resource may restart itself:add_ace resource.cc_illumium command.restart allow. - Back the pictures up. They are written into
cc_illumium/web/thumbs/. Copy that folder somewhere safe: an update of the resource replaces the folder.
A full run is about 5,000 files and 50 to 80 MB, which every player downloads once. If that is too much, shoot only the categories players browse most, or lower ShooterConfig.Output.size to 192 before the run.
The invisible body
The pictures show the garment only, floating, with no head, arms or boxers (ShooterConfig.Matte.mode = 'diff'). How it works:
- The neutral outfit hides the body itself:
ShooterConfig.Basesets hair, arms, legs, feet, undershirt and top to drawable-1, which the game does not draw. Only the bald head is left on the green screen, so a garment always sits on green, never on skin. Pale clothes no longer get holes where they looked like skin or white boxers, and the inside of an open jacket comes out see-through. (0.2.2. Before that the body was bare and only the matte removed it.) Since 0.2.3 the ped holds the character creator's arms-down stance instead of crossed arms, and any gap the garment fully surrounds is kept as cloth (Matte.fillHoles). - When a category starts, the ped stands in the neutral outfit, frozen on one frame of a standing pose, and the shooter takes a base frame. It takes a second one a moment later and compares the two. They must match (
Matte.maxNoise), or it tries again (3 times). If they never match, that category falls back to the old look with the body (Matte.fallback = 'key') and the console says so. - For each drawable it takes the dressed frame with the same camera, light, time and weather. The page keeps only the pixels that differ from the base frame and are not green. The bald head, bare arms, boxers and backdrop all disappear because they did not change.
- It removes specks, fills pinholes, softens the edge, then crops to the garment's own box with a little space around it and centres it in the 256 px square.
- Small pieces have their own settings in
ShooterConfig.PerCategory. Watches and bracelets keep the bare arms in both frames, so they have a wrist to sit on. Bracelets use the right-hand camera. Decals are printed on a plain tee. Earrings use a lowerminArea. (0.2.5: in the first full run every watch and bracelet came out as nothing.) - A drawable that changes nothing (top 15 is the bare torso) gives an empty picture. It is listed under
noneinweb/thumbs/index.json, and the menu shows a None tile for it.
Check 5 samples before a long run (owner)
- Have this version live and
restart cc_illumium. - In game as admin:
/illumium_shoot male tops 48 52. It takes about 15 seconds. - Look at the five files
web/thumbs/mp_m_freemode_01/c11/48.webpto52.webpon the VPS. Open them in a browser or in Windows Photos. Or restartcc_illumium, open a clothing store, go to Tops and scroll to 48 to 52. - What good looks like: the top alone on a transparent background, centred, with no skin showing where the body would be, and clean edges.
- If something is off, change
shared/shooter_config.lua, restart and shoot the same 5 again:- Specks of skin or body edges left → raise
Matte.tolerance(18 → 24). - Holes in pale or skin-tone cloth → lower
Matte.tolerance(18 → 12), or raiseMatte.cleanup(2 → 3). - A cap's shadow on the forehead kept → lower
Matte.shadow.minRatio(0.55 → 0.45). - Too tight or too loose →
Matte.padding. Tiny items too big → raiseMatte.minCrop. - The console says the base frame moved → set
Matte.baseEach = true. It is twice as slow, but every item gets its own fresh base frame.
- Specks of skin or body edges left → raise
To try the settings without the game, tools/shooter/matte-preview.html runs the same matte on two frames you drop in (base and dressed), with demo pairs painted on the freemode render. To use it, serve the repo root over http (python -m http.server 7531) and open /tools/shooter/matte-preview.html.
Limits of the method:
- Cloth the same colour and brightness as the skin under it can lose pieces. Lowering the tolerance helps.
- A drawable that only changes a hidden area (an undershirt under nothing) gives a small or empty picture.
- Gloves and arms (
c3) show only the hands that changed. - Eyes can blink between frames. The cleanup removes small specks, and the base frame check catches the rest.
- Nothing here changes how anyone else looks: the ped is local to the shooting admin, and no texture is replaced or streamed.
Addon clothing
Addon packs (streamed .ydd/.ytd for the freemode peds) add drawables after the base game's, so their pictures are the highest numbers in each category.
- Install and
ensurethe pack beforecc_illumium, then restart the server so the pack is streamed. - Find the first new drawable: open a clothing store, go to the category, and note the number of the first new tile (or count from the base game's last one).
- Shoot only the new range, for example
/illumium_shoot male tops 512. The pictures already there are kept. - If the pack renumbers "nothing on" drawables (bare torso, no shoes), the neutral body looks wrong. Fix it in
ShooterConfig.Baseinshared/shooter_config.lua. - A drawable that does not stream within
ShooterConfig.Timing.preloadTimeout(4 s) is counted as failed and skipped. On a slow disk, raise it and shoot that range again.
Settings
Everything is in shared/shooter_config.lua, each line with a note: the studio spot, the camera per focus (head, torso, legs, feet, hands), the green box, the fill light, the time and weather, timeouts, the output size and the key. The server enforces its own hard limits whatever the file says: only the two freemode models, only real category slots, integer drawables up to 4,095, and no file over 256 KB.
Why a drawn green box and not a prop? The backdrop is a box of flat polygons drawn around the ped every frame (DrawPoly). It needs no streamed asset, has no collision, and cannot fail to load, which a custom green prop can. The studio sits high above the sea, so no building or tree is ever in the frame.
If something goes wrong
| What you see | Why, and what to do |
|---|---|
| "No screenshot resource is started" | ensure screencapture (or ensure screenshot-basic) in server.cfg, restart |
| "cannot write to web/thumbs (folders missing or read-only)" | The job stops after the first 5 writes fail. The console line just above says why: the path, the byte count, what SaveResourceFile returned, whether the folder is there (its .gitkeep), and whether io and os.execute are available. The resource ships every folder (web/thumbs/<model>/<kind><slot>/.gitkeep); FXServer cannot create them itself. If you copied the resource without its dot files, copy web/thumbs/ again from the release. If the folders are there, the resource folder is read-only for the server process |
SaveResourceFile wrote N of M bytes (cut at a NUL byte) | That server's runtime truncates binary data. The shooter has switched to writing through io for the rest of the job; nothing to do |
| Pictures have a green edge | Raise ShooterConfig.Key.tolerance a little (for example to 85) |
| Green clothes lose their colour | Lower ShooterConfig.Key.tolerance (for example to 55) |
| Pictures are cut off or too small | Tune that focus in ShooterConfig.Cameras or Output.crop, then shoot that category again |
| The menu still shows numbers | Restart the resource so clients download the new files |
Start over: /illumium_shoot reset
/illumium_shoot reset forgets every picture, which empties web/thumbs/index.json. It then shoots both bodies in every category. When the job finishes, the shooter restarts cc_illumium after 5 s (ShooterConfig.RestartWhenDone), because players only download new files when the resource restarts. That restart needs add_ace resource.cc_illumium command.restart allow in the server's permissions. Picture URLs carry ?v= from index.json, so a browser can never show a cached old picture (0.2.6). Before this, players saw the morning's body pictures mixed with the evening's clean ones.