3

I currently have a .ply mesh, and I am trying to compute the surface normals of the blob-like object. I wish to encode the normals in an RGB map, so I tried linking the geometry node's normal to the emission shader as shown below:

Node setup.

However, I checked the output for the rendered image (in MATLAB) and the normals were certainly not right. In the preview pane, the cube looked like this:

Cube preview.

Clearly, something isn't right, as I would want the face facing the viewer to be green and not black.

Does anyone have any input?

nodim
  • 31
  • 3
  • 3
    Check what space the normals are being computer, you may need local, global (world), or camera space normals. – Duarte Farrajota Ramos Jul 07 '17 at 17:05
  • @nodim I wonder, is it possible to share the method you used for obtaining surface Normals? Or maybe can you take a look at my question here and post an answer if you know how do render surface Normal maps in Blender? – Amir Feb 21 '18 at 01:23
  • The face in the +ve Y direction is green. The face facing you is negative green, which is black as far as the renderer is concerned. You could use a vector math node set to Absolute if you want both directions to show as green. – Xtremity Apr 28 '20 at 23:19

1 Answers1

1

If your goal is to get a texture with those values then just bake the Normals but select World instead of Tangent in the menu.

Josip Kladarić
  • 1,036
  • 5
  • 11