tangent space vector displacement

I’m trying to figure out how to use a tangent space vector displacement map in my material, but I’m running into some issues in the math. The Unreal material only accepts world displacement, so I figured that I needed to convert tangent to world space. I ended up getting pretty close but there is still some unwanted scaling/skewing on the proportions of the shape as the object rotates.

Here is the resulting material assigned to a rotating cube.
https://streamable.com/fpf79

And here are the expressions as seen in the Material Editor.

What’s the proper workflow to use tangent space vector displacement maps?

1 Like

My students and I are also trying to figure out vector displacement maps in Unreal. We want to export them from ZBrush. And then, can we blend between various such maps in the engine?