Perceptive Full-Auto Metering Lighting
Procedural presets Β· LuxPro direction Β· viewport auto exposure Β· live tuning Β· viewport overlay
English Β· δΈζ Β· ζ₯ζ¬θͺ
RollLux is a Blender 5.0+ extension that analyzes a reference photo and builds a ready-to-tune light rig β key, fill, rim, accent, and world ambient β so you can replicate cinematic, portrait, product, and stylized looks without hand-placing every light.
Select.Object.Generate.Lights.Procedural.random.strategies.and.light.distribution.mp4
Match.Lighting.to.Image.Based.on.color.distribution.mp4
Auto.Light.Adjustment.Automatically.adjusts.intensity.based.on.metering.results.mp4
Every strategy thumbnail and library reference is procedurally generated in code β shaded spheres, gradient maps, and light blobs β not hand-picked stock photos. Roll Random anytime for a fresh combo, or step through named starting points that share the same generative pipeline.
Drop in a reference, hit Generate, and refine with real-time sliders. Works with Cycles and Eevee, fully offline, zero pip installs.
| Author | ACGGIT |
| Blender | 5.0.0 or newer |
| Engines | Cycles Β· Eevee |
| Dependencies | None (uses Blenderβs bundled NumPy) |
| Feature | What you get |
|---|---|
| π― Reference analysis | Key / fill / ambient colors, contrast, mood, color temperature |
| π§ LuxPro direction | Portrait-tuned light direction (left, right, top, backlightβ¦) with confidence |
| π¨ Dual-tone gel lights | Blue + red/magenta (and similar) each get their own accent SPOT |
| β‘ Split & hard light | Sharp terminators β SPOT key, minimal fill, auto contrast / shadow seeding |
| ποΈ Live tuning | Intensity, exposure, distance, rotation, saturation, shadows, highlights, contrast |
| πΈ Auto exposure | Viewport sampling in Rendered mode; TRIM / LOG / P60 metering, EV bias, fast converge, LIGHT_RIG bake |
| π§© Quick / Pro UI | Compact Quick workflow or full Pro panel with advanced AE, rig, and per-light controls |
| π² Procedural presets | Strategy thumbnails & distribution refs generated in code β random roll yields new looks every time |
| ποΈ Strategy picker | Named starting styles + Random Β· procedural shaded-sphere previews Β· step navigation |
| πΌοΈ Distribution library | Built-in reference images procedurally synthesized (gradients, blobs, rim, vignetteβ¦) |
| π‘ 1β8 lights | Hue-diverse k-means palette matched to light count |
| π§ Per-light edit | Toggle, recolor, energy, softness, delete |
| π Lock light colors | Keep palette when re-generating or stepping presets |
| πͺ Floating overlay | Pin reference in viewport (opacity, scale, corner) |
| π Open image | Load a reference image from disk |
| π Localized UI | English / δΈζ / ζ₯ζ¬θͺ via Blender language preferences |
π RollLux vs manual lighting setup
| Manual rig | RollLux | |
|---|---|---|
| Start from reference photo | β | β |
| Auto direction + color | β | β |
| Dual gel / accent detection | β | β |
| Random roll | β | β |
| Procedural preset & ref generation | β | β |
| Live slider updates | β | β |
| Viewport auto exposure | β | β |
| Fully offline | β | β |
π Add your own captures to ./assets/ β filenames above are the expected paths.
- Download
rolllux-5.5.5.zipfrom Releases. - Blender β Edit β Preferences β Get Extensions β βΌ β Install from Diskβ¦
- Select the zip β enable RollLux.
See CHANGELOG.md for changes since 5.0.
π οΈ Build from source
cd rolllux
py dev/gen_assets_main.py # optional: regenerate thumbnails & reference PNGs
py build.py # -> ../dist/rolllux-<version>.zip
py build_marketplace.py # -> ../dist/rolllux-<version>-marketplace.zip (Extension Platform)- 3D Viewport β N β RollLux tab.
- Load a reference image (a procedurally generated default is applied on first open).
- Pick a Strategy preset or tap π Random for a freshly generated style.
- Optionally change Lighting Distribution (procedural library) or use your own photo.
- Select your subject β Generate Lighting.
- Tune Intensity, Contrast, Shadows, Highlights, Saturation β updates apply live.
- Switch the 3D View to Rendered shading and enable Auto Exposure (on by default) β see Auto Exposure below.
- Use Quick for a compact panel, or Pro for full AE and rig controls.
RollLux 5.0 ships a viewport-based auto exposure (AE) system that reads live pixels from the 3D View and keeps your scene at a stable luminance target β without leaving Blender or rendering to disk.
- While AE is on, RollLux samples the viewport framebuffer on a timer (requires Material or Rendered shading; Rendered is preferred).
- A 10Γ10 sample grid is collected over the metering region, with optional center weighting and per-frame grid jitter to reduce moirΓ© misreads.
- Samples are converted to luminance and aggregated with your chosen metering mode.
- The plugin computes the EV gap to the target and applies it either to Color Management exposure or light rig energy (via
intensity Γ 2^EV). - Tap Apply (β) to bake the current AE offset into permanent settings and turn AE off.
Tip: If the viewport is not in Rendered mode, use the panelβs Set Rendered control or switch shading manually before expecting AE to react.
| Quick | Pro | |
|---|---|---|
| AE toggle | Camera icon + EV Bias + Apply | Same in the exposure row, plus AE Mode |
| Advanced AE | Hidden | Full Auto Exposure box: apply target, sampling, speed, gamma, jitter, fast converge, live EV readout |
Switch UI Mode at the top of the panel between Quick and Pro.
| Mode | Best for |
|---|---|
| Average | General-purpose; mean luminance of the sample region |
| Median | Noisy or high-contrast scenes; resists outliers |
| 60th Percentile (P60) | Slightly brighter than median β good for portraits |
| Trim Mean | Drops top/bottom 10% before averaging β robust for mixed backgrounds |
| Log Average | HDR-ish mixes; geometric mean in log space |
| Highlight | Protect highlights; meters toward the 85th percentile |
| Reference | Target = mean luminance of your reference image (falls back to 18% grey if unavailable) |
All modes blend full-frame and center samples according to Center Weight (0β100%).
| Apply to | Behavior |
|---|---|
| Color Management | Writes scene.view_settings.exposure live; optional Parameter Correction (gamma) while AE is active. Apply bakes exposure into CM and disables AE. |
| Light Rig | Adjusts ae_value and scales all light energy through Intensity (Γ 2^EV). Manual Exposure slider is locked while active. Apply multiplies Intensity by the accumulated EV and disables AE. |
Light Rig mode includes Cycles-aware safeguards: luminance must settle between steps, adaptation is rate-limited, and timing scales with render engine noise β reducing flicker when Cycles is still converging.
| Preset | Description |
|---|---|
| Full Frame | Entire viewport weighted equally |
| Balanced | 70% center weight (default) |
| Center | Meters only the dense center grid |
| Subject Frame | Camera border in camera view, or center 60% in free view |
| Custom | Manual Center Weight slider |
In camera view without Subject Frame, the plugin can also crop to the camera frame automatically.
| Control | Purpose |
|---|---|
| EV Bias | Exposure compensation in stops added on top of the computed target |
| AE Speed | How quickly EV moves toward the target (Light Rig mode caps speed adaptively) |
| Parameter Correction | CM gamma tweak while AE drives Color Management |
| Jitter | Rotate the sample grid each frame to reduce moirΓ© misreads |
| Fast Converge | Stop when remaining error or the next EV step is below 0.1 stops |
| Live readout | Current CM exposure or Light Rig EV while AE is running |
| Apply (β) | Bake AE β CM exposure or Intensity, then turn AE off |
Portrait / product (CM path)
- Generate lighting β switch viewport to Rendered.
- AE Apply to: Color Management Β· Mode: P60 or Trim Mean Β· Sampling: Balanced.
- Set EV Bias if the face should sit slightly brighter or darker.
- When happy, click Apply to bake exposure into the scene.
Iterative light tuning (Light Rig path)
- AE Apply to: Light Rig Β· enable Fast Converge for quicker settling.
- Tweak colors and rig sliders while AE keeps overall brightness stable.
- Apply when done to fold EV into Intensity and continue manual tuning.
Match reference brightness
- Load reference β Analyze (or Generate).
- AE Mode: Reference β target luminance comes from the reference image analysis.
- Use EV Bias for fine matching.
Main panel
| Control | Description |
|---|---|
| Reference image | File browser or procedural library |
| Strategy | Procedurally generated style presets + Random (new thumbnail each roll) |
| Lighting Distribution | Procedurally generated reference images + Random |
| Generate / Analyze / Clear | Build rig Β· analyze only Β· remove rig |
| Tuning sliders | Intensity, exposure, AE, distance, rotation, height, colors, tone |
| UI Mode | Quick compact layout or Pro with full Auto Exposure block |
| Auto Generate | Timer-based re-roll (interval slider) |
Advanced panel
| Control | Description |
|---|---|
| Mode | Portrait / Scene / Auto |
| Aim At / Orient By | Target & axis mapping |
| Light Count | 1β8 lights |
| LuxPro | Enable direction detection |
| Lights list | Per-light color, energy, delete |
| Analysis | Sampled colors, LuxPro label, mood, Kelvin |
| Auto Exposure | Apply target, metering mode, sampling preset, speed, bake β see Auto Exposure |
Tips for best results
- Portraits β keep the face centered; avoid blown-out backgrounds.
- Split / hard light β let RollLux seed Contrast and Shadows (unlock sliders first).
- Gel / neon β use Light Count β₯ 3 so key + accent + rim are all created.
- Direction β enable LuxPro; use Rotate to fine-tune the rig orbit.
Drive RollLux from chat: γη» Suzanne ζ portrait ε γ, Light the Cube with golden hour, or Apply Arcane-style lighting.
Full release only β install
rolllux-*.zipfrom GitHub Releases. The Extension Platform build (-marketplace.zip) does not include the MCP bridge.
Cursor / Codex ββstdioβββΊ rolllux_mcp ββTCP :9886βββΊ Blender (RollLux panel βΆ Start MCP)
- Blender β enable RollLux β N panel β βΆ Start MCP (port 9886).
- Python β
cd rolllux/mcp && py -m pip install -e . - AI client β configure once (below).
Detailed guide: mcp/README.md
Create or edit .cursor/mcp.json in your workspace root:
{
"mcpServers": {
"rolllux": {
"command": "cmd",
"args": ["/c", "py", "-m", "rolllux_mcp"],
"cwd": "rolllux/mcp",
"env": {
"PYTHONPATH": "rolllux/mcp",
"BLENDER_HOST": "localhost",
"BLENDER_PORT": "9886"
}
}
}
}If you cloned only the rolllux repo, copy .cursor/mcp.json.example and set cwd to the absolute path of rolllux/mcp.
Then Cursor Settings β MCP β enable rolllux and restart Cursor.
Add to ~/.codex/config.toml (or trust the project and use rolllux/.codex/config.toml):
[mcp_servers.rolllux]
command = "py"
args = ["-m", "rolllux_mcp"]
cwd = "C:/path/to/your/clone/rolllux/mcp"
enabled = true
tool_timeout_sec = 180
[mcp_servers.rolllux.env]
PYTHONPATH = "."
BLENDER_HOST = "localhost"
BLENDER_PORT = "9886"Or: codex mcp add rolllux -- py -m rolllux_mcp (then set cwd and env).
In a Codex session, run /mcp to confirm tools are listed.
Template: .codex/config.toml.example
Example 1 β Portrait (Cursor)
You: Check Blender, list meshes, then light Suzanne with portrait and 4 lights.
Agent calls:
check_blender()
list_scene_objects(limit=20)
light_object(object_name="Suzanne", preset="portrait", light_count=4, auto_exposure=true)
Example 2 β Reference preset (Codex)
You: Clear RollLux and relight my selection using reference golden_hour.
Agent calls:
clear_rolllux_lighting()
light_selection(reference_preset="golden_hour", preset="cinematic")
Example 3 β Stylized look (any client)
Select the target mesh in Blender, then:
You: Apply Arcane teal + amber lighting on the active object.
Agent calls:
list_scene_objects()
light_arcane(intensity=0.22, light_count=4)
Style tools (light_jinx, light_doraemon, light_cyberpunk, β¦) use the active object; use light_object(name=β¦) when you need a specific mesh by name.
| Tool | Purpose |
|---|---|
check_blender |
Connection + RollLux installed |
list_scene_objects |
Scene mesh names |
light_object |
Light a named object |
light_selection |
Light active selection |
clear_rolllux_lighting |
Remove rig |
light_arcane, light_jinx, β¦ |
Stylized looks (active object) |
- Viewport comparison overlay (reference vs render)
- Preset export / import from current rig
- Batch generate for shot lists
- Optional AI reference tagging (offline heuristics first)
Run py test_offline.py (no Blender required). Optional: blender --background --python test_blender.py. UI or lighting changes should include screenshots.



