godotengine / godot

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

Subsurface Scattering Transmittance visual glitches #88083

Open Errorfind opened 4 months ago

Errorfind commented 4 months ago

Tested versions

System information

Godot v4.2.1.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3050 Laptop GPU (NVIDIA; 31.0.15.4633) - 11th Gen Intel(R) Core(TM) i5-11300H @ 3.10GHz (8 Threads)

Issue description

Subsurface scattering transmittance not working well with OmniLights (glitch border dependant on OmniLight's rotation for unknown reason, transmittance only functional from one side of the OmniLight dependant on how the omni light is rotated)

Secondary issue: Visual glitching of transmittance on materials exclusively in the editor (glitch not present in-game)

Steps to reproduce

Add a MeshInstance3D to an empty 3D scene assign any type of Mesh to it give it a material enable Subsurface Scattering in that material enable Transmittance under Subsurface Scattering increase Depth under Transmittance from 0.1 to 3.0

Add an OmniLight to the scene make sure it's not inside the MeshInstance3D enable shadows in that OmniLight

You should be able to notice a sort of "border" on the MeshInstance3D caused by transmittance, rotating the OmniLight will affect how transmittance behaves, which is not a desired behavior at all.

preview of the issue: subsurd omni rotation dependant

preview of the secondary issue: issue 2

Minimal reproduction project (MRP)

Subsurface scattering test.zip

Calinou commented 4 months ago

Visual glitching of transmittance on materials exclusively in the editor (glitch not present in-game)

This may be a variant of https://github.com/godotengine/godot/issues/73697. Can you enable View Information in the 3D viewport's Perspective menu and check the resolution in the bottom-right corner?

Errorfind commented 4 months ago

This may be a variant of #73697. Can you enable View Information in the 3D viewport's Perspective menu and check the resolution in the bottom-right corner?

image

It seems that's likely the same issue, as if subsurface scattering simply had a tendency to break after a while of being enabled and messed around with.

Calinou commented 4 months ago

It seems that's likely the same issue, as if subsurface scattering simply had a tendency to break after a while of being enabled and messed around with.

Your viewport resolution is even on both axes, so it's probably not the same issue :slightly_smiling_face:

Does it appear on and off when the viewport is slowly resized (e.g. when you resize the editor window or drag a splitter next to it)?

Errorfind commented 4 months ago

Your viewport resolution is even on both axes, so it's probably not the same issue 🙂

Does it appear on and off when the viewport is slowly resized (e.g. when you resize the editor window or drag a splitter next to it)?

Nope, it stays the same all the time, even when I close the editor and re-open. Tho the initial time I had the issue it disappeared when I reloaded the project, but now it doesn't seem to go away.