# Tangent Space Normals in Material Editor

**URL:** <https://forums.unrealengine.com/t/tangent-space-normals-in-material-editor/420695>\
**Category:** Rendering\
**Tags:** normals, tangents, unreal-engine, Shaders, question\
**Created:** [March 23, 2018, 6:36pm UTC](https://forums.unrealengine.com/t/tangent-space-normals-in-material-editor/420695 "2018-03-23T18:36:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![darkgaze](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkgaze](https://forums.unrealengine.com/u/darkgaze)\
**Post date:** [March 23, 2018, 6:36pm UTC](https://forums.unrealengine.com/t/tangent-space-normals-in-material-editor/420695/1 "2018-03-23T18:36:29Z")

</div>

Please, let me know if what I think here is correct or not!

There’s not much technical documentation so I guess it’s all trying.

- We connect a normal map in the Normal plug in the Material Editor and it’s expressed in Tangent Space (as commonly happens),
- Its values are compressed, because it expects colors from a texture, so it’s (0,1) instead of vectors (-1,1)
- Its values are purple looking, meaning normal (0,0,1) → (0.5, 0.5, 1) (bluish)
- That makes me think the normal vector is Z , equals to UP vector in Unreal.

Ok. **I test this on a plane in the material editor**. I try to get a fake semi-sphere on it. Just the normal and a basic color, nothing like Pixel Offset or world position offset to change the orientation.

- The z coord (normal to surface) is calculated using spherical coordinates. Should be 0.5 on the sides, 1 on UV (0,0)
- The X coord is the tangent and should follow the U coord on the shader.
- The Y coord is the bi-normal, and I suspect it should follow the _-V_\* coordinate, because V coord goes top to bottom and it should be bottom (-1) to top (1).

**Is all of this ok?.** This is a mess, there must be something wrong because It doesn’t work.

I don’t know **what spaces this expects and documentation lacks technical information**. Should the tangent space follow the UE4 X(fwd), Y(right), Z(up) standard? Or some other way?

**What is Unreal expecting to be passed to the Normal plug if you connect values other than a texture? World space or tangent space?**

---

<div class="post-metadata">

**Author:** ![Deathrey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deathrey](https://forums.unrealengine.com/u/Deathrey)\
**Post date:** [March 23, 2018, 6:47pm UTC](https://forums.unrealengine.com/t/tangent-space-normals-in-material-editor/420695/2 "2018-03-23T18:47:42Z")

</div>

Normal input pin expects Tangent Space Normal in XY -1 to 1, Z 0 to 1 range. If you disable Tangent Space normals in material settings, Normal input pin expects World Space Normal in XYZ -1 to 1 range.
