godotengine / godot

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

SDFGI roughness is not looking great #79072

Open Muini opened 1 year ago

Muini commented 1 year ago

Godot version

4.0.3

System information

MacOS - 4.0.3 - Forward+ - Vulkan

Issue description

SDFGI reflection is not looking good when using 0.0 to 0.2 roughness material and not realistic from 0.2 to 0.6. There is a weird expansion in the first range, then the sdf reflection are completly blurred out from .1 to .2. It's going rough very fast.

https://github.com/godotengine/godot/assets/6160740/acb6da1d-6d24-4ba8-a830-027133822e93

Compared to VoxelGI (normal bias set to 2), which looks great and seems more realistic (although VoxelGI colors are washed out):

https://github.com/godotengine/godot/assets/6160740/8e32cb5e-725d-4d30-90d1-49b7f80dfdd8

SSR (with highest quality in advanced project settings) roughness is a bit better than SDFGI but also not as good VoxelGI. Also the SSR opacity seems too weak. I wonder if I should create a issue just for SSR roughness ?

https://github.com/godotengine/godot/assets/6160740/1ef02ec1-5ba8-488b-8877-a255e7f767de

Anyway, that would be nice to unify and make roughness beautiful, hope this help!

Steps to reproduce

Minimal reproduction project

SDFGI Roughness.zip

Calinou commented 1 year ago

The precision of sharp SDFGI and VoxelGI reflections is limited by the cell size of the underlying data (SDF pixels or voxels). This means they will never look great for small details compared to SSR, but they can be visible when off-screen. For best quality with pure rasterization, you need to combine a screen-space technique with a probe-based technique (or baked lighting), which is what AAA games typically do at high/ultra settings.

SDFGI will be rewritten to improve everything about it at some point, but it's unlikely to be finalized for 4.2.

Muini commented 1 year ago

@Calinou Thanks for the precision. I was mostly talking about the blurring happening equaly through the reflected part of SDFGI instead of using (maybe not true) the depth on the VoxelGI; it's blurring progressively from the farthest reflection to the closest. It matters a lot for materials that have middle roughness, like plaster or dirty tiles. SDFGI will make them look completely rough while voxelgi will make them look great with subtle but important blurred reflections.