godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.68k stars 20.11k forks source link

Vulkan: VoxelGI metallic materials appear as bright as non-metallic materials in reflections #55335

Open Calinou opened 2 years ago

Calinou commented 2 years ago

Godot version

4.0.dev (5efe80f30)

System information

Fedora 34, GeForce GTX 1080 (NVIDIA 470.74)

Issue description

Metallic materials appear as bright as non-metallic materials in VoxelGI reflections. Since we cannot have reflections within reflections in a performant manner, we should probably try to get closer to the actual rendering of the metallic material somehow. This can likely be done by using a darker color for the voxels (and a less contrasted one somehow, since shadows are less visible on metallic materials).

In addition, this would help make self-reflections less noticeable on metallic materials.

Preview

2021-11-26_01 08 06

Albedo color multiplied by 0.5 on fully metallic material

This was emulated by modifying the sphere material's albedo color, baking the VoxelGI node and resetting the albedo color to its default white.

2021-11-26_01 12 28

Steps to reproduce

Minimal reproduction project

test_gi_texture.zip

clayjohn commented 2 years ago

I'm not sure if just tinting will be appropriate. The trouble is metallic objects take their color from specular reflections. So their color is dependent on the environment around them.

I remember reading about how another game engine solved this problem (I think from one of the real time rendering SIGGRAPH presentations). I'll post a follow up if I can find it.