SHOPPING CART

Onex

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.lua
Studio.SafeDelay = 100
ValueDescription
100100ms delay (default, recommended)
HigherMore stable but slower generation
LowerFaster 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.lua
Studio.Environment = { weather = 'EXTRASUNNY', time = { hour = 12, minute = 0 }, freezeWeather = true, freezeTime = true }
OptionTypeDefaultDescription
weatherstring'EXTRASUNNY'Weather during capture
time.hournumber12Hour (0-23)
time.minutenumber0Minute (0-59)
freezeWeatherbooleantruePrevent weather changes
freezeTimebooleantruePrevent time progression

Available Weather Types:

  • EXTRASUNNY - Clear, bright lighting (recommended)
  • CLEAR - Clear skies
  • CLOUDS - Overcast
  • OVERCAST - Heavy clouds

Ped Head Blend Data#

Configure the face blend for screenshot peds:

config/studio.lua
Studio.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 } }
PropertyRangeDescription
shapeFirst0-45First parent face shape
shapeSecond0-45Second parent face shape
shapeMix0.0-1.0Blend between shapes
skinFirst0-45First parent skin tone
skinSecond0-45Second parent skin tone
skinMix0.0-1.0Blend between skin tones

Face Blend Shoot Clothes#

Clothes worn by the ped during face/appearance screenshots:

config/studio.lua
Studio.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.lua
Studio.CamOffset = { x = 0.0, y = 1.1 }
PropertyDefaultDescription
x0.0Horizontal offset
y1.1Distance from ped

Per-Component Camera Settings#

Configure camera position and angle for each component type:

config/studio.lua
Studio.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 } }
PropertyTypeDescription
offset.xnumberHorizontal offset from ped
offset.ynumberDistance from ped
offset.znumberVertical offset
rotation.xnumberCamera pitch
rotation.ynumberCamera roll
rotation.znumberCamera yaw (facing direction)
fovnumberField of view (zoom level)

Studio Position#

World coordinates where the studio ped is spawned:

config/studio.lua
Studio.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.lua
Studio.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 TypeTypical SizeAspect
Face items256x256Square
Body items256x384Portrait

Debug Bypass#

Skip certain checks during development:

config/studio.lua
Studio.Debug_bypass = { enable = false, skip_generation_check = false, force_regenerate = false }
OptionDescription
enableEnable debug bypass mode
skip_generation_checkSkip checking if images exist
force_regenerateRegenerate 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#

  1. Run during off-hours - Generation is resource-intensive
  2. Increase SafeDelay for addons - Custom clothes may load slower
  3. Use isolated location - Prevent player/NPC interference
  4. Generate in batches - For large clothing packs, generate categories separately
  5. Verify output - Check generated images for quality

Next Steps#