VIPER 11 · NotesFly it →

Note 9 of 15

Less yellow, more heat

A real afterburner by day is a deep-orange glow inside the nozzle and a shimmer in the air behind it. Getting there meant taking the yellow out.

The jets trailer opens on an F-35C on the catapult. The engine runs up, the afterburner lights, and the jet goes. The first cut looked fine, until it was played next to photographs of the real thing. The verdict was short: the burners didn’t look real, “especially the heat coming out of it”. They should be “less yellow and more like burning orange and hot”, and then “the air’s haziness should do the rest of the work”. This note is about doing exactly that.

Why the first one looked fake

The first version drew what most people picture: a bright yellow-white ball at the nozzle, a long glowing cone behind it studded with shock diamonds, and a ripple in the air around it. Every piece of that exists in real photographs. They just come from different photographs, taken at night or at dusk with the exposure wide open. Put all of them into one daylight frame and you get a blowtorch.

The first version: a yellow-white ball at the nozzle and rippled airThe rework: a deep-orange nozzle and a shimmerFirstNow
Drag to compare. The F-16 at full afterburner on the carrier’s catapult, by day, from the low rear quarter with a long lens. Left, the first version: the ball of light and the frosted ripples. Right, the rework: the inside of the nozzle glows deep orange and the air behind it shimmers.

To put a number on “too yellow”, every glowing pixel near the nozzle was measured after the game’s full lens chain, the same tone curve and grade the player sees. In the first version the median hue of those pixels was 37–42°, which is yellow, and up to 17% of them were close to white. In daylight photographs of real burners the median hue is 12–18°, a deep orange, and only 1–3% of the glow is white.

The yellow wasn’t only the flame’s colour. A camera sensor saturates, and its red channel clips first, then green. An orange that is too bright for the exposure comes out yellow, and then white. A tone curve does the same thing to an orange that is too bright for the scene, and the first flame was as bright as a white wall in full sun. So the blowtorch look is really an overexposed orange, and the fix was as much about brightness as about colour.

What a real one looks like

An afterburner sprays fuel into the exhaust behind the turbine and burns it again. The flame gives off light in two separate ways. Soot, tiny particles of carbon, glows from the heat like a stove element, from orange to yellow. That light is bright and carries almost everything you see in daylight. Short-lived molecules in the flame also give off a faint blue and violet as they settle. Where little soot forms, in the lean core just behind the flameholder, the blue is all there is. By day the sky drowns it out, which is why the dramatic blue and pink plumes in photographs are taken at dusk, at night or in a test cell.

The gas in afterburner runs at about 1,900–2,200 K. A NASA survey of an F404 nozzle found the hottest gas, about 2,110 K, a few inches inside the lip. At full power without afterburner, which pilots call MIL, the gas leaves at only 750–900 K. That matters because hot things only start to glow visibly at about 800 K. Around 1,000 K they are a dull deep red, around 1,500 K orange, and around 2,000 K orange-yellow.

Figure 1 · Colour by temperature

The top strip is the colour of a perfect hot body at each temperature (Planck’s law through the eye’s colour response), at equal brightness. Below it is the game’s glow ramp for the nozzle interior as the camera shows it: now, and the first version. The ramp’s inputs are mapped to temperature using its code’s own labels (about 900 K for dull red, 2,100 K for the flameholder’s rings). Push the exposure up and the new orange turns yellow, then white, the same way a saturated sensor does.

Put that together and a daytime burner is mostly inside the nozzle. At MIL the nozzle is nearly black. At minimum afterburner it opens a little, and a dull orange-red ring glows deep inside, with no flame outside at all. At full afterburner the nozzle is wide open. The liner and the inner faces of the petals glow deep orange, lit from within, and only the flameholder’s rings, deep inside, reach orange-yellow. Outside the nozzle there is a short, translucent orange lick, about one to one and a half nozzle diameters long.

