当前位置:网站首页>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
边栏推荐
- SEO学习的最好方式:搜索引擎
- word怎么只删除英语保留汉语或删除汉语保留英文
- Markdown 中设置图片图注
- Set picture annotation in markdown
- Upgraded wechat tool applet source code for mobile phone detection - supports a variety of main traffic modes
- #systemverilog# 可综合模型的结构总结
- 【JDBC】快速入门教程
- Win10 64 bit Mitsubishi PLC software appears oleaut32 DLL access denied
- C - Inheritance - polymorphism - virtual function member (lower)
- How MySQL merges data
猜你喜欢
变量的命名规则十二条
jmeter性能测试步骤实战教程
树莓派3B更新vim
[online problem processing] how to kill the corresponding process when the MySQL table deadlock is caused by the code
The author is dead? AI is conquering mankind with art
Thought map of data warehouse construction
Uncaught TypeError: Cannot red propertites of undefined(reading ‘beforeEach‘)解决方案
Ble of Jerry [chapter]
You deserve this high-value open-source third-party Netease cloud music player
Markdown 中设置图片图注
随机推荐
Bloom taxonomy
Méthode d'obtention des propriétés de l'objet JS (.Et [] méthodes)
Twelve rules for naming variables
TypeScript void 基础类型
树莓派3B更新vim
位运算异或
How to configure GUI guide development environment
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
树莓派串口登录与SSH登录方法
Ble of Jerry [chapter]
Wechat official account infinite callback authorization system source code, launched in the whole network
Jerry's ad series MIDI function description [chapter]
Typescript function definition
学go之路(一)go的基本介绍到第一个helloworld
js对象获取属性的方法(.和[]方式)
leetcode1020. Number of enclaves (medium)
剪映的相关介绍
LeetCode Algorithm 2181. Merge nodes between zero
Yield method of tread
L'auteur est mort? Ai utilise l'art pour conquérir l'humanité