Command Palette
Search for a command to run...
SCREENSHOT STUDIO#
The studio configuration (config/studio.lua) controls automated preview image generation for clothing items.
Overview#
The Screenshot Studio generates preview images for all clothing items, enabling a visual catalog in the UI. This is essential for servers with custom addon clothing.
Safe Delay#
Set the capture delay to ensure clothes are fully loaded:
config/studio.luaStudio.SafeDelay = 100
| Value | Description |
|---|---|
100 | 100ms delay (default, recommended) |
| Higher | More stable but slower generation |
| Lower | Faster but may capture incomplete renders |
If preview images appear incomplete or show T-pose, increase the SafeDelay value.
Environment Settings#
Configure the studio environment for consistent screenshots:
config/studio.luaStudio.Environment = { weather = 'EXTRASUNNY', time = { hour = 12, minute = 0 }, freezeWeather = true, freezeTime = true }
| Option | Type | Default | Description |
|---|---|---|---|
weather | string | 'EXTRASUNNY' | Weather during capture |
time.hour | number | 12 | Hour (0-23) |
time.minute | number | 0 | Minute (0-59) |
freezeWeather | boolean | true | Prevent weather changes |
freezeTime | boolean | true | Prevent time progression |
Available Weather Types:
EXTRASUNNY- Clear, bright lighting (recommended)CLEAR- Clear skiesCLOUDS- OvercastOVERCAST- Heavy clouds
Ped Head Blend Data#
Configure the face blend for screenshot peds:
config/studio.luaStudio.PedHeadBlendData = { male = { shapeFirst = 0, shapeSecond = 0, shapeThird = 0, skinFirst = 0, skinSecond = 0, skinThird = 0, shapeMix = 0.5, skinMix = 0.5, thirdMix = 0.0 }, female = { shapeFirst = 21, shapeSecond = 21, shapeThird = 0, skinFirst = 21, skinSecond = 21, skinThird = 0, shapeMix = 0.5, skinMix = 0.5, thirdMix = 0.0 } }
| Property | Range | Description |
|---|---|---|
shapeFirst | 0-45 | First parent face shape |
shapeSecond | 0-45 | Second parent face shape |
shapeMix | 0.0-1.0 | Blend between shapes |
skinFirst | 0-45 | First parent skin tone |
skinSecond | 0-45 | Second parent skin tone |
skinMix | 0.0-1.0 | Blend between skin tones |
Face Blend Shoot Clothes#
Clothes worn by the ped during face/appearance screenshots:
config/studio.luaStudio.FaceBlendShootClothes = { male = { torso = { collection = "base", localIndex = 15, texture = 0 }, pants = { collection = "base", localIndex = 21, texture = 0 }, shoes = { collection = "base", localIndex = 34, texture = 0 }, arms = { collection = "base", localIndex = 15, texture = 0 } }, female = { torso = { collection = "base", localIndex = 15, texture = 0 }, pants = { collection = "base", localIndex = 15, texture = 0 }, shoes = { collection = "base", localIndex = 35, texture = 0 }, arms = { collection = "base", localIndex = 15, texture = 0 } } }
These neutral clothes ensure the face is clearly visible without distracting clothing elements.
Camera Offset#
Base camera offset for all screenshots:
config/studio.luaStudio.CamOffset = { x = 0.0, y = 1.1 }
| Property | Default | Description |
|---|---|---|
x | 0.0 | Horizontal offset |
y | 1.1 | Distance from ped |
Per-Component Camera Settings#
Configure camera position and angle for each component type:
config/studio.luaStudio.Settings.Camera = { face_skin = { offset = { x = 0.0, y = 0.6, z = 0.65 }, rotation = { x = 0.0, y = 0.0, z = 180.0 }, fov = 30.0 }, mask = { offset = { x = 0.0, y = 0.7, z = 0.6 }, rotation = { x = 0.0, y = 0.0, z = 180.0 }, fov = 35.0 }, hair = { offset = { x = 0.0, y = 0.7, z = 0.7 }, rotation = { x = -5.0, y = 0.0, z = 180.0 }, fov = 30.0 }, torso = { offset = { x = 0.0, y = 1.2, z = 0.2 }, rotation = { x = 0.0, y = 0.0, z = 180.0 }, fov = 45.0 }, pants = { offset = { x = 0.0, y = 1.4, z = -0.3 }, rotation = { x = 0.0, y = 0.0, z = 180.0 }, fov = 45.0 }, shoes = { offset = { x = 0.0, y = 1.2, z = -0.8 }, rotation = { x = 10.0, y = 0.0, z = 180.0 }, fov = 40.0 }, hat = { offset = { x = 0.0, y = 0.8, z = 0.75 }, rotation = { x = -10.0, y = 0.0, z = 180.0 }, fov = 30.0 }, glass = { offset = { x = 0.0, y = 0.5, z = 0.65 }, rotation = { x = 0.0, y = 0.0, z = 180.0 }, fov = 25.0 }, watch = { offset = { x = -0.3, y = 0.6, z = 0.0 }, rotation = { x = 0.0, y = 0.0, z = 150.0 }, fov = 30.0 }, bracelet = { offset = { x = 0.3, y = 0.6, z = 0.0 }, rotation = { x = 0.0, y = 0.0, z = 210.0 }, fov = 30.0 } }
| Property | Type | Description |
|---|---|---|
offset.x | number | Horizontal offset from ped |
offset.y | number | Distance from ped |
offset.z | number | Vertical offset |
rotation.x | number | Camera pitch |
rotation.y | number | Camera roll |
rotation.z | number | Camera yaw (facing direction) |
fov | number | Field of view (zoom level) |
Studio Position#
World coordinates where the studio ped is spawned:
config/studio.luaStudio.Settings.Position = vector3(-1043.44, -2745.65, 21.36)
Choose a location that's isolated from players and NPCs to prevent interference during generation.
Output Image Sizes#
Configure the resolution of generated preview images:
config/studio.luaStudio.CommandsData = { face_skin = { width = 256, height = 256 }, mask = { width = 256, height = 256 }, hair = { width = 256, height = 256 }, torso = { width = 256, height = 384 }, pants = { width = 256, height = 384 }, shoes = { width = 256, height = 256 }, hat = { width = 256, height = 256 }, glass = { width = 256, height = 256 }, watch = { width = 256, height = 256 }, bracelet = { width = 256, height = 256 }, accessory = { width = 256, height = 384 }, arms = { width = 256, height = 384 }, bag = { width = 256, height = 384 }, vest = { width = 256, height = 384 }, shirt = { width = 256, height = 384 }, decals = { width = 256, height = 384 }, ear = { width = 256, height = 256 } }
| Component Type | Typical Size | Aspect |
|---|---|---|
| Face items | 256x256 | Square |
| Body items | 256x384 | Portrait |
Debug Bypass#
Skip certain checks during development:
config/studio.luaStudio.Debug_bypass = { enable = false, skip_generation_check = false, force_regenerate = false }
| Option | Description |
|---|---|
enable | Enable debug bypass mode |
skip_generation_check | Skip checking if images exist |
force_regenerate | Regenerate all images regardless of existence |
Running the Studio#
Start Generation#
-- Via export exports['onex-creation']:startGeneration() -- Via RPC local result = rpc.call('onex_creation:startGeneration')
Stop Generation#
-- Via export exports['onex-creation']:stopGeneration() -- Via RPC local result = rpc.call('onex_creation:stopGeneration')
Monitor Progress#
The studio fires events during generation:
-- Progress updates RegisterNetEvent('onex-creation:generationProgress', function(current, total, category) print(string.format("Generating %s: %d/%d", category, current, total)) end) -- Completion RegisterNetEvent('onex-creation:screenshotComplete', function(category, itemId) print(string.format("Completed: %s item %d", category, itemId)) end) -- Errors RegisterNetEvent('onex-creation:screenshotError', function(category, itemId, error) print(string.format("Error in %s item %d: %s", category, itemId, error)) end)
Best Practices#
- Run during off-hours - Generation is resource-intensive
- Increase SafeDelay for addons - Custom clothes may load slower
- Use isolated location - Prevent player/NPC interference
- Generate in batches - For large clothing packs, generate categories separately
- Verify output - Check generated images for quality