The shock diamonds are real too. The exhaust leaves the nozzle at a pressure that doesn’t match the air outside, so it overshoots and rebounds in a train of shock waves. The gas reheated behind each shock relights leftover fuel, so each cell glows. The cells sit about 1.1–1.3 nozzle diameters apart, three to six of them, each dimmer than the last. At night they are crisp. In daylight they are almost invisible.

The F-16 at MIL, minimum afterburner and full afterburner
The F-16’s F110 engine at MIL, minimum afterburner and full afterburner, by day. At MIL the nozzle is closed down and dark. At minimum it opens a little and glows a dull orange-red. At full it opens wide and glows deep orange, with the flameholder’s rings showing through.

Let the haze do the work

Before changing any code, the look was split into a budget, judged from photographs of real jets in full afterburner by day. About 60% of it is the glowing nozzle interior, about 30% is heat haze, and only about 10% is flame outside the nozzle. The first version had those proportions upside down.

Heat haze is refraction. How strongly air bends light depends on its density, so hot, thin gas bends it less than the cold air around it. The refractive index of air differs from 1 by about 2.8 parts in 10,000 at 15 °C, but by only about 0.9 at 900 K and 0.4 at 2,000 K. A turbulent column of hot exhaust in cold air is a moving field of weak lenses. A camera sees three things through it. The background wobbles, and a distant background wobbles more than a near one, because the same small bend has a longer lever arm. Light piles up and thins out at the edges between hot and cold, so bright and dark streaks appear. And the shimmer averages fine detail away, so the background loses contrast and smears.

An F-16 in full afterburner over the sea at golden hour. The flame is barely there. Behind the nozzle, the sea and the haze on the horizon wobble, smear and streak for tens of metres downstream.
The F-16 over the sea with the heat haze switched offThe same frame with the heat hazeNo hazeHaze
Drag to compare. The same frame of the same flight, with the heat haze switched off and on. Without it, the burner is a glowing ring and a faint lick. With it, the air behind the jet is visibly hot.

The first version’s haze had the right idea and the wrong shape. Its distortion came from a flat pattern of noise. From the side that looked like frosted glass, and from behind, where the long plume is seen almost end-on, the pattern crowded into concentric ripples. Real haze is made of eddies carried along by the flow, so the rework builds it from those.

The first version from the side: a long yellow-white flame and frosted hazeThe rework from the side: a short orange lick and streaming hazeFirstNow
Drag to compare. The same jet from the side, 55° off the tail. The first version’s flame ran four or five diameters in broad daylight, and its haze was a frosted band. Now the flame is a short orange lick, and darker streaks stream back from the nozzle.

How the plume is drawn

The exhaust has three parts, and they are drawn in three different ways. The nozzle interior is ordinary geometry: a liner just inside the petals, and a disc for the turbine face and flameholder behind it, both glowing. Their colour comes from one ramp, from a barely-there dull red at MIL to deep orange in afterburner, with a little yellow saved for the flameholder’s rings. The petals’ seams show as darker lines, and the glow flickers.

The flame and the haze are drawn in one extra rendering step, after the clouds and the haze of distance and before the camera lens (bloom, flare and the grade). Each plume is a box in space, and the step marches rays through it. The flame takes 20 steps per pixel. It is pure emission, hottest in a ring just inside the lip, then a tapering cone whose brightness falls away exponentially along it. The soot that glows also absorbs, so looking straight down the axis the flame doesn’t pile up into a white disc. A faint blue-violet core and the shock diamonds are in there too, at a brightness that only shows once the light is low.

There is no separate day flame and night flame. The emission follows the scene’s light to the power 0.4, so a burner is a little dimmer at dusk than in full sun, but the camera opens up far more than that. By day only the first diameter or so of the cone is bright enough to read. At dusk the same cone reads to three to five diameters, and at night further still. The exposure decides the flame’s length, just as it does in a photograph.

Figure 2 · The burner, from the shader

