BumpOffset for Parallax Mapping

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:

With Normal Mapping:

With Parallax Mapping:

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):

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

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.

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?

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.