Edge-finding material mask

Hey guys

I’m relatively new to UE4 so I might miss some very simple solutions to my problem or that I’m getting some concepts fundametally wrong, but I did a good amount of googling and could not find what I was looking for.
I’m building an object which need to have two materials, one on every plain surface and another around the edges (lets say the surfaces are gray and the edges broun, for the sake of 70s furniture style). Because i could not find any edge-finding node in the material editor, i started playing around with objects like PixelNormalWS, which I think gives the normal Vector for every pixel on the mesh (or rather on the uv map that wraps around the mesh, right?) and is therefore good to produce masks acording to the orientation of the surfaces. If I could compare the normal vector of one pixel with the normal vector of its neighbour pixels, i could find where the changes between those vectors are very big, which would mean a great change in the surface orientation. But i could not find a way of doing that. Anyway I’m not so sure what the output of the PixelNormalWS is. If it’s just a map with a lot of three value pixels (x, y, z), then i’d need to just move the map by a pixel and subtract the vectors, but i could not find out how to do that. I know how to move or scale a texture with the UVRemap_0-1_ToRange, but that’s because the TextureSample objects takes UV coordinates as input, and PixelNormalWS does not and i do not know how to convert the output of the PixelNormalWS to a texture…

Okay, I hope I could make my problem understandable.
I’m very happy for any help i can get. Thx in advance.