The game’s nozzle-glow and flame formulas, with each engine’s numbers, run on this page. The nozzle seen from behind, and the flame from the side, integrated through the plume the way the shader marches it. First runs the original formulas. Dusk and night here assume the light falls 10× and 100× and the camera opens up to match. Only an ACES tone curve is applied, not the game’s full grade, so the hues come out a few degrees yellower than the ones measured in the game. A flame “reads” where it adds more than 4% of the brightness of a white surface in sun.

The haze is drawn at half resolution. Along each ray’s path through the plume, 12 samples add up how much the hot gas bends light there. The bending comes from eddies about half the plume’s local radius across, stretched along the flow, growing as the plume spreads, carried downstream at about 35 m/s and slowing, and boiling as they go. The final pass then shifts the image behind the gas by that field’s slope, scaled by how far behind the gas the background is. It adds the shadowgraph streaks, with the dark phase stronger, smears the background along the flow on screen, and darkens it slightly where the gas is thick. All of this is depth-aware, so the jet’s own tail just behind the gas hardly moves while the sea a kilometre away swims.

The rework also made it cheaper. Over five of the trailer’s shots at 1920 × 1080, the haze and flame together came to 12.6 ms in total on an M4 Max, down from 19.5 ms. The haze now marches 12 samples where the old one was a single formula, but the flame takes 20 steps instead of 28 in a box little more than half as wide.

The F-16 over the sea with only the glowing nozzle interior: no flame and no haze
The same frame as the comparison above, with the flame and the haze both switched off. The glowing nozzle interior alone already reads as an afterburner.

Three engines

The trailer has three jets, and each engine has its own numbers. The nozzle sizes come from the aircraft models themselves. The flame, the diamonds and the haze were tuned against photographs and the study.

F-16CF-35CF/A-18E
EngineF110‑GE‑129F135‑PW‑4002 × F414‑GE‑400
Nozzle exit radius, MIL → full AB0.42 → 0.50 m0.54 → 0.63 m0.39 → 0.46 m
Petals or flaps1615, serrated12
Full flame cone (what a night photo shows)6.5 m7.5 m5.5 m
Diamond spacing1.2 D1.15 D1.1 D
Diamond contrast0.9, sharpest0.7, softest0.85
Haze reach at full AB, strength30 m, 1.034 m, 1.1526 m, 0.9
The per-engine presets (src/fx/exhaust/engines.ts). D is the nozzle’s exit diameter. The flame colours differ only slightly: the F414’s is the reddest. All three share the same blue-violet core and pale salmon diamonds.

The F-35C’s F135 is the biggest single nozzle in service, so its burner is the broadest, its haze carries furthest, and its diamonds are the softest. The Super Hornet has two smaller F414s side by side, with two plumes and two hazes that merge downstream. The F-16’s F110 has spray bars that vary smoothly rather than lighting in stages, so its afterburner comes up as one continuous glow, and its diamonds are the sharpest of the three.

The F-35C, the Super Hornet and the F-16 at full afterburner
The F-35C, the Super Hornet and the F-16 at full afterburner, each alone on the same catapult, from the same camera.

Where it stands

The afterburner lives in the game’s code, in its own lab, and it is what you see in the jets trailer. The F-16 you fly from Nellis has an afterburner in its engine model, its sound and a controller’s rumble, but the flyable game doesn’t draw the plume yet. That comes later.

Some things still don’t match. The game’s dusk is a bright sunset sky, nothing like the deep blue twilight of the dusk photographs, so the exposure never opens far enough to show the long plume and its train of diamonds. They are in the shader and will appear once the sky is dark enough. The F-35C’s nozzle interior is a little paler, more salmon than the saturated deep orange of the photographs. And the 60/30/10 split is a judgement from photographs, not a measurement. The research behind all of this was done from text sources, and the target colours were checked against a set of generated reference images, measured the same way as the game’s frames. None of those images appears here: every picture on this page is the game’s own renderer.

Fly it

viperoneone.com

VIPER 11 is a browser flight game: three.js, WebGL2 and Web Audio. Every figure on this page is drawn from the game’s own code and numbers. Made by apek. Follow me @apekshik for what’s next.