Normal map baking gradients instead of "flatness" The normal map I'm baking shows gradients for "flat" edges, which seems wrong, and when I import to Substance Painter, it confirms they're wrong (3rd screenshot).  


I have low and high poly models.
I have smooth shading on both models.
I have a cage model that is slightly larger than the low poly model.


The really weird part is, the render looks right in the viewport for some strange reason (the low poly model looks like the high poly model, as if the normal map is working, even though that seems impossible looking at the baked map).  When I export the .fbx and normal map and import to Substance Painter, the normals look really wrong.



EDIT: Baking parameters


https://blend-exchange.giantcowfilms.com/b/1404/
You need to use edge splits on sharp corners.

Set the whole object to smooth shading, select the edges to be sharp, press ctrl + E and select Mark Sharp. Then add the Edge Split modifier. You might skip marking edges sharp manually and rely on the angle based edge splitting.