# BumpOffset for Parallax Mapping

**URL:** <https://forums.unrealengine.com/t/bumpoffset-for-parallax-mapping/68445>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [July 8, 2016, 3:17am UTC](https://forums.unrealengine.com/t/bumpoffset-for-parallax-mapping/68445 "2016-07-08T03:17:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![E1andri1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@E1andri1](https://forums.unrealengine.com/u/E1andri1)\
**Post date:** [July 8, 2016, 3:17am UTC](https://forums.unrealengine.com/t/bumpoffset-for-parallax-mapping/68445/1 "2016-07-08T03:17:15Z")

</div>

Hi there,

I’m trying to add Parallax Mapping to my Material (for VR reasons) but somehow the BumpOffset function seems to rotate my texture coordinates (Images 1 to 3)

Without Normal Mapping:

> **[NN off.PNG - Click to see more photos](https://imageshack.com/i/pliMipGlp)**
>
> Store and share all of your images @ IMAGESHACK.com

With Normal Mapping:

> **[NN on.PNG - Click to see more photos](https://imageshack.com/i/pnWlF80ap)**
>
> Store and share all of your images @ IMAGESHACK.com

With Parallax Mapping:

> **[PM.PNG - Click to see more photos](https://imageshack.com/i/poURxhMvp)**
>
> Store and share all of your images @ IMAGESHACK.com

In the Parallax Mapping image the parallax mapping effect appears to be rotated buy 90 degrees (those dark strips in the lower left corner of the image which are parallel to the wooden border), which seems to be caused by the BumpOffset function. However, only certain areas of the texture are affected. The lower part and the back just look fine.

That’s how I set up the material (imagine, the wires between bump offset and the texture sample to the right are connected and the output pin of the normal add function is connected to the normal output as well):

> **[mat.PNG - Click to see more photos](https://imageshack.com/i/plCplIEXp)**
>
> Store and share all of your images @ IMAGESHACK.com

The height map is a greyscale conversion of the diffuse map and the normal map is the respecitve result of a normal map filter.

Has anybody a clue why the BumpOffset function seems to rotate the texture coordinates? Or any other ideas?

Thanks and kind regards,

Markus

---

<div class="post-metadata">

**Author:** ![RyanB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanB](https://forums.unrealengine.com/u/RyanB)\
**Post date:** [July 8, 2016, 3:39pm UTC](https://forums.unrealengine.com/t/bumpoffset-for-parallax-mapping/68445/2 "2016-07-08T15:39:59Z")

</div>

The bump offset node performs a World to Tangent space transform using UV0. It appears you are using UV2 there. You will need to use UV0.

---

<div class="post-metadata">

**Author:** ![E1andri1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@E1andri1](https://forums.unrealengine.com/u/E1andri1)\
**Post date:** [July 8, 2016, 9:56pm UTC](https://forums.unrealengine.com/t/bumpoffset-for-parallax-mapping/68445/3 "2016-07-08T21:56:01Z")

</div>

Okay, thank you.

If I connect uv2 to the coordinate pin of the bumpoffset function, it probably won’t use those coordinates instead, right? Is there a way to use a custom uv-set in the BumpOffset function?

---

<div class="post-metadata">

**Author:** ![RyanB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RyanB](https://forums.unrealengine.com/u/RyanB)\
**Post date:** [July 8, 2016, 10:46pm UTC](https://forums.unrealengine.com/t/bumpoffset-for-parallax-mapping/68445/4 "2016-07-08T22:46:20Z")

</div>

It will use those UVs by adding the solved offsets to them.

If UV0 and UV2 are always both going the same direcetion and just have different scales, it will work fine, but if there is any rotation or mirroring difference between the UVs, then it will transform the camera vector incorrectly.

It was mostly exposed like that to allow varying tiling factors for different textures but it is kind of confusing that this node has a hidden limitation where it only works properly with UV0.
