Skip to main content

Surface Normals and Normal Maps

Surface normal は、surface 上の各点における局所的な向きを表す vector です。Normal map は、その surface normal を image として保存したものです。3D Reconstruction、rendering、shape estimation、material editing で重要です。

Surface normal

3D surface 上の点における normal vector n\mathbf{n} は、その点の tangent plane に垂直な unit vector です。

n=1\|\mathbf{n}\| = 1

Surface normal は、geometry の微分的な性質を表します。Depth map が「camera からの距離」を表すのに対して、normal map は「surface の向き」を表します。

Depth と normal の関係

Depth map が十分に滑らかで camera intrinsics が既知であれば、近傍 pixel の 3D point から local plane を推定し、その plane の法線として surface normal を計算できます。

単純には、近傍の 3D point 差分 pu\mathbf{p}_upv\mathbf{p}_v の外積から normal を求めます。

npu×pv\mathbf{n} \propto \mathbf{p}_u \times \mathbf{p}_v

ただし、depth noise や boundary では normal が不安定になりやすいため、smoothing や robust estimation が必要になります。

Normal map

Normal map は、各 pixel の normal vector を RGB image のように encode したものです。一般的には、normal の x,y,zx, y, z 成分を [1,1][-1, 1] から [0,1][0, 1] に変換して保存します。

Normal map には、主に次の種類があります。

種類説明
World-space normal mapWorld coordinate における normal を表します。
Camera-space normal mapCamera coordinate における normal を表します。
Tangent-space normal mapMesh surface の tangent space における normal を表し、graphics でよく使われます。

3D Reconstruction での役割

Surface normal は、次の用途で重要です。

  • Depth map の品質改善
  • Plane や edge の検出
  • Multi-view stereo の regularization
  • Mesh reconstruction の smoothing
  • Photometric stereo
  • Neural rendering での shading constraint

Depth と normal は相補的です。Depth は global な位置を表し、normal は local な surface orientation を表します。

関連ページ

主なソース