Godot: Proposal: Limit minimal roughness

Created on 26 May 2018  路  3Comments  路  Source: godotengine/godot

Godot version: 3.0.2

In the current implementation of physically based rendering (PBR) the roughness value is allowed to go very low, causing extreme flickering of the specular highlights when moving. Because of the normalization that's used in the specular calculations (energy conservation) you get tiny highlights with an insane brightness that are prone to aliasing.
This sometimes even results in black artifacts (I assume the values go out of range and bleed into a black halo due to the bloom/glow blurring).

Here's a screenshot of how extreme the differences can be:
flicker.png

Reproduce: Take the materials demo and enable "Glow" in the enviroment node. Then look at the second material "mirror" while moving. You might have to adjust the settings a bit more to get as extreme results as me but it should definitely be visible.

While it's a special case (roughness = 0), this produces too extreme artifacts / flickering in my opinion. Engines usually limit the roughness to a value that's low enough to still allow shiny surfaces while reducing the flickering to a minimum.

Possible solution: Increase the minimum roughness limit (if there alredy is one) or add one.
A limit which is adjustable from the editor if needed would be an alternative to hardcoding it.

enhancement rendering

Most helpful comment

Yeah, it should add a minimum roughness limit or add an Anti-Flicker option for Glow.

All 3 comments

Yeah, it should add a minimum roughness limit or add an Anti-Flicker option for Glow.

A roughness of 1 causes major graphical glitches when the specular mode is set to Phong:

GLES3:
image

GLES2 (all materials seem to implicitly use Phong specular mode regardless of what is set, which makes this a big problem):
image

This was tested with 3.1-alpha a651dbf. I'm just relaying info from #21513 here, since they both are a result of extreme roughness values being set. Maybe this issue should be renamed to "Limit extreme roughness values" or something, to better accommodate this (so I can close the other one as a duplicate.)

This should be fixed in Godot 3.2, closing. Note that Godot 4.0 also features an optional screen-space roughness limiter to decrease the amount of visible specular aliasing.

Was this page helpful?
0 / 5 - 0 ratings