# Light Function not working in PIE

**URL:** <https://forums.unrealengine.com/t/light-function-not-working-in-pie/402360>\
**Category:** Rendering\
**Tags:** light, light-function, unreal-engine, bug-report, Clouds, directional-light, question\
**Created:** [August 20, 2017, 8:26pm UTC](https://forums.unrealengine.com/t/light-function-not-working-in-pie/402360 "2017-08-20T20:26:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_416b781b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_416b781b](https://forums.unrealengine.com/u/anonymous_user_416b781b)\
**Post date:** [August 20, 2017, 8:26pm UTC](https://forums.unrealengine.com/t/light-function-not-working-in-pie/402360/1 "2017-08-20T20:26:41Z")

</div>

I’m using a light function to render clouds on a landscape. The rendering of the light function works fine in the realtime editor screen, but not when playing in the editor.

I’ve made a video for demonstration: [Dropbox - LightFunctionProblem.avi - Simplify your life](https://www.dropbox.com/s/h9qb967iekmhntd/LightFunctionProblem.avi?dl=0)

As you can see the cloud shadows are visible in the editor screen, but vanish as soon as I press the play button. Furthermore, I can only display the light function when I **manually** change a variable of the directional light component through the editor interface. **If I try to change a variable through blueprints the light function still does not render.**

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d2b909bf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d2b909bf](https://forums.unrealengine.com/u/anonymous_user_d2b909bf)\
**Post date:** [August 25, 2017, 10:18pm UTC](https://forums.unrealengine.com/t/light-function-not-working-in-pie/402360/2 "2017-08-25T22:18:47Z")

</div>

Hello ,

I was unable to reproduce your issue on our end. I have a couple of questions to help me narrow down the issue you are experiencing.

1. Are you able to reproduce this issue in a new project?
2. If so, could you provide a detailed list of steps so that I can reproduce this issue on our end?

Thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d2b909bf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d2b909bf](https://forums.unrealengine.com/u/anonymous_user_d2b909bf)\
**Post date:** [September 1, 2017, 5:35pm UTC](https://forums.unrealengine.com/t/light-function-not-working-in-pie/402360/3 "2017-09-01T17:35:55Z")

</div>

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_416b781b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_416b781b](https://forums.unrealengine.com/u/anonymous_user_416b781b)\
**Post date:** [September 1, 2017, 9:28pm UTC](https://forums.unrealengine.com/t/light-function-not-working-in-pie/402360/4 "2017-09-01T21:28:59Z")

</div>

Hi ,

I was able to resolve the problem. I used a wrong MaterialParameter string which resulted in a wrong sun direction value. Since this isn’t an engine bug this question post can be deleted. Thank you for your help and sorry for any inconveniences.
