diff --git a/docs/.vuepress/config/sidebar.js b/docs/.vuepress/config/sidebar.js index 3b6279a..0afee41 100644 --- a/docs/.vuepress/config/sidebar.js +++ b/docs/.vuepress/config/sidebar.js @@ -96,6 +96,7 @@ module.exports = [ text: '光照模型', collapsible: true, children: [ + {text: '传统光照模型', link: '/note/graphics/illumination_model/classic/illumination_model_01'}, {text: '光度学', link: '/note/graphics/illumination_model/luminosity/luminosity'}, {text: '双向反射分布函数\(BRDF\)', link: '/note/graphics/illumination_model/BRDF/BRDF'}, {text: '微平面理论(一)', link: '/note/graphics/illumination_model/microfacets/microfacets_1'}, diff --git a/docs/index.md b/docs/index.md index 49d6bb6..19e1716 100644 --- a/docs/index.md +++ b/docs/index.md @@ -18,8 +18,18 @@ * [Turbolink](https://github.com/thejinchao/turbolink) ## 个人笔记 - * [数学相关](/note/math/) - * [密码学](/note/cryptography/) - * [图形学](/note/graphics/) + * 数学相关 + * [常用数学符号](/note/math/symbol.md) + * [群](/note/math//group.md) + * 数论([一](/note/math//number_theory_1.md), [二](/note/math/number_theory_2.md), [三](/note/math/number_theory_3.md)) + * [概率](/note/math/probability.md) + * 密码学 + * [RSA](/note/cryptography/rsa.md) + * [抛币协议](/note/cryptography/flip_coin.md) + * [智能扑克](/note/cryptography/mental_poker.md) + * 图形学 + * [数学基础](/note/graphics/math/) + * [光照模型](/note/graphics/illumination_model/) + * [环境光渲染](/note/graphics/image_based_lighting/) * 编程语言 * [JavaScript](/note/language/javascript/) diff --git a/docs/note/graphics/illumination_model/classic/illumination_model_01.md b/docs/note/graphics/illumination_model/classic/illumination_model_01.md index 8ccbba3..c568577 100644 --- a/docs/note/graphics/illumination_model/classic/illumination_model_01.md +++ b/docs/note/graphics/illumination_model/classic/illumination_model_01.md @@ -1,4 +1,4 @@ -# 光照模型(Illumination Model) +# 传统光照模型(Illumination Model) ## 1. Phong模型 @@ -52,6 +52,36 @@ $$ \vec{\mathrm{R}}=2(\vec{\mathrm{L}}\cdot\vec{\mathrm{N}})\vec{\mathrm{N}}-\vec{\mathrm{L}} $$ +## 2. Blinn-Phong模型 + +### 2.1 基本定义 + +![](./Blinn-Phong_Vectors.svg) + +和Phong模型很类似,只不过增加了半角向量$\vec{\mathrm{H}}$,也就是指向光源的向量$\vec{\mathrm{L}}$和指向相机的向量$\vec{\mathrm{V}}$的中间向量 +$$ +\vec{\mathrm{V}}=\frac{\vec{\mathrm{L}}+\vec{\mathrm{V}}}{\|\vec{\mathrm{L}}+\vec{\mathrm{V}}\|} +$$ + +### 2.2 算法 + +[https://en.wikipedia.org/wiki/Blinn%E2%80%93Phong_shading_model](https://en.wikipedia.org/wiki/Blinn%E2%80%93Phong_shading_model) + +$$ +I_\mathrm{BlinnPhong}=I_\mathrm{ambient}+\sum({I_\mathrm{diffuse}+I_\mathrm{specular}}) +$$ +其中环境光和漫反射和Phong相同 +$$ +I_\mathrm{diffuse}=(\vec{L}\cdot\vec{N})L_dK_d \\ +I_\mathrm{specular}=(\vec{\mathrm{R}}\cdot\vec{\mathrm{V}})^\alpha L_sK_s +$$ + +高光部分使用$\vec{\mathrm{N}}\cdot\vec{\mathrm{H}}$代替$\vec{\mathrm{R}}\cdot\vec{\mathrm{V}}$ +$$ +I_\mathrm{specular}=(\vec{\mathrm{N}}\cdot\vec{\mathrm{H}})^nL_sK_s +$$ + + diff --git a/docs/note/graphics/illumination_model/classic/illumination_model_02.md b/docs/note/graphics/illumination_model/classic/illumination_model_02.md deleted file mode 100644 index 725e19d..0000000 --- a/docs/note/graphics/illumination_model/classic/illumination_model_02.md +++ /dev/null @@ -1,32 +0,0 @@ -# 光照模型(二) - -## 2. Blinn-Phong模型 - -### 2.1 基本定义 - -![](./Blinn-Phong_Vectors.svg) - -和Phong模型很类似,只不过增加了半角向量$\vec{\mathrm{H}}$,也就是指向光源的向量$\vec{\mathrm{L}}$和指向相机的向量$\vec{\mathrm{V}}$的中间向量 -$$ -\vec{\mathrm{V}}=\frac{\vec{\mathrm{L}}+\vec{\mathrm{V}}}{\|\vec{\mathrm{L}}+\vec{\mathrm{V}}\|} -$$ - -### 2.2 算法 - -[https://en.wikipedia.org/wiki/Blinn%E2%80%93Phong_shading_model](https://en.wikipedia.org/wiki/Blinn%E2%80%93Phong_shading_model) - -$$ -I_\mathrm{BlinnPhong}=I_\mathrm{ambient}+\sum({I_\mathrm{diffuse}+I_\mathrm{specular}}) -$$ -其中环境光和漫反射和Phong相同 -$$ -I_\mathrm{diffuse}=(\vec{L}\cdot\vec{N})L_dK_d \\ -I_\mathrm{specular}=(\vec{\mathrm{R}}\cdot\vec{\mathrm{V}})^\alpha L_sK_s -$$ - -高光部分使用$\vec{\mathrm{N}}\cdot\vec{\mathrm{H}}$代替$\vec{\mathrm{R}}\cdot\vec{\mathrm{V}}$ -$$ -I_\mathrm{specular}=(\vec{\mathrm{N}}\cdot\vec{\mathrm{H}})^nL_sK_s -$$ - - diff --git a/docs/note/graphics/illumination_model/index.md b/docs/note/graphics/illumination_model/index.md index c83a7ba..c4eb8d7 100644 --- a/docs/note/graphics/illumination_model/index.md +++ b/docs/note/graphics/illumination_model/index.md @@ -1,5 +1,6 @@ # 光照模型 +* [传统光照模型](./classic/illumination_model_01.md) * [光度学](./luminosity/luminosity.md) * [双向反射分布函数\(BRDF\)](./BRDF/BRDF.md) * [微平面理论(一)](./microfacets/microfacets_1.md)