Lumo Greenscreener
Green-screen catalogue pictures for clothing, props and vehicles.
Version 1.0.0 · Frameworks QBCore · Qbox · ESX · standalone · Requires screenshot-basic, yarn
Takes catalog pictures of GTA clothing, props and vehicles in front of a green screen and keys the green out. lumo-clothing uses it to make its shop thumbnails (admin panel → item editor → capture, single or bulk).
Free and open source under GPL-3.0: a Lumo-maintained fork of fivem-greenscreener by Bentix. Upstream credits and the licence are kept below and in LICENSE. Framework independent: QBCore, Qbox, ESX and standalone.
You only need it when you want to make thumbnails. Shops work without it (they show a placeholder picture). You can start it, take your pictures, and stop it again.
Install
- Put
lumo-greenscreenerin yourresourcesfolder (keep this exact name). - You need two things from Cfx:
- yarn (ships with every FXServer in
[cfx-default]): installs this resource's JS packages on first start. The first start needs internet and takes a minute. - screencapture (recommended, Qbox ships it) or screenshot-basic. Run only one of the two.
- yarn (ships with every FXServer in
- Add to
server.cfg, in this order, with lumo-greenscreener before lumo-clothing:
cfg
# who may take pictures
add_ace group.admin lumo.greenscreener allow
# BOTH are required. Two different resources write during a capture:
# screencapture saves the raw PNG the client captured
# lumo-greenscreener creates the catalog folders, then re-saves the cropped
# and green-keyed PNG and the webp over the top
add_filesystem_permission screencapture write lumo-clothing
add_filesystem_permission lumo-greenscreener write lumo-clothing
# WebP conversion runs cwebp (the webp-converter package); child processes are
# blocked by default. Without this you only get PNGs, which the shop does not load.
add_unsafe_child_process_permission "lumo-greenscreener"
ensure yarn
ensure screencapture # or screenshot-basic
ensure lumo-greenscreener
ensure lumo-clothingUsing screenshot-basic instead of screencapture? Change the first permission line to add_filesystem_permission screenshot-basic write lumo-clothing.
- Restart the server. Pictures land in
lumo-clothing/web/images/catalog/and the shop picks them up straight away. If you start greenscreener later than clothing, that also works: clothing re-applies its picture folder whenever greenscreener starts.
If a capture fails
The two failures look different and appear at different moments:
# missing the screenshot resource's grant -- fails mid-capture
Filesystem write permission check from 'screencapture' ... - write not allowed
[screencapture] upload error: Error saving file to disk
Capture failed: image file not found (try again).
# missing this resource's grant -- fails before any capture starts
Filesystem write permission check from 'lumo-greenscreener' ... - write not allowed
[greenscreener] SetGreenscreenerOptions error: Access to this API has been restricted.
# missing the child-process grant -- captures fine, but no WebP is produced
Child process permission check from 'lumo-greenscreener' ... cwebp.exe - child spawn not allowed
[greenscreener] processing error: Access to this API has been restricted.The child-process failure is the quiet one: nothing is lost, but every image stays a PNG. If you would rather not grant it, set "outputFormats": ["png"] in config.json so the resource stops trying to convert -- but the catalog is sized for WebP, and PNGs are several times larger across a few thousand images.
The resource named in the permission-check line is the one missing its grant.
screenshot-basic or screencapture?
Prefer screencapture. It is the maintained successor; citizenfx/screenshot-basic has seen almost no development and is widely reported as awkward to build.
No code change is needed to switch. This resource calls exports['screenshot-basic'].requestClientScreenshot(...), and screencapture's manifest declares provide 'screenshot-basic' — so that call resolves to it automatically. That is also why a Qbox server, which ships screencapture, works here without screenshot-basic installed at all, and why the permission error names screencapture even though nothing in this resource mentions it.
Run one, not both. Two resources answering the same name is ambiguous; which one receives the call is not something you want to leave to load order.
Beyond being maintained, screencapture adds webp and jpg encoding, video capture, and size limits. This resource still asks for PNG and converts afterwards, so those extras are not used yet — the reason to prefer it is maintenance, not features.
Clothing administrators are also authorized through the clothing permission check. Standalone users need the lumo.greenscreener ACE. Paths are configured only on the server with SetGreenscreenerOptions. A failed WEBP conversion retains the PNG. Paths containing spaces are supported. No canvas native build dependency remains.
A small script that allows you to take screenshots of every gta clothing, prop/object or vehicle against a greenscreen. You can use them for example in your inventory, clothing store or vehicle store.
Using the images
You are granted the freedom to utilize the images in your open-source projects with proper accreditation. For commercial usage, please reach out to me on Discord to discuss the conditions.
Services Offered
For a fee, I offer a service where I generate the images for you. You can also send me your custom clothing, vehicles or props, and I will include them. Contact me on Discord at ben.001 for inquiries.
Key Features
- Capture screenshots of every GTA clothing item, including addon clothing
- Capture screenshots of all objects and props in GTA, including addon props
- Capture screenshots of every vehicle in GTA, including addon vehicles
- Screenshots are labeled comprehensively for seamless integration into your scripts
- Minimalistic progress UI for user convenience
- Almost completely invisible ped
- Customizable camera positions through configuration settings
- Option to enable cycling through texture variations
- Automatic removal of the greenscreen backdrop (courtesy of @hakanesnn)
- Utilizes a large greenscreen box (thanks to @jimgordon20)
Planned Updates
- Feel free to share any ideas or suggestions for future enhancements!
Installation
Dependencies
- screenshot-basic
- yarn
Step 1
Simply place the resource in your resources folder.
Category subfolders are supported; output defaults to the actual resource directory.
Usage
Screenshot all clothing
Execute the command /screenshot to initiate the clothing screenshot process. Be patient as it may take some time to complete, and it's advisable not to interfere with your PC during this operation.
Screenshot specific clothing
Utilize the command /customscreenshot to capture a specific clothing item, with optional custom camera settings specified in the format outlined in config.json.
/customscreenshot [component] [drawable/all] [props/clothing] [male/female/both] [camerasettings(optional)]
/customscreenshot 11 17 clothing male {"fov": 55, "rotation": { "x": 0, "y": 0, "z": 15}, "zPos": 0.26}
/customscreenshot 11 all clothing male {"fov": 55, "rotation": { "x": 0, "y": 0, "z": 15}, "zPos": 0.26}
Screenshot objects/props
To screenshot objects or props, employ the command /screenshotobject [hash].
Example Usage: /screenshotobject 2240524752
Screenshot vehicles
Capture screenshots of vehicles using /screenshotvehicle [model/all] [primarycolor(optional)] [secondarycolor(optional)].
Example Usage: /screenshotvehicle all 1 1
/screenshotvehicle zentorno 1 1
Stopping a run
/cancelcapture stops whatever is running and restores weather, camera and controls. Sweeps (/screenshot, all variants) skip a shot that fails and keep going; the HUD counts saved and failed shots.
Driving captures from another resource
CustomScreenshot takes the same arguments as /customscreenshot. Put a tag in the settings table to be told when the image is on disk:
lua
AddEventHandler('lumo-greenscreener:captureFinished', function(tag, ok, err)
-- tag is whatever you passed; ok is false with err on failure
end)
exports['lumo-greenscreener']:CustomScreenshot(11, 17, 'CLOTHING', 'male',
{ selectedTexture = 0, tag = 'my-resource:42' })To capture many items one call at a time, wrap them in a batch. Weather sync stays paused, and the ped model and camera stay in place between calls, so each item skips the set-up. The HUD shows your progress. A batch ends by itself after 30 s with no capture or progress call.
lua
exports['lumo-greenscreener']:BeginBatch('Jackets', 120, 'Backspace') -- label, total, stop hint
exports['lumo-greenscreener']:BatchProgress(done, 120)
exports['lumo-greenscreener']:EndBatch()/cancelcapture during a batch fires lumo-greenscreener:batchCancelled so the caller can stop its own loop. lumo-clothing's thumbnail capture uses all of this.
Examples



Support
For assistance or further inquiries, you can reach me on Discord ben.001.
Support the Project
If you wish to support this project, consider buying me a coffee on ko-fi. Your support is greatly appreciated! ❤️