# Adding Texture to a Directional Light?

**URL:** <https://forums.unrealengine.com/t/adding-texture-to-a-directional-light/490844>\
**Category:** Asset Creation\
**Tags:** Sky, unreal-engine, directional-light, Lighting, Blueprint, question\
**Created:** [November 11, 2021, 11:59pm UTC](https://forums.unrealengine.com/t/adding-texture-to-a-directional-light/490844 "2021-11-11T23:59:10Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![NoDrone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nodrone/32/466795_2.png) [@NoDrone](https://forums.unrealengine.com/u/NoDrone)\
**Post date:** [November 11, 2021, 11:59pm UTC](https://forums.unrealengine.com/t/adding-texture-to-a-directional-light/490844/1 "2021-11-11T23:59:10Z")

</div>

Hello

I have a question pertaining to the SkyAtmosphere actor / component in Unreal. As you can see. I have a blank scene with a SkyAtmosphere and a directional light (since it is required for use with SkyAtmosphere) that I have renamed “Sun.”

I have included a rough mockup of the type of thing I’m trying to achieve. Would anyone be so kind as to to point me in the right direction as to how I would accomplish adding a texture like this to the directional light, aka the Sun.

Thank you for any insight … I am a big newb.

 ![352052-sunwithtexture.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/4/3/f433088fb5fb0eb8ee761a0c63181e8ebae1840c.jpeg)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 12, 2021, 12:46pm UTC](https://forums.unrealengine.com/t/adding-texture-to-a-directional-light/490844/2 "2021-11-12T12:46:47Z")

</div>

What effect would adding a texture have on the light, if you could do it? What are trying to achieve?

---

<div class="post-metadata">

**Author:** ![NoDrone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nodrone/32/466795_2.png) [@NoDrone](https://forums.unrealengine.com/u/NoDrone)\
**Post date:** [November 12, 2021, 2:30pm UTC](https://forums.unrealengine.com/t/adding-texture-to-a-directional-light/490844/3 "2021-11-12T14:30:24Z")

</div>

Well since the directional light is necessary to act as the sun for the skyatmosphere component, I wish to customize the look of said light for artistic purposes, to make it appear like a giant planet / star on the horizon. The image I attached is just an overlay in photoshop to show what I’m trying to achieve.

There’s 2 images actually, one w/ the photoshop manipulation and one without it.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 12, 2021, 2:36pm UTC](https://forums.unrealengine.com/t/adding-texture-to-a-directional-light/490844/4 "2021-11-12T14:36:43Z")

</div>

Ah… I don’t think that’s part of the directional light capabilities. Sure you can make it look like a disc, but there’s no configuration of the disc to make it look like a planet ( unless I totally missed a meeting ).

What you need to do is actually make a planet or star, as an actor, and put it in the area where the directional light seems to be coming from.

The directional light itself can be at 0,0,0. It makes no different where you put it.

---

<div class="post-metadata">

**Author:** ![NoDrone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nodrone/32/466795_2.png) [@NoDrone](https://forums.unrealengine.com/u/NoDrone)\
**Post date:** [November 12, 2021, 2:58pm UTC](https://forums.unrealengine.com/t/adding-texture-to-a-directional-light/490844/5 "2021-11-12T14:58:24Z")

</div>

Hmm … so you’re saying the only way to accomplish this is to track the “rotation” of the directional light and place an actor that follows and overlaps it since the skyatmosphere is using the rotation to visually represent the light’s position in the sky?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 12, 2021, 3:34pm UTC](https://forums.unrealengine.com/t/adding-texture-to-a-directional-light/490844/6 "2021-11-12T15:34:15Z")

</div>

You could do that. Not too difficult. One blueprint containing a mesh. Because you’d want it to rotate as well ( on it’s own axis ), which the directional light doesn’t.

Like I say, if you want anything that looks like a typical sun, you can configure the default system. It’s only when you want otherworldly looks, you have to do your own thing.

---

<div class="post-metadata">

**Author:** ![NoDrone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nodrone/32/466795_2.png) [@NoDrone](https://forums.unrealengine.com/u/NoDrone)\
**Post date:** [November 13, 2021, 9:41pm UTC](https://forums.unrealengine.com/t/adding-texture-to-a-directional-light/490844/7 "2021-11-13T21:41:45Z")

</div>

Okay I will mess around with a custom blueprint for the SkyAtmosphere and the Directional Light and see if I can make anything happen. Thanks for the insight Clockwork I will try and report back if I find success in accomplishing this.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 14, 2021, 9:10am UTC](https://forums.unrealengine.com/t/adding-texture-to-a-directional-light/490844/8 "2021-11-14T09:10:51Z")

</div>

Ok that’s good. But to be clear, you can leave the skyatmos as is, and the directional light. But you new BP can contain the planet, move itself, and move the directional light along with it 🙂

---

<div class="post-metadata">

**Author:** ![NoDrone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nodrone/32/466795_2.png) [@NoDrone](https://forums.unrealengine.com/u/NoDrone)\
**Post date:** [November 14, 2021, 6:44pm UTC](https://forums.unrealengine.com/t/adding-texture-to-a-directional-light/490844/9 "2021-11-14T18:44:48Z")

</div>

Oh … I see. Well I was just thinking since I’ve renamed the directional light **sun** and if the “mesh” / “texture” or whatever I use will be referencing the rotation property of the directional light …

Wouldn’t it make sense to just make a custom blueprint directional light and try and add that functionality to it? That way the new functionality would be contained within the custom _dir. light_ blueprint and not a separate one that works in conjunction with a default light? Is that flawed reasoning? Otherwise I’m going to have to cast to the directional light every time instead of just being able to reference itself within the blueprint?

Sorry I really am new to Unreal trying my best to understand how all this works. I like to keep things organized and efficient if possible. I appreciate your help.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 14, 2021, 7:07pm UTC](https://forums.unrealengine.com/t/adding-texture-to-a-directional-light/490844/10 "2021-11-14T19:07:37Z")

</div>

As a newbie, you have a case of ‘cast-itis’. No cast necessary 🙂

I wouldn’t recommend putting the directional light in a BP. You can, but you’re probably going to confuse the sky atmos system ( if you’re using that ).

Best thing is your ‘sun planet blueprint’ to use ‘getactorofclass’ to get a reference to the light, then you’re set.

---

<div class="post-metadata">

**Author:** ![iiMStevo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@iiMStevo](https://forums.unrealengine.com/u/iiMStevo)\
**Post date:** [April 16, 2022, 1:02am UTC](https://forums.unrealengine.com/t/adding-texture-to-a-directional-light/490844/11 "2022-04-16T01:02:59Z")

</div>

Did you ever figure this out?  
I wanted to do the same with an actual “Moon” mesh I’d created, but found it very difficult to trace the Moon’s position across the sky with only the rotation angles.

---

<div class="post-metadata">

**Author:** ![PianistaMacabro](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pianistamacabro/32/524997_2.png) [@PianistaMacabro](https://forums.unrealengine.com/u/PianistaMacabro)\
**Post date:** [September 22, 2024, 2:33am UTC](https://forums.unrealengine.com/t/adding-texture-to-a-directional-light/490844/12 "2024-09-22T02:33:13Z")

</div>

Create a variable or use all actor of class to get the outliner reference for the directional light. Multiply -1 to get the right forward vector direction and set the world location with a tick or timer

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/d/f/adfc229730f5bdc28fbf2e042056c6e98fcb6391.png)
