当前位置:网站首页>Games101 Lesson 7 shading 1 Notes
Games101 Lesson 7 shading 1 Notes
2022-07-06 07:23:00 【Fenghou Qimen L】
To color 1
One 、 The depth of the cache (Z-buffering)
(1) Painter algorithm : Like an oil painter painting , Draw the farthest first , Paint and cover from far to near .
① Painter's algorithm works in most cases , You need to arrange the distance first .
② But if there is partial coverage of each other , There will be problems with the painter's Algorithm , Here's the picture .
(2) The depth of the cache
① The depth of the cache Z-buffer The algorithm records the depth of each pixel , In addition to recording the color of each pixel , The depth of each pixel is also recorded .
② The pseudo code of deep cache is as follows .
③ An example of deep caching is as follows .
④ The complexity of the deep cache algorithm is O(n).
Two 、 To color (Shading)
(1) Coloring in this course refers to applying different materials to objects .
(2) A simple coloring model :Blinn-Phong Reflectance Model
① Highlights are shown from top to bottom 、 Diffuse reflection 、 Three parts of ambient light .
(3) Shading point
① These inputs are required : Observation direction 、 normal 、 The direction of the light 、 Surface parameters ( Such as color 、 Brightness, etc ).
② Observation direction 、 normal 、 The illumination directions are unit vectors .
③ Shading discussed in this section does not consider shadows .
3、 ... and 、 Diffuse reflection (Diffuse Reflection)
(1) Definition of diffuse reflection
① Light will be reflected evenly to all angles .
② The color is the same in all observation directions .
(2) The energy that light at different angles can accept
(3) Light attenuation
① The farther away the point is, the energy of light will be attenuated .
② For example, light radiates a circle , The length of the circumference near , The circumference in the distance is long , According to the conservation of energy , Distant points should get less energy .
(4)Lambertian Shading
① Combined with the energy received by light at different angles and the light attenuation formula, the coloring of a point can be obtained .
(5) Different diffuse reflection coefficients kd Examples of different coloring situations obtained .
reference
Course video link : GAMES101 Lecture07 Shading 1
边栏推荐
- Uni app third party package configuration network request
- TS基础篇
- 【mysql学习笔记30】锁(非教程)
- word中如何删除某符号前面或后面所有的文字
- js对象获取属性的方法(.和[]方式)
- 位运算异或
- Bugku CTF daily question: do you want seeds? Blackmailed
- Uncaught TypeError: Cannot red propertites of undefined(reading ‘beforeEach‘)解决方案
- 微信公众号无限回调授权系统源码 全网首发
- Uni app practical project
猜你喜欢
Typescript interface and the use of generics
[online problem processing] how to kill the corresponding process when the MySQL table deadlock is caused by the code
杰理之蓝牙设备想要发送数据给手机,需要手机先打开 notify 通道【篇】
MVVM of WPF
OpenGL ES 学习初识(1)
[MySQL learning notes 32] mvcc
智能终端设备加密防护的意义和措施
杰理之开发板上电开机,就可以手机打开 NRF 的 APP【篇】
JDBC learning notes
微信公众号无限回调授权系统源码 全网首发
随机推荐
杰理之普通透传测试---做数传搭配 APP 通信【篇】
ORACLE列转行--某字段按指定分隔符转多行
TypeScript 可索引类型
【线上问题处理】因代码造成mysql表死锁的问题,如何杀掉对应的进程
Simple and understandable high-precision addition in C language
navicat如何导入MySQL脚本
word删除括号里内容
Raspberry pie serial port login and SSH login methods
Résumé de la structure du modèle synthétisable
作者已死?AI正用藝術征服人類
烧录场景下的源代码防泄密方案分享
Cookie技术&Session技术&ServletContext对象
杰理之AD 系列 MIDI 功能说明【篇】
Wechat brain competition answer applet_ Support the flow main belt with the latest question bank file
软件测试界的三无简历,企业拿什么来招聘你,石沉大海的简历
Bloom taxonomy
Establishment and operation of cloud platform open source project environment
L'auteur est mort? Ai utilise l'art pour conquérir l'humanité
杰理之BLE【篇】
Emo diary 1