In the Environment, set a Sky (a ProceduralSkyMaterial is enough) and set Reflected Light > Source to Sky (env.reflected_light_source = Environment.REFLECTION_SOURCE_SKY). The background can stay a solid color. In our Godot 4.7 test with only a sun and a dark color background, a gray ball with metallic 1 and roughness 0.2 averaged 34.9 brightness out of 255, against 160.3 for the same ball with metallic 0. White ambient light brought the non-metal ball to 246.4 and did nothing for the metal: 108.0 before and after at roughness 0.5. A sky for reflections only took the smooth metal to 80.8, and the background stayed at 8.7.
The code
Save it as metal_sky.gd. reflect_sky() gives an Environment a procedural sky for reflections and ambient light without touching its background. dark_metals() lists the meshes with a metallic material that will look dark with the current Environment: print it when metal looks wrong. For example: const MetalSky := preload("res://metal_sky.gd") and MetalSky.reflect_sky($WorldEnvironment.environment), or print(MetalSky.dark_metals(self, $WorldEnvironment.environment)).
extends RefCounted
## Metallic materials get their color from what they reflect, not from ambient light.
## These helpers find metals that have nothing to reflect and give the scene a sky.
## Gives env a procedural sky for reflections and ambient light only.
## The background the camera shows (a solid color, for example) stays as it is.
## The metal shows these colors: a near-black sky gives it nothing to reflect.
static func reflect_sky(env: Environment, top := Color(0.38, 0.45, 0.55), horizon := Color(0.65, 0.66, 0.67), ground := Color(0.2, 0.17, 0.13), energy := 1.0) -> void:
var mat := ProceduralSkyMaterial.new()
mat.sky_top_color = top
mat.sky_horizon_color = horizon
mat.ground_horizon_color = horizon
mat.ground_bottom_color = ground
mat.energy_multiplier = energy
var sky := Sky.new()
sky.sky_material = mat
env.sky = sky
env.reflected_light_source = Environment.REFLECTION_SOURCE_SKY
env.ambient_light_source = Environment.AMBIENT_SOURCE_SKY
## True when env gives metals a sky to reflect.
static func has_reflections(env: Environment) -> bool:
if env == null or env.sky == null:
return false
if env.reflected_light_source == Environment.REFLECTION_SOURCE_SKY:
return true
return env.reflected_light_source == Environment.REFLECTION_SOURCE_BG and env.background_mode == Environment.BG_SKY
## Paths of the meshes under root with a metallic material (0.5 or more) that will look dark with env.
static func dark_metals(root: Node, env: Environment) -> Array[String]:
var found: Array[String] = []
if has_reflections(env):
return found
for node in root.find_children("*", "MeshInstance3D", true, false):
var mi := node as MeshInstance3D
if mi.mesh == null:
continue
for i in mi.mesh.get_surface_count():
var mat := mi.get_active_material(i) as BaseMaterial3D
if mat and mat.metallic >= 0.5:
found.append(str(mi.get_path()))
break
return found
What we measured
A gray sphere (albedo 0.8) 4 m in front of the camera, a DirectionalLight3D and an Environment with a dark solid color background. We averaged the screen brightness (0 to 255) over a square inside the ball. Two runs gave the same numbers.
- Metallic 0, roughness 0.5: 160.3.
- Metallic 1, roughness 0.5: 108.0. Roughness 0.2: 34.9. The smoother the metal, the darker it got, because a smooth metal shows a sharp reflection of the sun and of nothing else.
- White ambient light (Ambient Light > Source Color, white): metallic 0 went to 246.4, metallic 1 stayed at 108.0.
- No WorldEnvironment at all: metallic 1 still 108.0, on a gray background.
- reflect_sky() on the same Environment: metallic 1 roughness 0.5 rose to 125.0 and roughness 0.2 to 80.8. Metallic 0 became 177.0, as the sky also lights it. The background stayed at 8.7, and the numbers were the same 60 frames later.
- The same sky shown as the background instead: 125.0 and 80.8 again, on a sky background of 125.8. The sky does not have to be visible to be reflected.
- reflect_sky() with near-black night colors: metallic 1 stayed at 108.0. The metal shows the sky's colors, so a black sky gives it nothing.
- dark_metals() listed the ball before reflect_sky() and nothing after it.
Why it happens
In a PBR material, metallic 1 turns off the diffuse color: the albedo only tints what the surface reflects. Ambient light only feeds the diffuse part, which is why it brightened the plain ball and did nothing for the metal. With no sky and no reflection probe, the only thing the metal can reflect is the light itself, a small highlight that gets smaller as roughness goes down. We tested with the Compatibility renderer only.
What to change
- Sky colors: they show up in the metal, so pick ones that suit the level, such as warm for a desert or a dim blue for a station interior. Pure black gives no reflection.
- Interiors: a ReflectionProbe lets metal reflect the room around it. We have not measured it here.
- Large flat floors and walls that look stretched: world triplanar UVs.
Ready-made metal surfaces: 24 Sci-Fi PBR Materials are all metallic 1.0 with a metallic map, as Godot 4 .tres files. Their three demo scenes use this same setup: a dark color background, with a procedural sky set for reflections.
Tested in Godot 4.7 with the Compatibility renderer.
Ready-made: 24 Sci-Fi PBR Materials has 24 seamless sci-fi PBR materials as 2K PNG maps, plus a Godot 4 ready version with demo scenes already set up to reflect a sky.
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 a glowing sign or screen actually light the wall around it
- 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