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

graphical issues with material_tester demo [MESA, Linux] #9525

Closed
novemberist opened this issue Jul 6, 2017 · 24 comments · Fixed by #10570
Closed

graphical issues with material_tester demo [MESA, Linux] #9525

novemberist opened this issue Jul 6, 2017 · 24 comments · Fixed by #10570

Comments

@novemberist
Copy link

novemberist commented Jul 6, 2017

Operating system or device - Godot version:
Arch Linux, Intel HD4000 (Mesa 17.1.4), Godot 3 master

Issue description:
I ran into a couple of graphical issues (glitches?) running the new material tester demo.
see the attached screenshot for details.

  1. The grid-like artifacts all over the place (especially visible in the lower left part of the image)
    I suspect this is either a driver issue or a quality setting of sorts?

  2. The cheese example has this strange lighting effect on top, if you zoom in, select the Lobby as a background and move the camera a specific way so the window is behind the cheese.
    This doesn't look realistic, since cheese should neither reflect so much light nor let it pass through the material so much.

cheese

@ghost
Copy link

ghost commented Jul 6, 2017

I also have this issue.
Antergos x86_64 - Godot 3.0 master branch
(I'm probably using Intel/Mesa. I don't really know how to get hardware/driver info so I'll just spam command output in here. :P)

00:02.0 VGA compatible controller: Intel Corporation 4th Generation Core Processor Family Integrated Graphics Controller (rev 06)
...
01:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev a1)
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel Open Source Technology Center (0x8086)
    Device: Mesa DRI Intel(R) Haswell  (0x41e)
    Version: 17.1.4
    Accelerated: yes
    Video memory: 1536MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.5
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
...
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Haswell 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.1.4
...
OpenGL version string: 3.0 Mesa 17.1.4
...
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.1.4

@akien-mga
Copy link
Member

akien-mga commented Jul 6, 2017

(off-topic)

(I'm probably using Intel/Mesa. I don't really know how to get hardware/driver info so I'll just spam command output in here. :P)

00:02.0 VGA compatible controller: Intel Corporation 4th Generation Core Processor Family Integrated Graphics Controller (rev 06)
01:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev a1)

You're indeed using Intel Haswell, though you do have a NVIDIA discrete GPU (Optimus) which you don't use. Check https://wiki.archlinux.org/index.php/NVIDIA_Optimus if you'd like to learn how to use it.

@akien-mga akien-mga added this to the 3.0 milestone Jul 6, 2017
@akien-mga akien-mga changed the title graphical issues with material_tester demo graphical issues with material_tester demo [intel, Linux] Jul 6, 2017
@novemberist
Copy link
Author

So I played around with the environment settings a bit and found out that the "grid effect" is caused by SSAO. Turning off SSAO completely or changing the bias settings to a higher value removes or reduces the effect. I suppose AO bias settings shouldn't really be gpu or driver specific?

@akien-mga
Copy link
Member

So I played around with the environment settings a bit and found out that the "grid effect" is caused by SSAO. Turning off SSAO completely or changing the bias settings to a higher value removes or reduces the effect. I suppose AO bias settings shouldn't really be gpu or driver specific?

That part might be #8708.

@novemberist
Copy link
Author

Sounds like it's indeed a matter of the bias setting for the SSAO. However, Juan's default for this demo seemed to have worked for him (and others too) - so I guess this is still a gpu/driver specific issue.

@ghost
Copy link

ghost commented Jul 6, 2017

So I've enabled secondary GPU and used both simultaneously.
Both have different issues.
Left: Nvidia/Nouveau (DRI_PRIME=1) | Right: Intel/Mesa

screenshot from 2017-07-06 15-52-33
The issue on Nvidia/Nouveau won't happen until the scene is reloaded. The object will flash black then shadow artifacts appear.

The following screenshot is when the scene is not reloaded yet.
screenshot from 2017-07-06 15-55-34

@novemberist
Copy link
Author

Have you tried the proprietary Nvidia driver yet? I think Nouveau also uses Mesa for its 3D rendering.

@ghost
Copy link

ghost commented Jul 6, 2017

