色は非推奨なので、色の代わりに法線を使用する必要があると聞きました。(本当ですか?)法線は光の反射と関係がありますが、明確で直感的な説明が見つかりません。ノーマルとは?
3 に答える
A normal in general is a unit vector whose direction is perpendicular to a surface at a specific point. Therefore it tells you in which direction a surface is facing. The main use case for normals are lighting calculations, where you have to determine the angle (or practically often its cosine) between the normal at a given surface point and the direction towards a lightsource or a camera.
法線や色など、多くのものが非推奨になりました。つまり、それらを自分で実装する必要があるということです。法線を使用すると、オブジェクトをシェーディングできます。計算を行うのはあなた次第ですが、Gouraud/Phong シェーディングなどに関する多くのチュートリアルがあります。
編集:法線には、面法線と頂点法線の 2 種類があります。面の法線は三角形から離れた方向を指し、頂点の法線は頂点から離れた方向を指します。頂点法線を使用すると、より良い品質を実現できますが、面法線にも多くの用途があります。たとえば、衝突検出やシャドウ ボリュームで使用できます。