当前位置:网站首页>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
边栏推荐
- OpenJudge NOI 2.1 1661:Bomb Game
- If Jerry's Bluetooth device wants to send data to the mobile phone, the mobile phone needs to open the notify channel first [article]
- SSM学习
- supervisor 使用文档
- The author is dead? AI is conquering mankind with art
- CDN acceleration and cracking anti-theft chain function
- Résumé de la structure du modèle synthétisable
- Jerry's general penetration test - do data transmission with app Communication [article]
- word设置目录
- TS基础篇
猜你喜欢

Internal and external troubles of "boring ape" bayc

Multi attribute object detection on rare aircraft data sets: experimental process using yolov5

Uncaught TypeError: Cannot red propertites of undefined(reading ‘beforeEach‘)解决方案

Idea console color log

Twelve rules for naming variables

升级版手机检测微信工具小程序源码-支持多种流量主模式

OpenGL ES 学习初识(1)

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

How Navicat imports MySQL scripts

SSM学习
随机推荐
[MySQL learning notes 30] lock (non tutorial)
JDBC learning notes
leetcode841. Keys and rooms (medium)
多线程和并发编程(二)
软件测试界的三无简历,企业拿什么来招聘你,石沉大海的简历
Ble of Jerry [chapter]
#systemverilog# 可综合模型的结构总结
word中把带有某个符号的行全部选中,更改为标题
Seriously recommend several machine learning official account
Structure summary of SystemVerilog integrable model
网络安全基础介绍
剪映的相关介绍
Jerry's ad series MIDI function description [chapter]
Do you really think binary search is easy
配置树莓派接入网络
Résumé de la structure du modèle synthétisable
作者已死?AI正用藝術征服人類
You deserve this high-value open-source third-party Netease cloud music player
CDN acceleration and cracking anti-theft chain function
qt颜色与字符串、uint相互转换