Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Limit minimal roughness #19175

Closed
CptPotato opened this issue May 26, 2018 · 3 comments
Closed

Proposal: Limit minimal roughness #19175

CptPotato opened this issue May 26, 2018 · 3 comments

Comments

@CptPotato
Copy link
Contributor

CptPotato commented May 26, 2018

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.

@bladesero
Copy link

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

@ghost
Copy link

ghost commented Aug 28, 2018

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.)

@Calinou
Copy link
Member

Calinou commented Jun 19, 2020

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.

@Calinou Calinou closed this as completed Jun 19, 2020
@Calinou Calinou added this to the 3.2 milestone Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants