# Subsurface material & light function

**URL:** <https://forums.unrealengine.com/t/subsurface-material-light-function/336267>\
**Category:** Rendering\
**Tags:** bug, subsurface, light-function, unreal-engine, Lighting, question\
**Created:** [October 23, 2015, 6:45pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267 "2015-10-23T18:45:39Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_518c3a4c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_518c3a4c](https://forums.unrealengine.com/u/anonymous_user_518c3a4c)\
**Post date:** [October 23, 2015, 6:45pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/1 "2015-10-23T18:45:39Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_518c3a4c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_518c3a4c](https://forums.unrealengine.com/u/anonymous_user_518c3a4c)\
**Post date:** [October 23, 2015, 7:49pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/2 "2015-10-23T19:49:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_518c3a4c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_518c3a4c](https://forums.unrealengine.com/u/anonymous_user_518c3a4c)\
**Post date:** [October 24, 2015, 5:12pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/3 "2015-10-24T17:12:33Z")

</div>

Bumping…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_518c3a4c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_518c3a4c](https://forums.unrealengine.com/u/anonymous_user_518c3a4c)\
**Post date:** [October 25, 2015, 12:14pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/4 "2015-10-25T12:14:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_518c3a4c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_518c3a4c](https://forums.unrealengine.com/u/anonymous_user_518c3a4c)\
**Post date:** [October 26, 2015, 2:54pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/5 "2015-10-26T14:54:49Z")

</div>

Bumping again…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [October 27, 2015, 7:47pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/6 "2015-10-27T19:47:17Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_518c3a4c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_518c3a4c](https://forums.unrealengine.com/u/anonymous_user_518c3a4c)\
**Post date:** [October 28, 2015, 5:25pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/7 "2015-10-28T17:25:02Z")

</div>

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

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/d/cade4014d0534f3a42b4e9f501cd2112f65e93ea.png)  
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

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/e/5/ee58cbef11286e3fbc6c8062142c8f28479d1657.png)  
This is the same, expect for that the light intensity was set to 0

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/e/a/7ea65caa28a1707c6b2359a113fa5606c2f3b9a1.png)  
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

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/3/893b1ed4eac7dd8ccb4f1752f32d744a07f2ede1.png)  
Applied light function. Notice some weird shadow on the curtains as well

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/3/9/c39fa01d8c55a1b7089d62271b55a3cf85aab0dc.png)  
Set intensity to 0

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/1/1/c11b57705dd97172c3bec0e00d995f3d2de1c621.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_518c3a4c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_518c3a4c](https://forums.unrealengine.com/u/anonymous_user_518c3a4c)\
**Post date:** [October 28, 2015, 5:26pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/8 "2015-10-28T17:26:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [October 28, 2015, 7:54pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/9 "2015-10-28T19:54:22Z")

</div>

Hey BiggestSmile,

I appreciate you deciding to refrain from bumping 🙂

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,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_518c3a4c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_518c3a4c](https://forums.unrealengine.com/u/anonymous_user_518c3a4c)\
**Post date:** [October 29, 2015, 7:19am UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/10 "2015-10-29T07:19:43Z")

</div>

Hey , thank you for the reply 🙂

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 🙂

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 🙂

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 🙂

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 🙂

Thank you!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [October 29, 2015, 5:54pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/11 "2015-10-29T17:54:09Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_518c3a4c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_518c3a4c](https://forums.unrealengine.com/u/anonymous_user_518c3a4c)\
**Post date:** [October 30, 2015, 9:28am UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/12 "2015-10-30T09:28:55Z")

</div>

Thank you very much ! 🙂 Have a nice day 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_518c3a4c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_518c3a4c](https://forums.unrealengine.com/u/anonymous_user_518c3a4c)\
**Post date:** [November 9, 2015, 6:28pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/13 "2015-11-09T18:28:07Z")

</div>

Hey , any news on the subject? 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [November 9, 2015, 10:11pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/14 "2015-11-09T22:11:02Z")

</div>

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.

 ![66192-subsurfacedocumentation.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/c/d/9cdef835db4e695a95e1dc76f5ffd1e178ba7bda.png)

**Subsurface Material**

 ![66193-subsurfacematerial.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/c/d/fcd9bbd3a7fec5f09b6ffd6422762779866f16c1.jpeg)

Thank you,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_518c3a4c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_518c3a4c](https://forums.unrealengine.com/u/anonymous_user_518c3a4c)\
**Post date:** [November 10, 2015, 5:55pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/15 "2015-11-10T17:55:38Z")

</div>

I’ve made sample project, you can get it [here](https://drive.google.com/file/d/0BxO0Emait7xdcjJlZndPX09GclE/view?usp=sharing) (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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_518c3a4c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_518c3a4c](https://forums.unrealengine.com/u/anonymous_user_518c3a4c)\
**Post date:** [November 14, 2015, 2:18pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/16 "2015-11-14T14:18:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [November 14, 2015, 4:36pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/17 "2015-11-14T16:36:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [November 25, 2015, 2:12pm UTC](https://forums.unrealengine.com/t/subsurface-material-light-function/336267/18 "2015-11-25T14:12:17Z")

</div>

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.
