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 は、その点の tangent plane に垂直な unit vector です。
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 差分 と の外積から normal を求めます。
ただし、depth noise や boundary では normal が不安定になりやすいため、smoothing や robust estimation が必要になります。
Normal map
Normal map は、各 pixel の normal vector を RGB image のように encode したものです。一般的には、normal の 成分を から に変換して保存します。
Normal map には、主に次の種類があります。
| 種類 | 説明 |
|---|---|
| World-space normal map | World coordinate における normal を表します。 |
| Camera-space normal map | Camera coordinate における normal を表します。 |
| Tangent-space normal map | Mesh 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 を表します。
関連ページ
- Depth Estimation
- Photometric Stereo
- Multi-View Stereo
- Point Clouds, Meshes, and TSDF
- Neural 3D Reconstruction
主なソース
- Szeliski, “Computer Vision: Algorithms and Applications”: https://szeliski.org/Book/
- OpenGL normal mapping tutorial: https://learnopengl.com/Advanced-Lighting/Normal-Mapping
- Eigen and Fergus, “Predicting Depth, Surface Normals and Semantic Labels with a Common Multi-Scale CNN”, 2015: https://arxiv.org/abs/1411.4734