Recreating basic Maya material in UE4 - Direction Vector from Maya->UE4 isn't lining up


I made a material in Maya using ShaderFX. It is a basic cel shader. I’ve done the same in UE4 however something isn’t quite lining up.

Here is a preview:

There are two textures - Shaded and Occluded. A simple check is performed to test whether it’s shaded, it takes a direction (representing the direction of the would-be light) and dots it with the vertex world normal, and it takes a tolerance ranging roughly 0->1, if the tolerance is higher, it shades, otherwise it occludes.

A vertex color channel is used to scale the tolerance per-vertex, however I have tested with vertex colors removed from the equation so that’s not the issue.

Here is an image of the ShaderFX graph

The direction is being sent from Maya to UE4 via a custom attribute on the root joint, which is then baked at export and UE4 automatically imports it as an animation curve and materials support using these curves out of the box so long as they have a matching parameter name.

I have quadruple-checked that the vector direction sent is valid, that all the animation curves are valid, the values are perfectly accurate on each frame, and so forth. Basically, the vector sent has been tested until it can’t be faulted, so I know the information has all come through 100%.

The issue is then using the direction from Maya within UE4

This is my material graph in UE4:

The shading tolerances are identical.

Here is a side-by-side comparison to how the same frame looks in Maya and in UE4. The camera angle has no effect on the shading.

Does anyone know what I’m missing with my interpretation of the direction within UE4?

Bump. I hope asking for help on this isn’t a shot in the dark, I know it’s not such a common thing, but I need it to work and have tried everything I can myself.

The problems were elsewhere, so this is “solved”