Night vision in your game
Lighting a level so night vision has something to amplify, holding the bare eye's exposure in the dark, the keys a player needs, thermal targets, and picking a goggle for the game you're making.
A goggle amplifies the light your level really has, so the level is half of how it looks. Light it the way a real night is lit and the goggle behaves the way a real one does: no tuning of the goggle needed.
Light it like a real night#
Unreal's lights speak real units: a Directional Light in lux, and a Point or Spot Light in candelas once its Intensity Units say so. Use the light a real night has, and keep the lit places as much brighter than the dark ones as they really are.
| Light | On the ground |
|---|---|
| Starlight, no moon | about 0.001 lux |
| A quarter moon | about 0.01 lux |
| A full moon | 0.1 to 0.3 lux |
| Deep twilight | about 1 lux |
| A lit street or yard | 10 to 30 lux |
| A lit room | 100 to 500 lux |
The night set in these clips has 0.4 lux of moonlight from a Directional Light low in the sky, yard lamps of 2500 candelas six metres up, floodlights of 15,000 to 20,000 candelas, and rooms lit by 500-candela ceiling lights. A thin height fog with volumetric fog on gives the beams something to show in, and a scatter of small, faint emissive spheres far off makes the stars that a tube picks out of the sky.
Hold the bare eye in the dark#
The game's auto exposure brightens a dark level until it looks like dusk, which spoils both the dark and the moment the goggle goes on. Hold the exposure still where it's dark: a Post Process Volume with Min Brightness and Max Brightness under Exposure set to the same value, around 1 to 2 for night, keeps the bare eye in the dark and lets lit places glow.
The goggle doesn't mind either way. It reads the light from before exposure, so what it shows depends on the light, not on how the camera happened to expose it.
The keys a player needs#
Most games need three or four:
- Goggle on and off: Toggle Night Vision on one key, with the goggle's Type and how it goes on.
- Gain: Night Vision Gain Up and Gain Down on two keys or a wheel. With Auto-Gain on they set the most it may reach in the dark; off, they set the gain itself.
- Thermal clip-on: Set Night Vision Thermal Clip-On stepping through Off, Outline, Patrol and Full Thermal, and Set Night Vision Thermal Clip-On Colour for a player who'd rather see warm outlines in another colour.
- Power: Set Night Vision Power, for a goggle with a dead battery or a switch the player flips.
- Infrared: Set Night Vision Illuminator for the goggle's own illuminator, and Toggle on the IR Emitters on the player's weapon for a laser and a weapon light. Infrared has the emitters.
Is Night Vision Equipped tells your HUD and your AI whether the player is wearing one.
Make the enemy warm#
The thermal clip-on and the thermal imagers find what's drawn into custom depth: tick Render CustomDepth Pass on the meshes of the characters, vehicles or engines you want to read as warm. Everything else reads by its brightness.
Bright lights as gameplay#
Bright light is where night vision earns its keep in a game. A floodlight switched on, a vehicle's headlights swinging round, a flare, a muzzle flash in a dark room: the tubes gate down for each, and everything round it darkens for a moment before the gain climbs back. Keep the light where it is in the world and the goggle does the rest. A room lit to daylight levels sets off the Auto Shutoff, and a player who wants to see in it takes the goggle off.
Infrared plays the other way. A laser or an illuminator lets a player see and aim in the dark, and shows anyone else with night vision exactly where they are: a laser is a line straight back to whoever holds it, and an illuminator pointed at a goggle blooms in its tubes. Give enemies IR kit and a player with a goggle spots them first; give the player theirs and every enemy wearing one can too.
Picking a goggle#
- New tubes, white phosphor: crisp, clean and modern: easiest to read, and the look of night vision today.
- New tubes, green: the classic colour with modern clarity.
- Old tubes: grain, halos, bent edges and blemishes: for a grittier game, an older setting, or kit the player picks up.
- A monocular: one eye kept for the dark, and the most common way to wear one.
- A binocular: depth for walking and driving, and no bare eye.
- A panoramic: the widest view, in a heavy block.
Any goggle can be duplicated and tuned: Your Own on Equip Night Vision takes the copy.
Where next#
- The goggles: every type, on the same walk.
- Inside the tube: what each setting does.
- Infrared: illuminators, lasers and strobes for the tubes alone.
- Blueprint nodes: the night vision nodes with the rest.
- Performance: what a goggle costs a frame.