Sensor Looks: Thermal, Night Vision and X-ray
- ..
- .metadata96 B
- README.md2.2 KB
- block.yaml1.7 KB
README.md
X-ray: medical film (styleBlock, Colour)
A medical x-ray film: everything turned to blue-grey translucent layers on near black, dense and metal things bright white, edges glowing like bone.
It is one of the five x-ray blocks; all run the xray shader with their own defaults, so any one swaps for another in the Colour slot with one change. The see-through layers are drawn by the sensor runtime (XrayPass) only while an x-ray block is on, and metal comes from heatSignatures's classes (crates, engines, vehicles, electronics, or a HeatSource with class metal).
local Sensors = require("~sensorBlocks.Sensors")
Sensors.use("xrayBaggage")
What it gives up in motion
The layers are drawn fresh every frame from the scene's geometry, so they move with things and nothing slides. Grain changes per pixel per frame; the sci-fi scan line sweeps slowly (seconds per pass) and never flashes the whole screen.
How it treats content
- Opaque things: seen through, every surface along the ray adding to the picture, walls seen edge-on most.
- Transparent things (glass, water): drawn as layers like anything else, so glass shows in an x-ray.
- Particles and smoke: particles that are meshes add faint layers; screen-space effects do not.
- Sky: nothing absorbs, so it is the film's background.
- Fog: ignored; rays pass through fog.
- Skinned characters: their skinned surfaces add layers, so a character reads as a translucent outline with its folds.
- Foliage: leaves and grass add many thin layers, a soft haze.
- World text: text drawn on surfaces disappears into the layers; screen UI is drawn after the stack and is never touched.
- Black does not stay black: the picture is the x-ray, not the light.
Known limits
- It counts surfaces, not real density, so a hollow box and a solid one of the same size read alike, and a character has no bones unless its model does.
- It redraws every surface once more (twice for metal) while it is on; see the sensorBlocks README for the measured cost.
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it.
- The sensorBlocks package README's Known limits lists the rest.