Fixing V-Ray Light Cache Leaks in Interior Renders

🎨 Nano Banana 2 Featured Image Prompt

"Ultra-photorealistic interior render of a modern minimalist living room with floor-to-ceiling windows, natural daylight streaming through sheer curtains, visible light bleeding artifacts on the left wall near a concrete partition, 8K resolution, architectural photography style, Canon EOS R5 lens simulation, soft volumetric haze, warm oak flooring, white plaster walls, mid-century furniture"

If you have spent any meaningful time rendering interior scenes in V-Ray, you have encountered the problem: mysterious bright patches or color bleeding on walls that should be in shadow, typically near corners where two wall planes meet or where a partition separates a sunlit area from a darker room. This is a Light Cache leak, and it is one of the most persistent and misunderstood rendering artifacts in architectural visualization.

The root cause is deceptively simple but the fix requires understanding how the Light Cache actually samples your scene geometry. Unlike the more precise Brute Force method, the Light Cache calculates indirect illumination by projecting samples from the camera into the scene in a grid pattern. When the sample density is insufficient relative to your wall thickness, samples can "see through" thin geometry — the LC interpolates light values across what it perceives as open space, even though a wall physically exists there in your model.

Diagnosing the Leak: Is It Actually the Light Cache?

Before adjusting any LC settings, you need to confirm the Light Cache is the actual culprit. Light leaks can also originate from Irradiance Map interpolation, insufficient wall geometry thickness, or even incorrect normal directions on wall faces. Here is a systematic diagnostic approach:

First, switch your secondary GI engine from Light Cache to Brute Force temporarily. Navigate to Render Setup → GI → Secondary Engine → Brute Force. Do a quick test render of the affected area. If the light leak disappears, you have confirmed it is an LC issue. If it persists, the problem lies elsewhere — check your geometry normals and wall thickness.

Second, use this MaxScript snippet to identify thin geometry in your scene that might be causing the leaks. This script scans all geometry objects and flags any with wall thickness below a threshold you define:

MaxScript-- RenderVault: Thin Geometry Detector for LC Leak Diagnosis
-- Flags objects with bounding box dimensions below threshold
(
    local threshold = 5.0  -- minimum acceptable thickness in scene units (cm)
    local thinObjects = #()

    for obj in geometry where not obj.isHidden do (
        local bb = nodeGetBoundingBox obj obj.transform
        local dims = bb[2] - bb[1]
        local minDim = amin #(dims.x, dims.y, dims.z)

        if minDim < threshold and minDim > 0.01 do (
            append thinObjects obj
            format "THIN: % | Min dimension: % cm | Pos: %\n" obj.name minDim obj.pos
        )
    )

    format "\n--- Found % objects below % cm threshold ---\n" thinObjects.count threshold

    -- Select thin objects for visual inspection
    if thinObjects.count > 0 do (
        select thinObjects
        format "Thin objects selected in viewport.\n"
    )
)

Run this in the MaxScript Listener (F11). Any objects flagged with dimensions under 5 cm — especially walls modeled as single-plane surfaces without extrusion — are prime candidates for light cache penetration. The fix for geometry-caused leaks is simple: extrude thin walls to at least 10-15 cm thickness.

The Actual Fix: Light Cache Parameters That Matter

Once you have confirmed the leak originates from the Light Cache, these are the exact parameters to adjust. I am listing them in order of impact — start with the first and only proceed down the list if the leak persists.

1. Increase LC Subdivisions

The single most impactful setting. Default is 1000. For interior scenes with partition walls, you typically need 1500–2500. For complex multi-room layouts with thin drywalls, push to 3000.

Navigate to: Render Setup → GI → Light Cache → Subdivs

The render time increase is roughly quadratic — doubling subdivisions approximately quadruples LC calculation time. However, the LC pass is typically a small fraction of total render time for interiors, so going from 1000 to 2000 might add 30-60 seconds to a render that takes 15 minutes total.

2. Reduce Sample Size

The Sample size parameter controls the world-space radius of each LC sample. Default is 0.02. For leak-prone scenes, reduce this to 0.01 or even 0.005. Smaller samples produce sharper GI detail but require higher subdivisions to avoid noise.

3. Enable Filter: Nearest

