GTG Thermal Framework
Fire and explosions in thermal
Thermal imaging is only convincing if a burning vehicle is the hottest thing in the picture. In the game as shipped it is not: fire is a particle effect, and no particle material of the game carries any heat. This page shows the three lines that fix it, and the 45 materials the framework replaces.
What the game does with fire
Fire, explosions and smoke are particle effects. A particle effect (.ptc) is a list of emitters, and each emitter draws sprites with a particle material (.emat, type Particle).
The thermal view has its own idea of what is hot: surfaces get their temperature from the heat simulation, particles from their material. None of the game’s particle materials sets a temperature, and none sets how the particle takes part in the thermal view. So fire had no heat of its own and barely showed at all.
Three lines make a particle hot
| Line | What it does |
|---|---|
TIVisibility Always | The particle is drawn in the thermal view. |
TIBlendMode AlphaBlend | How it blends into the picture. With alpha blending the soft edge of the sprite stays soft, so a flame does not become a hard block. |
Temperature <degrees> | How hot it reads. Above the top of the window the colour is simply the hottest one, so a high value is hot in every window; a low value is only warm. |
These lines only matter in the thermal view. The normal picture is not changed by them. This is one flame material, shortened: the game’s own lines stay as they are, and the three lines come at the end:
Particle {
AlbedoMap "{AB475DA007DDA17F}Particles/_Textures/Flame_Loop_01_BCA.edds"
Emissive 1 1 1 0
EmissiveLV 13
BlendMode Additive_AlphaModulate
// ... the game's own lines, unchanged ...
TIVisibility Always
TIBlendMode AlphaBlend
Temperature 400
}
What the framework replaces
The framework carries a copy of 45 of the game’s own particle materials with these lines added. A copy has the same path and the same GUID as the game’s file, so every effect that already uses the material picks it up, and no effect file had to be touched. The temperatures are chosen so that flames are always at the hot end, and so that the surroundings come out clearly cooler:
| What | Temperature | Materials |
|---|---|---|
| Flames and fire | 400 | 20: FireBurn_anim_*, Flame_anim_*, Flame_Loop_*, Fire_Clusters*, Fire_Candle_01, Flames_Explosion_01, Fire_Loop_01, Gas/Flame_Base_Pillar_01 |
| Explosion fireballs | 600 | 15: Fire/Explosion_*, Fire/Explosion_Base_*, Explosion_06, Explosion_Base_In_Front_01, Burst_Explosion_* |
| Sparks | 350 | 5: Fire/Base_Sparks_04 to _07, Sparks_multiple |
| Flare | 300 | 1: Glow_Flare |
| Glow around the flames | 80 | 1: Fire/Glow_Base_01 |
| Hot smoke | 70 | 2: Gas/Smoke_Cloud_Hot_02, Gas/Smoke_heavy_sheet_hot |
| Campfire smoke | 60 | 1: Gas/Smoke_heavy_campfire_sheet |
All of them are in Particles/_Materials of the addon. Other smoke materials are left as the game has them: only the smoke that is really hot was given a temperature.
What it looks like
A burning helicopter on the Ironbow palette: white-yellow flames, a plume of smoke from violet to orange, and the dark shape of the wreck behind. On the wide window the soft glow and the hot smoke give the fire a warm halo. On a narrow hot window, for example 67–97 degrees, only flames and smoke remain in the picture and the ground and the wreck stay dark, because they are cooler than the window. That is the window working as intended, not a fault of the fire.
Your own fire
If your mod has a fire or explosion of its own, give its particle material the same three lines. Take a temperature well above the top of the hottest window (it ends at 107 degrees) for flames, and a value inside the windows for anything that should only be warm:
Particle {
// ... your own lines ...
TIVisibility Always
TIBlendMode AlphaBlend
Temperature 400 // flame: hot in every window
}
To replace a material of the game, as the framework does, you need its GUID. The game’s packs carry no .meta files, but addons/data/resourceDatabase.rdb does contain it: each record is the path, then 7 bytes, then the GUID as
8 bytes in little-endian order. Write the GUID, reversed, in front of the path in your own .meta file and the copy replaces the original.
What to know before you rely on it
| Not covered | Why |
|---|---|
| Muzzle flashes | Left alone on purpose: a white flash on every shot is a separate decision. |
| A heated patch of ground | Needs an extra emitter per fire effect, see above. |
| Smoke that is not in the list | Left as the game has it: only the smoke that is really hot was given a temperature. |