# Light function - projected image offset

**URL:** <https://forums.unrealengine.com/t/light-function-projected-image-offset/431705>\
**Category:** Rendering\
**Tags:** Lights, light-function, unreal-engine, question\
**Created:** [August 15, 2018, 4:42pm UTC](https://forums.unrealengine.com/t/light-function-projected-image-offset/431705 "2018-08-15T16:42:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![joelbenjamin](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/joelbenjamin/32/754794_2.png) [@joelbenjamin](https://forums.unrealengine.com/u/joelbenjamin)\
**Post date:** [August 15, 2018, 4:42pm UTC](https://forums.unrealengine.com/t/light-function-projected-image-offset/431705/1 "2018-08-15T16:42:05Z")

</div>

I have a light with a light function material, that’s basically having the light project an image.

My issue is - the light is tiling the image when it’s projecting it, and it’s offset from the center of the light - basically by half. This is shown in #1 in the image…

If I move the light, I can sort of line up the projection, but then the lighting is off… shown in #2 in the image

 ![250566-light-function.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/f/c/9fc538c8380569ba3fe44c093412bb796173b3ee.jpeg)

---

<div class="post-metadata">

**Author:** ![redbox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@redbox](https://forums.unrealengine.com/u/redbox)\
**Post date:** [August 16, 2018, 2:40am UTC](https://forums.unrealengine.com/t/light-function-projected-image-offset/431705/2 "2018-08-16T02:40:36Z")

</div>

In texture parameters set x and y adress to Clamp - this will remove tiling.

In light function material add TextureCoordinate node to texture, and add vector2 (0.5, 0.5) to it - this will make texture offset.

---

<div class="post-metadata">

**Author:** ![joelbenjamin](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/joelbenjamin/32/754794_2.png) [@joelbenjamin](https://forums.unrealengine.com/u/joelbenjamin)\
**Post date:** [August 16, 2018, 2:35pm UTC](https://forums.unrealengine.com/t/light-function-projected-image-offset/431705/3 "2018-08-16T14:35:35Z")

</div>

Awesome, that basically solves my biggest issue - with the texture clamping.

I’m not 100% sure how to add a vector to the TextureCoordinate node because there are no inputs in it, but that’s likely my ignorance in play…

---

<div class="post-metadata">

**Author:** ![redbox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@redbox](https://forums.unrealengine.com/u/redbox)\
**Post date:** [August 16, 2018, 2:39pm UTC](https://forums.unrealengine.com/t/light-function-projected-image-offset/431705/4 "2018-08-16T14:39:27Z")

</div>

Press 2 on keyboard and click in material editor - this will create vector2 parameter. then add it to texturecoordinate with (-0.5, -0.5), or subtract with (0.5, 0.5)

---

<div class="post-metadata">

**Author:** ![redbox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@redbox](https://forums.unrealengine.com/u/redbox)\
**Post date:** [August 16, 2018, 2:40pm UTC](https://forums.unrealengine.com/t/light-function-projected-image-offset/431705/5 "2018-08-16T14:40:17Z")

</div>

or create simple scalar (float) and add it. it will work also.

---

<div class="post-metadata">

**Author:** ![joelbenjamin](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/joelbenjamin/32/754794_2.png) [@joelbenjamin](https://forums.unrealengine.com/u/joelbenjamin)\
**Post date:** [August 16, 2018, 2:43pm UTC](https://forums.unrealengine.com/t/light-function-projected-image-offset/431705/6 "2018-08-16T14:43:31Z")

</div>

Sorry - I know how to create the vector node, but I mean, the textureCoordinate node itself doesn’t have any inputs - how do I connect the vector to it?

Or am I to be connecting the vector2 somewhere other than the textureCoordinate node?

 ![250668-coord.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/6/5/c650f01a9143c31a1f24c5e38504431ebc491bbd.jpeg)

---

<div class="post-metadata">

**Author:** ![redbox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@redbox](https://forums.unrealengine.com/u/redbox)\
**Post date:** [August 16, 2018, 3:41pm UTC](https://forums.unrealengine.com/t/light-function-projected-image-offset/431705/7 "2018-08-16T15:41:45Z")

</div>

Simply use Add node

---

<div class="post-metadata">

**Author:** ![joelbenjamin](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/joelbenjamin/32/754794_2.png) [@joelbenjamin](https://forums.unrealengine.com/u/joelbenjamin)\
**Post date:** [August 16, 2018, 3:43pm UTC](https://forums.unrealengine.com/t/light-function-projected-image-offset/431705/8 "2018-08-16T15:43:01Z")

</div>

I’ll figure something out

Thanks for the help!