Using proprietary driver: Works perfectly. No any of the mentioned artifacts. Demo runs with higher framerate. ( Sorry, RMS :( )

screenshot from 2017-07-06 16-40-29

Edit: The light issue with cheese is still there though.
screenshot from 2017-07-06 16-49-13

@reduz
Copy link
Member

reduz commented Jul 6, 2017

For the SSAO issue, I think this is probably MESA's fault, we should probably report it
The cheese issue needs a bugfix, but i don't remember it being that bad, will have to check

@akien-mga
Copy link
Member

I'll try to ask MESA devs for guidance on how we can debug that/report issues efficiently to them.

@akien-mga akien-mga changed the title graphical issues with material_tester demo [intel, Linux] graphical issues with material_tester demo [MESA, Linux] Jul 6, 2017
@godotengine godotengine deleted a comment from himaghnam Jul 6, 2017
@eon-s
Copy link
Contributor

eon-s commented Jul 7, 2017

On 7c679dd with AMD Carrizo (R5) amdgpu, MESA 17.1.2, if I manage to pass the import (sometimes hangs the system, like Unreal when running) it looks really good but has the same cheesy problem as the OP.

badcheese

And turning off SSAO does not solve the problem.

@eon-s
Copy link
Contributor

eon-s commented Jul 7, 2017

Turning on ¨follow surface¨ ssurf scattering option makes the cheese looks like it should, could it be related?

@vnen
Copy link
Member

vnen commented Jul 7, 2017

@eon-s the bug with the cheese material is not related to SSAO, but to subsurface scattering (see #9530). This issue is not driver related. The problem with SSAO on MESA is the grid-like artifacts.

@eon-s
Copy link
Contributor

eon-s commented Jul 7, 2017

@vnen ah, okok, I was confused by the kaleidoscopic cheeses.

I don't see any SSAO artifact with that configuration then.

@rredesigns
Copy link

I saw a similar problem trying out Evee engine in the new Blender release. So I assume this is going to be quite a pain to resolve. xD

@reduz
Copy link
Member

reduz commented Aug 21, 2017

I am still out of Intel HD 4000 to test. Anyone else will have to fix the SSAO problem. The subsurf scattering problem i'm working on it

@reduz
Copy link
Member

reduz commented Aug 21, 2017

subsurf scatter issue is a duplicate of #9530

@reduz
Copy link
Member

reduz commented Aug 22, 2017

subsurf scatter issue is fixed, can't test SSAO

@novemberist
Copy link
Author

novemberist commented Aug 22, 2017

Arch Linux, HD4000 with Mesa 17.1.7

This is how the material tester demo looks on my system right now. Godot and the Demo are both on the latest version. observations:

screenshot_20170822_144559

[edit]
Some of my initial observations were a little pre-mature and are actually non-issues.

@groud
Copy link
Member

groud commented Aug 22, 2017

I have the same issue on the same configuration.
I may investigate a little bit, but I'm not a shader expert.

@novemberist
Copy link
Author

novemberist commented Aug 22, 2017

With a SSAO-Bias setting of about 0.4 (from default 0.01) all of the artifacts are gone. However, there also doesn't seem to be any visible effect os SSAO being enabled

bias

[edit]
This is probably not related at all, but the only thing I could find on the internet regarding HD4000 + SSAO was this issue from Super Tux Kart.
supertuxkart/stk-code#1751

This doesn't look at all like the artifacts we are seeing here, but maybe the way they fixed their issue helps in some way:
supertuxkart/stk-code@cdae595

@groud
Copy link
Member

groud commented Aug 22, 2017

If I apply the following patch, I've got no artifacts anymore:

-	float randomPatternRotationAngle = float((3 * ssC.x ^ ssC.y + ssC.x * ssC.y) * 10);
+	//float randomPatternRotationAngle = float((3 * ssC.x ^ ssC.y + ssC.x * ssC.y) * 10);
+	float randomPatternRotationAngle = 0.0;

need to investigate :)

@groud
Copy link
Member

groud commented Aug 23, 2017

@novemberist , could you check with the last master if the issue is still present ?

@novemberist
Copy link
Author

Already did. It's gone for me :) Good job! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants