Skip to content

Instantly share code, notes, and snippets.

@HB-Stratos
Last active April 5, 2025 00:54
Show Gist options
  • Save HB-Stratos/9e845c19d93a1e551478aef3d4d09c76 to your computer and use it in GitHub Desktop.
Save HB-Stratos/9e845c19d93a1e551478aef3d4d09c76 to your computer and use it in GitHub Desktop.

Writing Status: in progress

Afterburners and Heat Blur Rendering, a Study

This is a collection of years of research and information collection I have done, written with the hope it will be helpful specifically to the developers of KSA, but also to anyone else who might find this.

I will be going into detail on the intricacies of afterburner and heat blur, as well as possible ideas to render all of it for the purpose of a video game.

Afterburners (aka Reheat)

Afterburners are surprisingly complex in their looks and how it changes depending on the environment, the camera used, etc.

Exposure matters

Afterburners are a long torch behind the aircraft, right? Looking at common depictions, you'd certainly think so. And real life images corroberate the observation:

220620-F-JV123-3564

https://www.defense.gov/Multimedia/Photos/igphoto/2003029040/

But now look at another shot of the same aircraft with a likely very similar thrust setting, just during daytime.

B-1B_Take_Off

https://upload.wikimedia.org/wikipedia/commons/0/05/B-1B_Take_Off.jpg

image

https://sofrep.com/fightersweep/burner-friday-rockwell-b-1b-lancer/

Now let's look at dusk. It displays a nice middleground between the sunny day and night, as one would expect from a medium exposure setting. I recommend looking at the source link here for some really awesome detail pictures. You can also notice that the background of the blue sky is making it harder to see the blue parts of the flame, which I'll cover more later.

lancer-photo-dump-from-june-16th-not-flawless-photos-but-v0-3r2vrqud3t6b1

https://www.reddit.com/r/aviation/comments/14cp4lt/lancer_photo_dump_from_june_16th_not_flawless/

As you can see, exposure matters a lot. Afterburners are less bright than typical rocket engines, so while they like to blow out the camera at night, during a bright sunny day one can barely see them outside the combustion chamber.

This isn't easily rendered with the typical method of an additive shader in SDR. This allows for one brightness overlay with no adjustments for environment brightness. One way I've found that they can be rendered relatively well is still with an additive shader, though in HDR, then tonemapping back to SDR with autoexposure. This realistically models the real effects of changing exposure in the camera, however specifically in KSP it required me to quadrouple sun emissive strength and nearly disable ambient light boost to get enough of a contrast for it to work. The results of that however pay of massively.

screenshot127

screenshot126

As a side note, turning of scatterer tonemappinng and tonemapping everything at once in TUFX has created some of the most stunning visuals I have ever seen. (expand)

screenshot_2024-11-23--22-27-52

screenshot154

Auto exposure at work in other areas, stars only visible in the darkness. (with some green stains from DDS compression)

screenshot203

screenshot_2024-07-20--00-23-10

screenshot_2024-07-23--22-32-11

screenshot_2024-07-23--22-46-51


Some unintended sideeffects from mods not being meant for this

Color overflow in an additve shader in waterfall

screenshot135

Underexposed explosion FX because they are SDR

screenshot189

Weird landing lights because someone thought they should be rendered as unlit

screenshot244

This was supposed to be a flame, not just smoke

screenshot_2024-07-20--16-55-26


Color strangeness

At first glance you might not believe me that all of these are the same afterburner, but they are.

image

https://www.reddit.com/r/FighterJets/comments/1fofv6t/f14_afterburner_sunset/

4a49cc3449a531e502ead2c4a17f030f

https://de.pinterest.com/pin/337629303307898363/

thumb-1920-647576

https://wall.alphacoders.com/big.php?i=647576

There are a lot of factors at play here. I can't claim I have a full understanding of what exactly is going on, but there are several effects compounding I believe.

  • Burners often appear more blue during dusk and night than during the day.

EBaOAFwXYAMTwv0

https://x.com/stuartmfoster/status/1159270090816335873/photo/1

09i02t1ubhla1

https://www.reddit.com/r/aviation/comments/11gp3uf/one_of_the_best_looking_aircraft_is_the_su27_ill/

I believe there are several factors at work to cause this behavior. For one, during the day the bright and blue sky is likely blowing out the blue burner. Beyond that white balance likely also plays a factor here as well as possibly IR radiation leaking through the camera's filter and manifesting as blue-purple light in the dimmer conditions.

image

https://www.maketecheasier.com/smartphones-camera-test-remote-controls-batteries/

---rewrite this as more of a picture case study than a list of effects maybe?---

