当前位置:网站首页>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
边栏推荐
- ORACLE列转行--某字段按指定分隔符转多行
- 网络安全基础介绍
- Emo diary 1
- Win10 64 bit Mitsubishi PLC software appears oleaut32 DLL access denied
- mysql如何合并数据
- Ble of Jerry [chapter]
- (4) Web security | penetration testing | network security web site source code and related analysis
- OpenGL ES 学习初识(1)
- Internal and external troubles of "boring ape" bayc
- Establishment and operation of cloud platform open source project environment
猜你喜欢
[online problem processing] how to kill the corresponding process when the MySQL table deadlock is caused by the code
[MySQL learning notes 32] mvcc
软件测试界的三无简历,企业拿什么来招聘你,石沉大海的简历
Go learning --- use reflection to judge whether the value is valid
The first Baidu push plug-in of dream weaving fully automatic collection Optimization SEO collection module
Wechat official account infinite callback authorization system source code, launched in the whole network
Uncaught typeerror: cannot red properties of undefined (reading 'beforeeach') solution
Oracle database 11gr2 uses TDE transparent data encryption to report an error ora28353. If you run to close the wallet, you will report an error ora28365. If you run to open the wallet, you will repor
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
navicat如何导入MySQL脚本
随机推荐
Internal and external troubles of "boring ape" bayc
杰理之BLE【篇】
剪映的相关介绍
qt颜色与字符串、uint相互转换
L'auteur est mort? Ai utilise l'art pour conquérir l'humanité
[JDBC] quick start tutorial
TypeScript 可索引类型
[MySQL learning notes 30] lock (non tutorial)
Do you really think binary search is easy
Chrome view page FPS
Memory error during variable parameter overload
可变参数重载时的内存错误
Is software testing outsourcing going or not? Three years' real outsourcing experience tells you
杰理之BLE【篇】
GET/POST/PUT/PATCH/DELETE含义
When the Jericho development board is powered on, you can open the NRF app with your mobile phone [article]
TypeScript 变量作用域
【mysql学习笔记30】锁(非教程)
Uncaught TypeError: Cannot red propertites of undefined(reading ‘beforeEach‘)解决方案
How MySQL merges data