# Proper way to rotate a POM (Parallax Occlusion Mapping)

**URL:** <https://forums.unrealengine.com/t/proper-way-to-rotate-a-pom-parallax-occlusion-mapping/384661>\
**Category:** Rendering\
**Tags:** parallax, unreal-engine, question\
**Created:** [February 11, 2017, 8:38pm UTC](https://forums.unrealengine.com/t/proper-way-to-rotate-a-pom-parallax-occlusion-mapping/384661 "2017-02-11T20:38:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_a6092ea3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a6092ea3](https://forums.unrealengine.com/u/anonymous_user_a6092ea3)\
**Post date:** [February 11, 2017, 8:38pm UTC](https://forums.unrealengine.com/t/proper-way-to-rotate-a-pom-parallax-occlusion-mapping/384661/1 "2017-02-11T20:38:39Z")

</div>

I had the need to rotate a material which used Parallax Occlusion Mapping, but found the base POM material function to not support rotation. To help anyone else in the same situation, below are the changes I made to the POM function to provide a rotation parameter that functions with POM. Please let me know if you think there is a better way to do this.

 ![125906-pomrotation.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/c/e/5cedd2273ebfdb5ac544c9675639181e3c815986.jpeg)

---

<div class="post-metadata">

**Author:** ![astronaut61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@astronaut61](https://forums.unrealengine.com/u/astronaut61)\
**Post date:** [September 12, 2017, 12:20am UTC](https://forums.unrealengine.com/t/proper-way-to-rotate-a-pom-parallax-occlusion-mapping/384661/2 "2017-09-12T00:20:30Z")

</div>

thanks man. it works! you’ve saved few hours for me:)

---

<div class="post-metadata">

**Author:** ![Andariel\_yo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Andariel\_yo](https://forums.unrealengine.com/u/Andariel_yo)\
**Post date:** [January 30, 2023, 3:30pm UTC](https://forums.unrealengine.com/t/proper-way-to-rotate-a-pom-parallax-occlusion-mapping/384661/3 "2023-01-30T15:30:45Z")

</div>

thanks, saved my day

---

<div class="post-metadata">

**Author:** ![BananableOffense](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BananableOffense](https://forums.unrealengine.com/u/BananableOffense)\
**Post date:** [January 30, 2023, 11:24pm UTC](https://forums.unrealengine.com/t/proper-way-to-rotate-a-pom-parallax-occlusion-mapping/384661/4 "2023-01-30T23:24:16Z")

</div>

Keep in mind if you rotate the UVs of a heightmap for purposes such as PoM, you’ll also need to rotate the vectors within the corresponding normal map or else the shading will be incorrect. It’s not enough to rotate the UVs of a normal map.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/8/6/886b4bd9e185d6e24472be93e31cd93742660f90.jpeg "Rotating Normal Maps in Unreal Engine") ](https://www.youtube.com/watch?v=iXqCszt3LbE)

---

<div class="post-metadata">

**Author:** ![Cyanarrow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cyanarrow](https://forums.unrealengine.com/u/Cyanarrow)\
**Post date:** [January 4, 2024, 4:02pm UTC](https://forums.unrealengine.com/t/proper-way-to-rotate-a-pom-parallax-occlusion-mapping/384661/5 "2024-01-04T16:02:49Z")

</div>

looks perfect, thx a lot

---

<div class="post-metadata">

**Author:** ![HappyKat100](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HappyKat100](https://forums.unrealengine.com/u/HappyKat100)\
**Post date:** [August 3, 2024, 4:04pm UTC](https://forums.unrealengine.com/t/proper-way-to-rotate-a-pom-parallax-occlusion-mapping/384661/6 "2024-08-03T16:04:46Z")

</div>

Any idea how to get the shadows to correctly rotate when rotating the UVs? I think the Light Trace Length section needs some adjusting but I’ve not worked out how to do it. Right now, the shadows just rotate with the texture so don’t work properly.

---

<div class="post-metadata">

**Author:** ![BananableOffense](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BananableOffense](https://forums.unrealengine.com/u/BananableOffense)\
**Post date:** [August 3, 2024, 4:20pm UTC](https://forums.unrealengine.com/t/proper-way-to-rotate-a-pom-parallax-occlusion-mapping/384661/7 "2024-08-03T16:20:57Z")

</div>

Use the rotate about axis node.

1. Use the -(vertex normal) for the rotation axis.
2. Use the same -(rotation angle) as with the normal map.
3. Pivot point is (0,0,0) when rotating a vector.
4. Position will be -(light vector).
5. Then, add the output back to your original position aka -(light vector).
6. Use this as the input for your POM light vector.

---

<div class="post-metadata">

**Author:** ![HappyKat100](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HappyKat100](https://forums.unrealengine.com/u/HappyKat100)\
**Post date:** [August 3, 2024, 10:17pm UTC](https://forums.unrealengine.com/t/proper-way-to-rotate-a-pom-parallax-occlusion-mapping/384661/8 "2024-08-03T22:17:08Z")

</div>

Thanks. I actually adjusted the Light Vector in the POM function by breaking out the components and using a custom rotator which seemed to do the trick.

---

<div class="post-metadata">

**Author:** ![user\_4231669fc10811196798ffaab0f98c356e9c9e648c4fc2408f845d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user\_4231669fc10811196798ffaab0f98c356e9c9e648c4fc2408f845d](https://forums.unrealengine.com/u/user_4231669fc10811196798ffaab0f98c356e9c9e648c4fc2408f845d)\
**Post date:** [December 3, 2024, 3:18pm UTC](https://forums.unrealengine.com/t/proper-way-to-rotate-a-pom-parallax-occlusion-mapping/384661/9 "2024-12-03T15:18:36Z")

</div>

What is the reason why the dark side color is darker when using the pixel depth offset

---

<div class="post-metadata">

**Author:** ![user\_4231669fc10811196798ffaab0f98c356e9c9e648c4fc2408f845d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@user\_4231669fc10811196798ffaab0f98c356e9c9e648c4fc2408f845d](https://forums.unrealengine.com/u/user_4231669fc10811196798ffaab0f98c356e9c9e648c4fc2408f845d)\
**Post date:** [December 5, 2024, 2:01am UTC](https://forums.unrealengine.com/t/proper-way-to-rotate-a-pom-parallax-occlusion-mapping/384661/10 "2024-12-05T02:01:33Z")

</div>

I fixed this. The RG channel of the sampled normal map needs to be rotated with a center of 0 and reversed
