目录
Lecture 07
环境光
环境光可以近似理解为四面八方射来的单一颜色的单一强度的光
单色环境光
我们只需要使用表示环境光的颜色加上AO(Ambient Occlusion,即环境光遮挡)即可
![](https://img-blog.csdnimg.cn/img_convert/8ae69ebe07ab3ee9d635bcb58dd186bc.webp?x-oss-process=image/format,png)
三色环境光
之前说的绿通道代表着竖直方向,它乘1表示向上的区域,乘-1表示向下的区域(两者小于0的部分仍然要用Max节点取为0),用白色减去前两者就表示侧面的区域,这样我们就有了三个遮罩,再分别乘上三个方向对应的颜色并相加,最后添加一个环境光遮挡就完成了
![](https://img-blog.csdnimg.cn/img_convert/cd174c9aa507ab75dc4bbd1b3eda07e0.webp?x-oss-process=image/format,png)
代码实现
![](https://img-blog.csdnimg.cn/img_convert/aa80f801f8c4307750d6f9de17883cdf.webp?x-oss-process=image/format,png)
投影
包含对方向光的投影和点光源的衰减
![](https://img-blog.csdnimg.cn/img_convert/2a008091209dcdb578450d84ed19ed35.webp?x-oss-process=image/format,png)
光照构成
![](https://img-blog.csdnimg.cn/img_convert/0332cbf8ba42ad3d66a3750c6384ce7a.webp?x-oss-process=image/format,png)
我们可以利用已学的模型组合出一个光照效果
![](https://img-blog.csdnimg.cn/img_convert/aa64708f829053ad8868d455b9981a57.webp?x-oss-process=image/format,png)
![](https://img-blog.csdnimg.cn/img_convert/1786700f9adc66c814a2f711a1236895.webp?x-oss-process=image/format,png)
![](https://img-blog.csdnimg.cn/img_convert/81c5cf9991e04d9010e134ef513d5a36.webp?x-oss-process=image/format,png)
作业
![](https://img-blog.csdnimg.cn/img_convert/5f3229df24733a00a310956460db4a02.webp?x-oss-process=image/format,png)
Lecture 08
作业点评
一组:
- AO调节强度应该与白色进行插值
- 右下角使用了计算曲率的算法实现磨损效果
![](https://img-blog.csdnimg.cn/img_convert/da04cc3679f0b391a962e5a0d50cc2f3.webp?x-oss-process=image/format,png)
二组:
- 卡渲头盔,将RampTex进行分层卡通的效果可能会更好
- P30,使用了屏幕UV和渐变
- 右下角的模型,贴图不完整,加上Specular贴图和法线贴图效果会更好
三组:
- 头盔,把环境光的颜色插值由 上->下 改为了 左->右
- 高达,也计算了曲率图
![](https://img-blog.csdnimg.cn/img_convert/194ff9778b2596a01be92db1b12ea147.webp?x-oss-process=image/format,png)
四组:
- 右上角,利用sin和cos的闪动效果
- 右下角,皮卡丘完成度很高,可以商用的程度
![](https://img-blog.csdnimg.cn/img_convert/ea1546e9d792fcd5ae117a9f06059ab5.webp?x-oss-process=image/format,png)
作业答案
注意PPT中,环境光部分的结果漏乘了_BaseCol
![](https://img-blog.csdnimg.cn/img_convert/056eb04ec23ce277e09ec5f4fce8f06a.webp?x-oss-process=image/format,png)
作业批改
![](https://img-blog.csdnimg.cn/img_convert/e09d49f4e152e2c0113856459d7d9828.png)
![](https://img-blog.csdnimg.cn/img_convert/c528015a9e078f1cd3800c63e254ab63.png)
![](https://img-blog.csdnimg.cn/img_convert/c5d30b1bcad5fce5d6ea66c76a2e64df.webp?x-oss-process=image/format,png)
皮卡丘主要是在RGBA不同通道分别调节mask
法线贴图
连连看,其中TBN分别指Tangent direction(切线方向)、Bitangent direction(副切线方向)、Normal direction(法线方向,但是切线空间中的,需要转换到世界空间中并标准化)
![](https://img-blog.csdnimg.cn/img_convert/209f1a15fd4789dfa2d436132139bc90.webp?x-oss-process=image/format,png)
代码
![](https://img-blog.csdnimg.cn/img_convert/8f1eb212e5a8477a462172ac591d6d65.webp?x-oss-process=image/format,png)
课程传送门 Lecture 07:庄懂的技术美术入门课(美术向)-直播录屏-第7课_哔哩哔哩_bilibili
课程传送门 Lecture 08:庄懂的技术美术入门课(美术向)-直播录屏-第8课_哔哩哔哩_bilibili