Skylight only. Since Skylight has Lower Hemisphere being black, it’s only casting light from above hence you see red on the bottom, but it should have been grey all the way since skylight is not a directional light source but is an ambient light.
So I asked around to confirm what you are saying, but Skylights are expected to affect Subsurface Scattering. This is because Skylights are still emitting photons whether direct or indirect, it makes no difference. Now, the actual phenomenon in real life outside of video games, the effect can be more visible and pronounced with direct lighting; however, in Unreal we are dealing with calculating emitted photons from all light sources. There is no difference between Skylight photons and Directional Light photons, and in reality there is no difference between direct and indirect light, its only a term we use in rendering since direct lighting is much easier to calculate.
I ran some tests on my end just to see for myself, and its outcome is clear and expected.
As you can see I used a completely black input for my base color. I also exposed the opacity input as this determines the amount of simulated light scattered to show the SS effect.
In summary the results I am getting are expected because the Skylight is still emitting photons which is going to be picked up by the Subsurface Color. Thanks for taking the time to test the issue, but this is not a bug and just how subsurface scattering works with lighting in the engine.
That’s not quite right. It works a bit different from what you said.
Direct light and indirect light have different density in real life. That’s why when you put a flashlight behind your hand you see your hand getting a red tone, and when you remove the flashlight from the room, even though the room is fully lit by indirect light, you don’t see that red tone on your hand anymore. Let’s take a look at the example below, I believe this helps to better demonstrate the issue.
This is a room lit by indirect light, then there’s a flashlight on the table, and a hand covering the flashlight.
What you said above essentially means that if we remove the flashlight from the picture above, the hand should still have that red tone because there are still indirect light in the room hitting the hand. That’s wrong because i.e 5000 photons from flashlight hitting the hand is not the same as 1000 photons from indirect light hitting the hand, indirect light is sparse photons and not a photon source focused on one direction like a direct light source, hence, indirect light leaves far less noticeable. The reason you don’t see your whole body being red under overcast sky is because all that indirect light does not equal to the direct light from a tiny flashlight that makes your hand look red.
As you know, the correct behavior would be for the hand to lose all that red tone as soon as the flashlight is removed. Which means, your green looking ball should lose all the green SSS color as soon as the directional light is removed, and under the skylight it should look black (as your base color is) and with a very, very hard to notice dark shade of green to it.
Did I make a mistake by comparing a real life situation to how you handle things in your engine? as far as I know game engines try to replicate real life situations. Your rendering guys might just not be in the mood it seems like because without a flashlight, you neither have a red hand in real life, nor in other game engines. But you do in UE4.
The problem here is that you are comparing a real life situation, with how we handle things in the engine. The information I shared came directly from one of our rendering guys who knows lighting and materials very well. I understand your points about SS in the real life, but what you are seeing as described to me is what is expected. As you are aware, the engine cannot simulate every real life lighting situation as that would be incredibly complex and not really easy to use for games. We use a number of different techniques and features to simulate and fake various effects to try and resemble phenomenons like SSS. This is the beauty of game design, it sometimes doesn’t work out of the box like you would expect, so you will need to find a way to work around the problem if it is that much of an issue, which I am sure you can figure out
It’s not necessarily an incredibly complex calculation for a game. It’s as simple as reducing Skylight’s power on SSS. I just think they weren’t informed very well of the issue. Can you please possible have him read through this report once?
If this behavior is expected, yet rendering does not reflect the effect properly -
should not this at least be logged into issue tracker?
Indirect lighting SSS is messing with proper direct lighting SSS setup which engine tries to provide. While we can try to find workarounds it does not mean that issue should not be treated like not an issue at all.
It looks like a bug more and more. Here are two scenarios:
Directional Light
Create abovementioned material with SSS color
Create movable Directional light and look how it influence SSS
Change it to Static/Stationary, build lighting and look how it influence SSS
It works properly and material get proper SSS intensity during built static light and during movable state
Sky Light
Create abovementioned material with SSS color
Create movable Sky light and look how it influence SSS
Change it to Static/Stationary, build lighting and look how it influence SSS
Material get proper SSS intensity(NONE) only during built static/stationary light and get full 1.0 value during movable state. So either someone forgot to change value for movable state or by design Directional light contributes to SSS properly in all modes, but Sky light works properly only in half of cases.
Also, I might found relevant bit in SkyLighting.usf which responsible for diffuse lighting in Movable mode. Here is code snippet
Yeah looked alright in old builds. But even then the effect was exaggerated. The green should be ever more subtle, but anyway, I hope that’s enough evidence to consider this a bug @AndrewHurley. Please show your rendering guys Deathrey’s old vs. new build comparison. Thanks.
It is being applied further down, to all sky lighting as a whole, not to SS color in particular. What troubles me is that means that skylight affects diffuse and SSS in a same way. I don’t think it should. I actually added additional sky weighting for SS color in response to my artist’s complaints about not being able to produce consistent look of objects with SSS under various lighting conditions.
Information about 4.12 might have been a bit misleading from me. I’ve implemented a change in response to my artist’s complaints about not being able to get expected look for SSS objects in overcast skies and difference between static and movable skylights. So might not be actually a newly introduced bug. Complaints about skylight overly affecting SSS materials are still fully valid though.
Thanks Andrew.
The repro steps on the ticket seem to be wrong though.
If you uncheck affect world on skylight the scene everything goes black and it’s no longer visible how skylight is influencing the SSS.
They are correct, since I set the Skylight on by default in the test project provided. The point is to show the visual influence Skylights have when the are on vs. off so getting them to visualize either state is important. I updated the steps to also add switching between Stationary and Movable and comparing those results.
Actually both Stationary and Movable skylight result in the same wrong behavior so if they do that they wouldn’t see any visual different. As mentioned by @zeOrb only static Skylight with built lighting shows the correct result.