Skip to content
Docs
Open Promoeyes
iridescence

iridescence

IRIDESCENCE — can a stack of thin-film glass throw a RAINBOW CAUSTIC on the floor, and which part of the engine has to do it?

Read the rig's notes
The short answer the five scenes argue: the material cannot. `iridescence`
on material=physical is a thin-film term on the SURFACE's own reflection —
it colours the slab, and not one photon of it reaches the floor. three.js
has no light transport through a transmissive mesh at all (a glass slab
either blocks a shadow map or is skipped by it), so the pool of colour under
the glass is always authored. The question is only WHERE it is authored:

  ir01 film      the baseline. Five blob slabs, `iridescence=1`, each at its
                 own `iridescence-thickness` so the film lands on a different
                 hue per slab. Nothing on the floor. This is what the
                 material alone buys.
  ir02 overlay   + step(name=caustics_overlay) + two <lens-flare>. Both are
                 SCREEN-SPACE: the overlay is a voronoi web multiplied over
                 the whole picture by luma (floor, glass, phone screen
                 alike), in one tint, and it does not know where the floor
                 is. The flare is a fullscreen additive optic. Sparkle, yes;
                 a caustic lying on the ground under the stack, no.
  ir03 cookie    a spot light whose `map` is cookie-caustics. The pattern is
                 real projected light: it lies on the floor in perspective,
                 wraps the phone, and stops at the cone. One colour.
  ir04 split     THE ANSWER. The same cookie through three spots — red,
                 green, blue — whose cones differ by 6% each. Where the three
                 webs land on each other they sum to white; the wider cones
                 magnify the slide more, so the webs slide apart with
                 distance from the beam axis and every filament grows a
                 red→blue fringe. That is what dispersion is, done with
                 three lights instead of a spectrum.
  ir05 all       ir04 + a hair of prismatic_dispersion and a high-threshold
                 bloom in post, and ONE small prism flare parked off the
                 silhouette as the glint. The overlay stays out: it adds
                 nothing the cookies have not already put on the floor, and
                 it veils the screen. Cost of the post split: it also
                 fringes the phone's small text — keep `amount` under 0.006.

THE FOUR THINGS THAT BITE
  1. The slabs do NOT cast shadows. A cookie only projects from a
     shadow-casting spot, and a shadow-casting spot is blocked by the glass —
     the caustic would vanish exactly where it belongs. So the glass opts out
     (cast_shadow=false) and the phone is the only caster.
  2. The floor is NOT white. Light adds; a floor already at 1.0 has nowhere
     to go and every colour clips to the same white. #d9d6d0 under a modest
     key leaves the headroom the red/green/blue pools are read in.
  3. `angle` is radians and a spot aims with `target`. Intensity is in the
     millions because decay=2 runs in millimetres.

  4. The slabs are ALPHA glass (opacity=0.4 transparent=true), not
     transmission. Transmission samples only the opaque scene behind a mesh,
     so a transmissive stack cannot see itself: every slab shows the floor
     and none shows the slab under it — five panes of milk. Alpha blending
     is what lets the overlaps mix. The price is that `dispersion` and
     `attenuation-*` (both transmission terms) do nothing here, and the film
     reflection is dimmed with the body, which is why ir01 is so quiet.

The slabs are extruded <path> outlines authored in mm around the origin and
laid flat with rotation="-90 …"; the local z spin is therefore a turn about
the world's vertical, which is the only motion they make.

Phone screen: iridescence.screens.html → scripts/html-screens.mts.
Preview: http://localhost:4444/runtime?project=promos/primitives/materials/iridescence/iridescence.promo
Scenes
5
Kind
reference rig
//
    IRIDESCENCE — can a stack of thin-film glass throw a RAINBOW CAUSTIC on the
    floor, and which part of the engine has to do it?

    The short answer the five scenes argue: the material cannot. `iridescence`
    on material=physical is a thin-film term on the SURFACE's own reflection —
    it colours the slab, and not one photon of it reaches the floor. three.js
    has no light transport through a transmissive mesh at all (a glass slab
    either blocks a shadow map or is skipped by it), so the pool of colour under
    the glass is always authored. The question is only WHERE it is authored:

      ir01 film      the baseline. Five blob slabs, `iridescence=1`, each at its
                     own `iridescence-thickness` so the film lands on a different
                     hue per slab. Nothing on the floor. This is what the
                     material alone buys.
      ir02 overlay   + step(name=caustics_overlay) + two <lens-flare>. Both are
                     SCREEN-SPACE: the overlay is a voronoi web multiplied over
                     the whole picture by luma (floor, glass, phone screen
                     alike), in one tint, and it does not know where the floor
                     is. The flare is a fullscreen additive optic. Sparkle, yes;
                     a caustic lying on the ground under the stack, no.
      ir03 cookie    a spot light whose `map` is cookie-caustics. The pattern is
                     real projected light: it lies on the floor in perspective,
                     wraps the phone, and stops at the cone. One colour.
      ir04 split     THE ANSWER. The same cookie through three spots — red,
                     green, blue — whose cones differ by 6% each. Where the three
                     webs land on each other they sum to white; the wider cones
                     magnify the slide more, so the webs slide apart with
                     distance from the beam axis and every filament grows a
                     red→blue fringe. That is what dispersion is, done with
                     three lights instead of a spectrum.
      ir05 all       ir04 + a hair of prismatic_dispersion and a high-threshold
                     bloom in post, and ONE small prism flare parked off the
                     silhouette as the glint. The overlay stays out: it adds
                     nothing the cookies have not already put on the floor, and
                     it veils the screen. Cost of the post split: it also
                     fringes the phone's small text — keep `amount` under 0.006.

    THE FOUR THINGS THAT BITE
      1. The slabs do NOT cast shadows. A cookie only projects from a
         shadow-casting spot, and a shadow-casting spot is blocked by the glass —
         the caustic would vanish exactly where it belongs. So the glass opts out
         (cast_shadow=false) and the phone is the only caster.
      2. The floor is NOT white. Light adds; a floor already at 1.0 has nowhere
         to go and every colour clips to the same white. #d9d6d0 under a modest
         key leaves the headroom the red/green/blue pools are read in.
      3. `angle` is radians and a spot aims with `target`. Intensity is in the
         millions because decay=2 runs in millimetres.

      4. The slabs are ALPHA glass (opacity=0.4 transparent=true), not
         transmission. Transmission samples only the opaque scene behind a mesh,
         so a transmissive stack cannot see itself: every slab shows the floor
         and none shows the slab under it — five panes of milk. Alpha blending
         is what lets the overlaps mix. The price is that `dispersion` and
         `attenuation-*` (both transmission terms) do nothing here, and the film
         reflection is dimmed with the body, which is why ir01 is so quiet.

    The slabs are extruded <path> outlines authored in mm around the origin and
    laid flat with rotation="-90 …"; the local z spin is therefore a turn about
    the world's vertical