There's a lot at play here that can cause this. I haven't fully understood all of it, so if you were hoping for a complete explanation, I'm sorry to disappoint. However, I have identified a few factors which can influence this:

  • Time of day the picture was taken. During the day, the sky is blue, thus washing out any blue parts of the flame to become nearly invisible, while orange burn stays very visible
  • Thrust setting. Afterburners can operate at various thrust levels with varying efficiency. Some burners may burn less completely at some thrust settings, thus leaving more orange glowing carbon in the exhaust.
  • Altitude / Nozzle setting. Both combined modify shock diamonds, but also combustion efficiency, once again affecting color.
  • IR filter in the camera. Afterburners burn hot. Especially older film pictures may have had sensitivity in the IR spectrum, thus exaturating red colors in a burner.
  • Engine type. Russian engines tend to burn more blue than american ones. I do not fully know why this is the case, but different bypass ratios, fuel types, flame holders, etc may all have an effect.
On russian engines being blue (expand)

I had it in my memory that most russian jets had blue burning afterburners. This pretty often shared image of the Su-27 seems to confirm it.

6788e2a9e632728a2b79a62c65795dbc

https://uk.pinterest.com/pin/jet-fighters--834291899709020551/

However, in most other imagery, the exhaust is orange 36813487351_86fe67c9b0_b

https://www.flickr.com/photos/wellsie82/36813487351

YouTube

Same goes for the Mig-29, which is a little bit blue at best, and fully orange in day shots

image

https://www.reddit.com/r/aviation/comments/7crtdj/afterburning_mig29/

1000_F_498628122_so34zOi0pBo0yqk62d5yqZRwtLDAwSrY

https://stock.adobe.com/de/images/polish-air-force-mig-29-fighter-jet-from-poland-taking-off-with-full-afterburner-to-a-mission/498628122

YouTube

The only plane that I've found reliable consensus on that it has a blue afterburner is the Tu-22M

Tu-22-take-off-top-860x480

https://theaviationist.com/2019/12/26/tu-22m3-backfire-engines-transition-from-idle-to-full-reheat-captured-in-stunning-detail/

YouTube


'Collumn' vs 'Core' burning afterburners

In quotes here as these are the names I made up for the patterns I have observed. I again unfortunately do not have a complete explanation of why this happens. Still, allow me to illustrate.

A 'Collum' burning afterburner. You can see the entire nozzle exit plane is roughly the 'same' afterburner, and you can see some concentration of light along the edges of the burner.

image

https://www.flugrevue.de/militaer/modernste-viper-fuer-den-persischen-golf-die-ersten-f-16-block-70-fuer-bahrain-sind-im-anflug/

A 'Core' burning afterburner. You can see a clear inner collum of mach diamonds, surrounded by a significantly less bright flame.

J58_AfterburnerT

https://en.wikipedia.org/wiki/Shock_diamond#/media/File:J58_AfterburnerT.jpeg

Things are never clear cut... (expand)

So I though I could use the Mig-21 as example for a 'Core' afterburner. However, upon further research, I've found out that this particular engine appears to exhibit both patterns in different imagery.

418QsiQKhOL AC_UF894,1000_QL80

https://www.amazon.de/Bulgarian-MiG-21bis-Afterburner-Bulgarien-BalakchievStocktrek/dp/B07C4D328F

mig_21_with_afterburner_by_dragos06_d8k0hkw-fullview

https://www.deviantart.com/dragos06/art/MIG-21-with-afterburner-517344512


Mach diamonds

I won't go into too much detail here as I assume the KSA team of rocket people already is familiar with the general concepts. Afterburners exhibit the same patterns, though they hold the advantage that they often have a variable geometry nozzle that can in theory do a better job at atmosphere matching the exhaust than a classical rocket nozzle.

As the KSP2 devs got this painfully wrong, I will note here that igniting the afterburner increases the mass flow and available energy in the flow, and thus the variable area nozzle opens up under afterburner.

The F-14 is the aircraft in which I have observed changing mach diamonds the most.

Here's one taking off, displaying near zero mach diamonds.

Gf14

https://www.avionslegendaires.net/avion-militaire/grumman-f-14-tomcat/

And here's one flying at high speed, mach diamonds very clearly visible

2154919657_e5e854688c_z

https://www.flickr.com/photos/22369233@N06/2154919657

Other fighter aircraft also exhibit this behavior, though I have noticed that it is to a far lesser extent. I would also expect the characteristic mach diamonds of the SR-71 to reduce as the aircraft approaches its design speed of mach3. Unfortunately I have not been able to locate any pictures of the SR-71 at design speed.

Flame holders and engine internals

Heat Blur

fundamental for "oomph"

in nozzle on flame holder is bright, exhaust flame very translucent

refreaction (redirection) of light rays -> scales with distance behind the blur.

total reflections exiss, blotchy through turbulence

often mixed with some soot in the air

rendering via 'volumetric trail renderer', particle system connected with trails because settling matters. colliders difficult

depth filtering matters

pure displacement not sufficient for fully realistic rendering due to angle dependence.

modern engines don't smoke, so good power indicator, even visible from the front

is mostly blur with some distortion

distortion strength depending on ray length through volume

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment