Emission makes the sign's own pixels bright, but it does not put light on anything else. Add a light in the same color next to it: in Godot 4.7 an AreaLight3D with area_size set to the size of the sign, or an OmniLight3D on older versions. In our Godot 4.7 test with the Compatibility renderer, a pink sign with emission energy 1, 4 and 16 left the wall behind it at 0.7 brightness out of 255, the same as with no sign. Glow made a halo of 11.4 right under the sign and nothing 1 m below. An OmniLight3D with energy 1 lit the wall to 48.1 right under the sign and 26.6 1 m below.
The code
Use it in place of a plain MeshInstance3D for the glowing part of a sign, screen or lamp: the script extends MeshInstance3D. It reads the emission color from the material and adds an AreaLight3D the size of the mesh on Godot 4.7 or newer, or an OmniLight3D before 4.7. light_wall_behind decides which way the area light shines: onto the wall behind the sign, or out into the room. Set energy to taste.
extends MeshInstance3D
## Makes an emissive sign, screen or lamp light up what is around it.
## Emission only brightens the mesh itself, so this adds a real light in the same color:
## an AreaLight3D the size of the mesh on Godot 4.7+, an OmniLight3D on older versions.
@export var energy := 1.0
@export var omni_range := 3.0 ## meters, used only by the OmniLight3D fallback
@export var light_wall_behind := true ## false: shine forward, into the room
var light: Light3D
func _ready() -> void:
var mat := get_active_material(0) as BaseMaterial3D
var col := mat.emission if mat and mat.emission_enabled else Color.WHITE
var size := get_aabb().size
if ClassDB.class_exists(&"AreaLight3D"):
light = ClassDB.instantiate(&"AreaLight3D")
light.set(&"area_size", Vector2(size.x, size.y))
else:
var omni := OmniLight3D.new()
omni.omni_range = omni_range
light = omni
light.light_color = col
light.light_energy = energy
add_child(light)
if not light_wall_behind:
light.rotate_y(PI) # lights shine along their -Z, the mesh faces +Z
What we measured
A gray wall 6 m in front of the camera and a 1.2 x 0.4 m pink sign 10 cm in front of it, with no other light. We averaged the screen brightness (0 to 255) on the sign, on a strip of wall right under it and on the wall about 1 m below. Two runs gave the same numbers.
- No sign: wall 0.7 and 0.7.
- Emission energy 1: sign 143.7, wall 0.7 and 0.7.
- Emission energy 4: sign 221.0, wall 0.7 and 0.7.
- Emission energy 16: sign 255, wall 0.7 and 0.7.
- Energy 16 with Glow on in the Environment: wall 11.4 right under the sign and 0.0 a metre below. Glow spreads bright pixels on the screen image; it did not reach the wall a metre away.
- Energy 1 plus an OmniLight3D in the same color, energy 1, range 3 m: wall 48.1 and 26.6.
- The script, energy 1, which added an AreaLight3D of 1.2 x 0.4 m: wall 10.6 and 2.9. Turned to face the room instead: wall 0.7 and 0.7.
Why it happens
Emission is a material setting: it adds color to the mesh's own pixels whether or not any light reaches them, so the mesh looks lit from inside. Other surfaces only get brighter from lights, or from global illumination that bounces emission onto them, and the Compatibility renderer has no real-time global illumination. We tested with Compatibility only.
What to change
- An AreaLight3D gives a soft rectangle of light the shape of the sign. An OmniLight3D at the same energy was brighter in our test, from a single point. Raise the area light's energy for a stronger wash.
- Blinking or flickering signs: change the light's light_energy together with the material's emission_energy_multiplier, or the wall stays lit while the sign is off.
- Many signs on one wall: in Compatibility a mesh takes at most 8 lights, see more than 8 lights on one mesh.
41 ready-made signs: Neon Signs & Area Lights for Godot 4.7 light up the walls and ground around them with Godot 4.7's AreaLight3D. One color setting recolors the tubes and the light together, and wall_glow sets how much light a sign throws back onto the wall behind it.
Tested in Godot 4.7 with the Compatibility renderer.
Ready-made: Neon Signs & Area Lights for Godot 4.7 has 41 ready-made 3D neon signs and light fixtures that light the walls and wet ground around them, including OPEN, BAR, HOTEL and RAMEN signs, paper lanterns and string lights.
More how-tos for Neon Signs & Area Lights for Godot 4.7: A swing that settles the same at any frame rate
More how-tos: Shaders, materials and lights
- A 3D outline that stays the same width on screen
- Find and fix the seam in a repeating texture
- PS1 vertex wobble that is the same near and far
- Snow that stays on the roofs
- Packed ORM maps on a StandardMaterial3D
- Neon signs that share a material but not a colour
- A MatCap that stays the right way up from every side
- Scroll or tile a 2D texture without stretched edge lines
- Keep floors, roads and roofs sharp when the camera looks along them
- Make WorldEnvironment color grading apply to a 2D game
- Get a hard cel-shaded light edge from StandardMaterial3D's Toon mode
- Make metallic materials stop looking black or flat
- Use a LUT strip for color grading in Godot 4
- Tiling textures that keep their size on any mesh
- A sharp low-resolution PS1 look
- Only 8 lights show on a long wall in Compatibility
- Hit flash shader for 2D sprites
- Flash a 3D enemy white when it takes a hit
- Dissolve shader for 3D models
- 2D outline shader that is not cut off
- 3D outline shader without gaps at the corners
- A force field shield with a hit ripple
- Normal map inverted: DirectX vs OpenGL
- Full-screen post-process shader in 3D
- Scroll a shader texture for hours without the once-an-hour jump