3
$\begingroup$

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?

$\endgroup$
3
  • 3
    $\begingroup$ Check what space the normals are being computer, you may need local, global (world), or camera space normals. $\endgroup$ Commented Jul 7, 2017 at 17:05
  • $\begingroup$ @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? $\endgroup$
    – Amir
    Commented Feb 21, 2018 at 1:23
  • $\begingroup$ 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. $\endgroup$
    – Xtremity
    Commented Apr 28, 2020 at 23:19

1 Answer 1

1
$\begingroup$

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.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .