Octopus camouflage and detection (2D)

Skin colour from chromatophores, matched to the rock behind it, and the measured chance that a passing predator singles it out.

Switch to 3D

Presets

Playback

Scene and predator

Octopus skin

Layers

Model check

The science

Skin as a stack of filters

An octopus changes colour with three kinds of cells. Chromatophores are small elastic pigment sacs (brown, red-orange, yellow) that muscles stretch from a dot into a disc; iridophores and leucophores sit beneath them and reflect light (structural green-blue and white). The model starts from a white leucophore base and lets each sac type cover a fraction cov x e of the area, e being how far it is expanded (0 to 1). Each layer absorbs with a transmittance T, so the reflectance in each colour channel is R = R_white x product(1 - cov e (1 - T)), plus an additive iridophore term. Colours are converted to CIE Lab and compared with the CIE76 distance dE = sqrt(dL^2 + da^2 + db^2). A change of about 2.3 dE is the smallest difference a human notices (one JND); other animals differ, which is why the noise slider exists.

What the predator notices

The predator compares the octopus patch with M similar patches in one glance. The octopus is more conspicuous than a background patch by a detectability d' = D x T x V / sqrt(JND^2 + clutter^2), where D is the effective difference (colour error and texture mismatch combined, reduced by up to 45 % for a disruptive outline), T = exp(-c r) is the contrast kept after distance r in water with attenuation c, and V = 1 - exp(-(angle / acuity)^2) says whether the animal is large enough in the predator's eye to be resolved. Busy backgrounds hide small mismatches because their own variation adds to the noise. The chance the predator picks the octopus patch as the odd one out is the M-alternative forced-choice integral P = integral phi(x - d') Phi(x)^M dx; with d' = 0 it falls to pure guessing, 1 / (M + 1).

Time

Each sac relaxes toward its target with de/dt = (e* - e) / tau, so 95 % of a change takes 3 tau. After a move to a new rock the octopus is briefly conspicuous; the graph shows how the chance of being singled out falls during that blending time. Real octopuses can change in a fraction of a second to a few seconds.

Predator vision

The three predator types weigh the Lab axes differently: a trichromat uses all of them, a dichromat ignores the red-green axis, and a monochromat sees brightness only, so for a shark-like predator matching lightness matters far more than hue. Octopuses are thought to have a single visual pigment yet match colours well; how they do it is still an open question, and the automatic matching here simply assumes the skin finds the colour that is closest.

Honest simplifications

The pigment transmittances, coverage limits, the iridophore term, the 0.4 m apparent size, the water-contrast law, the visibility curve and the way colour and texture errors add are assumptions chosen to be plausible, not measured values; real predators also use edges, motion, shape and polarisation. The page gives the shape of the answer (distance, water clarity, colour range and pattern all matter, and some backgrounds cannot be matched at all) rather than predictions for a particular species. The predator passes are random draws from the model probability, so a short run will not equal the model exactly; the interval shown is the 95 % Wilson interval.

Chance of being singled out vs predator distance
Blending in after moving to a new rock
Detection probability vs detectability d'
Reachable skin colours (a*, b* plane)
Made with 🟠 Blender · Three.js