← Pixel Dreamer Studio

Make a glowing sign or screen actually light the wall around it

Emission only brightens the mesh itself. Add a light in the same color: an AreaLight3D the size of the sign in Godot 4.7, or an OmniLight3D.

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.

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

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