当前位置:网站首页>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
边栏推荐
猜你喜欢

The author is dead? AI is conquering mankind with art

SEO学习的最好方式:搜索引擎

TypeScript接口与泛型的使用

烧录场景下的源代码防泄密方案分享

qt颜色与字符串、uint相互转换

Typescript interface and the use of generics

OpenGL ES 学习初识(1)
![[window] when the Microsoft Store is deleted locally, how to reinstall it in three steps](/img/57/ee979a7db983ad56f0df7345dbc91f.jpg)
[window] when the Microsoft Store is deleted locally, how to reinstall it in three steps

Cookie Technology & session Technology & ServletContext object

Multi attribute object detection on rare aircraft data sets: experimental process using yolov5
随机推荐
【mysql学习笔记30】锁(非教程)
L'auteur est mort? Ai utilise l'art pour conquérir l'humanité
学go之路(一)go的基本介绍到第一个helloworld
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
Cookie技术&Session技术&ServletContext对象
word中把帶有某個符號的行全部選中,更改為標題
supervisor 使用文档
Structure summary of SystemVerilog integrable model
Idea console color log
Typescript variable scope
Set picture annotation in markdown
[MySQL learning notes 29] trigger
Word delete the contents in brackets
Ble of Jerry [chapter]
Wechat official account infinite callback authorization system source code, launched in the whole network
Go learning --- use reflection to judge whether the value is valid
Ble of Jerry [chapter]
Uncaught typeerror: cannot red properties of undefined (reading 'beforeeach') solution
树莓派3B更新vim
OpenJudge NOI 2.1 1749:数字方格