Subsurface material & light function

Hey,

i’ll start with a scene description: i have a mesh that uses Subsurface shading model. I have a light(point light) with a light function that completely disables any lighting(emissive output set to 0).
It works with other shading models, they receive no lighting in this case, but doesn’t work on a Subsurface materials, they’re still lit with it. However, just a subsurface shading is present. If i manually set light intensity to 0, subsurface shading is gone…

I hope the description is clear enough… Thank you!

I believe that’s not a bug report actually, but a feature request…

Bumping…

Noticed that this happens only with point lights, spot lights haven’t got this problem

Bumping again…

Hey BiggestSmile,

We ask that our users remain patient when awaiting a response. We usually respond within 24 to 48 hours, but we ask users do not bump ever, and only ask for updates after the two day time period has expired.

Could you provide me with some reproducible steps as well as some screenshot so I can visualize what you are reporting?

Your description is somewhat clear, but gaining clarification so I can verify what you are reporting is necessary for testing.

Thank you,

Hey , sorry for the dumping… Won’t do anymore :slight_smile:
Sure :slight_smile:
Here i have point light. This is stationary. The bed and the sheet materials are using Subsurface shading model


This is what i have when i set light function material. Direct lighting is gone, but subsurface lighting is still present. Light function is really simple: just a black Vector3 node attached to emissive color


This is the same, expect for that the light intensity was set to 0


And while taking the screenshot found out that spot lights are actually affected…

Curtains use Subsurface shading model
Light is on, no light function is applied


Applied light function. Notice some weird shadow on the curtains as well


Set intensity to 0

Hope this helps. Let me know if you need anything else!

Hey BiggestSmile,

I appreciate you deciding to refrain from bumping :slight_smile:

So looking into this issue, I found some information about Light Function Materials within the tooltip. I believe this to be your issue in conjunction with some post processing and light actors you might need to disable.

Firstly, in regards to the light function material, the tooltip reads, “Note that only non-lightmapped lights (UseDirectLightMap=False) can have a light function.” Since your light is set to Stationary, you are using lightmaps which means the light function will not work as you expect.

Your next issue seems to be with your Auto-Exposure setting within your Post Processing. In order to see your scene without this post processing effect, you will want to set the Min and Max brightness to a value of 1.0.

Let me know if you need help or have further questions.

Cheers,

Hey , thank you for the reply :slight_smile:

Stationary light itself isn’t lightmapped, the lighting is still dynamic. Only indirect lighting contributed by this light is in the lightmaps. In other words, for this light UseDirectLightmap=false :slight_smile:

And this is what docs say about light functions: “Also, Static Lights cannot not use Light Functions, as this feature is only available for non-lightmapped lights, like Stationary and Movable lights.”. Changing light mobility to movable doesn’t do anything, since stationary light is still “almost” movable :slight_smile:

I didn’t modify exposure settings in a post-process volume, they’re default. And turning it off darkens the room completely, since this is a night setting, it’s an expected result :slight_smile:

The problem is how light functions work, light intensity is masked in the world by the light function, while the actual intensity value is still present, and subsurface materials uses this. As i said earlier, that’s not an actual bug, it’s more of a feature request :slight_smile:

Thank you!

I do see what you are saying now, and I appreciate the clarification. I will take this information and try to generate a feature request that summarizes what you have pointed out.

Thanks,

Thank you very much ! :slight_smile: Have a nice day :slight_smile:

Hey , any news on the subject? :slight_smile:

In order for the feature request to be completed. We need to make sure you have set up your material correctly. The reason I need this, is because I followed your instructions using a light function and a single stationary point light, and did not receive the same results.

Subsurface Material

Thank you,

I’ve made sample project, you can get it here (4.9.2)

By default light function intensity is set to 0, the shadows and the lighting is still present on the curtains mesh, and only on the curtains

P.S. the curtains mesh uses masked blend mode, changing it to opaque does not resolve the problem

I’m sorry for bumping, but it’s 3rd day by now :slight_smile:

I have entered a feature request for this issue UE-23357. If this becomes a feature we will add it to our release notes.

Cheers,

H

This is a known limitation of the Subsurface shading model. It’s a bit more difficult to implement for point lights and spot lights, but certainly possible. We intend to improve the method and know about it. It’s unclear when we will find the time to do that.