The LC filter type significantly affects how samples interpolate across geometry boundaries. Change from the default None to Nearest with a filter size of 0.02. This prevents the LC from interpolating across geometry boundaries, which is the primary mechanism behind light leaks.

MaxScript-- RenderVault: Apply Production LC Settings for Interior Scenes
-- Run before final render to set optimized Light Cache parameters
(
    local vr = renderers.current

    -- Verify V-Ray is active
    if classof vr != VRayRenderer and classof vr != V_Ray_6_Hotfix_3 do (
        messageBox "V-Ray renderer not active. Please set V-Ray as your renderer."
        return undefined
    )

    -- Light Cache settings
    vr.gi_on = true
    vr.gi_primary_type = 0        -- Irradiance Map
    vr.gi_secondary_type = 3      -- Light Cache

    -- Core LC parameters
    vr.lightcache_subdivs = 2000
    vr.lightcache_sampleSize = 0.01
    vr.lightcache_filter_type = 1  -- 0=None, 1=Nearest, 2=Fixed
    vr.lightcache_filter_size = 0.02
    vr.lightcache_storeDirectLight = 1
    vr.lightcache_showCalcPhase = true

    format "LC settings applied: Subdivs=2000, SampleSize=0.01, Filter=Nearest\n"
    format "Ready for production render.\n"
)

4. Store Direct Light in the Light Cache

Enable Store direct light in the LC rollout. This is counterintuitive — you might expect that including direct light would increase leak intensity. However, enabling this option gives the LC a more complete picture of the lighting distribution, which actually improves its interpolation decisions near geometry boundaries. The trade-off is a marginal increase in LC memory usage.

5. Use the Pre-filter Parameter

The Number of passes pre-filter setting defaults to 4. For leak-sensitive scenes, reduce this to 2 or 1. The pre-filter smooths the LC data before rendering, and excessive smoothing can smear light values across thin walls. Reducing passes keeps the LC data sharper at geometry transitions.

The Nuclear Option: Brute Force Secondary GI

If none of the above fully eliminates the leak — which can happen in scenes with extremely thin geometry like glass partitions or decorative screens — switch the secondary GI engine to Brute Force entirely. Set the secondary bounces subdivisions to 8-16. This eliminates LC interpolation artifacts completely at the cost of longer render times (typically 20-40% increase for interiors).

For production work with tight deadlines, a practical compromise is to use Brute Force secondary GI but limit it to 2-3 bounces. This catches the critical first-bounce indirect illumination where leaks are most visible, while still keeping render times manageable.

Prevention: Scene Setup Practices

The best fix is prevention. In every interior scene, establish these practices from the start:

  • Minimum wall thickness of 12 cm in all architectural models. Never use single-plane walls for interiors, even if the client provides them from their CAD export.
  • Seal all geometry gaps. The number one hidden cause of light leaks is small gaps at wall-floor or wall-ceiling junctions that are invisible at normal zoom levels but visible to the LC sampler. Use the MaxScript thin geometry detector above to audit your scene.
  • Separate interior and exterior lighting passes when possible. Use V-Ray's Light Select render element to isolate indirect illumination contributions and identify which light source is causing the leak.
  • Test LC settings on a cropped region before committing to a full-resolution render. Use the region render tool to render only the affected wall area at 50% resolution — this lets you iterate on LC parameters in 30-second cycles instead of waiting for full frames.

Summary: Recommended Production Settings

For a standard residential interior with 2-4 rooms and standard wall construction, these settings eliminate light cache leaks in 95% of cases while maintaining reasonable render times:

  • Light Cache Subdivs: 2000
  • Sample Size: 0.01
  • Filter: Nearest, size 0.02
  • Store Direct Light: On
  • Pre-filter Passes: 2
  • Wall Thickness: minimum 12 cm

For the remaining 5% of stubborn cases — glass partitions, decorative screens, or imported CAD models with paper-thin walls — switch secondary GI to Brute Force with 8-12 subdivisions and accept the render time increase. Your client will never accept visible light leaks in a final delivery, and the 20 minutes of extra render time is always cheaper than the revision cycle of trying to fix it in post.

Found a V-Ray scenario where these settings don't resolve the leak? Send us the details — we'll investigate and update this article with the solution.