当前位置:网站首页>Getting started with unityshader Essentials - PBS physics based rendering
Getting started with unityshader Essentials - PBS physics based rendering
2022-06-25 02:50:00 【Jelly Xizhilang】
1 PBS Fundamentals of theory and mathematics
Material refractive index : If the refractive index of the medium changes as light travels , The direction of light will change . especially , If the refractive index is abrupt , Light scattering will occur .
Fresnel equation : Light is divided into two directions at the boundary of different media : Direction of reflection and direction of refraction . And what percentage of the light will be reflected ( The other part is refracted ) Is the Fresnel equation (Fresnel equations) To describe the .
Microsurface reflection : The change angle of the normal direction of the micro surface is small , The direction change of the light reflected from the surface is also relatively small , The specular reflection of the object is clearer ; Rough surfaces are the opposite , The resulting specular effect is more blurred .

Micro surface refraction : The light is refracted into the interior of the object , Part of it is absorbed by the medium , Part of it is scattered to the outside . Metal material has a high absorption coefficient , therefore , All refracted light tends to be absorbed immediately , By free electrons inside the metal
Other forms of energy .
Subsurface scattered light : Non metallic materials will show both absorption and scattering , These scattered light is also called subsurface scattered light (subsurface-scattered light)

Radiation rate : Emissivity is a unit area 、 The radiant flux of the light source in the unit direction , Usually use L To express , It is considered to be an evaluation of the brightness and color of a single light . In rendering , We usually base it on the incident emissivity of the incident light on the surface Li To calculate the outgoing emissivity L0, This process is often called coloring (shading) The process .
Bidirectional reflection distribution function BRDF: When a beam of light goes in the direction of incidence I At some point on the surface ,f(I,v) It shows how much of the energy is reflected to the viewing direction v On . Most of the time ,BRDF It can be used f(I,v) To express , among I Is the incident direction and v For the viewing direction ( Two way meaning ). In this case , Rotating the incident or viewing direction around the surface normal does not affect BRDF Result , such BRDF It is called homosexuality (isotropic) Of BRDF. The opposite is anisotropy (anisotropic) Of BRDF.
Reflection equation :
Precise light source : It refers to those directions that determine 、 The size is a small wireless light source , for example , Common point lights 、 Spotlight, etc . We use I. To indicate its direction , Use Chight Indicates its color .

If the scene contains more than one precise light source , We can substitute them into the above formula for calculation , Then add their results together .
below , Let's look at the important component of the reflection equation BRDF How to get it . It can be seen that ,BRDF Determines whether the shading process is physically based . This can be done by BRDF Whether it meets two characteristics : Whether it satisfies the commutative law (reciprocity) And conservation of energy (energy conservation).
The law of exchange requires that when exchange I and v After the value of ,BRDF The value of does not change , namely f(v·I)=f(I·v).
Energy conservation requires that the energy reflected by the surface should not exceed the incident light energy , namely 
Diffuse term :
Cdiff Represents the proportion of diffuse rays , It is also commonly referred to as the diffuse color (diffusecolor).
Specular term :

Suppose the surface normal is n, The normals of these micro facets m Not all equal to n, therefore , Different micro facets will reflect light from the same incident direction to different directions . And when we calculate BRDF when , Incident direction I And the direction of observation v Will be given , This means that only a part of the light reflected by micro facets will enter our eyes , This part of the micro panel will just reflect the light to the direction v On , That is, their normals m be equal to I and v Half of , That's the half angle vector we've been looking at h(half-anglevector, Also known as half vector).
D(h) Is the normal distribution function of the micro facet (normaldistributionfunction, NDF), It is used to calculate how much the normal of the micro facet satisfies m=h, Only this part of the micro facet will send light from I The direction is reflected to v On .
G(I,v,h) Is the shadow masking function (shadowing masking function), It is used to calculate those that satisfy m=h How many of the micro facets will not be seen by human eyes due to occlusion , So it gives active micro - facets ( active microfacets) The concentration , Only active micro facets can successfully reflect light in the viewing direction .
F(I,h) It is the Fresnel reflection of these active micro facets (Fresnel reflectance) function , It can tell us how much incident light is reflected in the viewing direction by each active micro panel , That is, the ratio of reflected light to incident light .
4(n D)(n. v) It is a correction factor used to correct the number difference from the local space of the micro panel to the overall macro surface .
边栏推荐
- Migrate Oracle database from windows system to Linux Oracle RAC cluster environment (4) -- modify the scanip of Oracle11g RAC cluster
- 给你讲懂 MVCC 续篇
- Internship: use of SVN
- 計網 | 【四 網絡層】知識點及例題
- JS regular matching numbers, upper and lower case letters, underscores, midlines and dots [easy to understand]
- Jetson nano from introduction to practice (cases: opencv configuration, face detection, QR code detection)
- Overview of AOSP ~ WiFi architecture
- 把 Oracle 数据库从 Windows 系统迁移到 Linux Oracle Rac 集群环境(1)——迁移数据到节点1
- Of the seven levels of software testers, it is said that only 1% can achieve level 7
- 折叠屏将成国产手机分食苹果市场的重要武器
猜你喜欢

软件测试周刊(第77期):只要放弃一次,就会滋生放弃的习性, 原本可以解决的问题也会变得无法解决。

left join on和 join on的区别

Yarn: unable to load file c:\users\xxx\appdata\roaming\npm\yarn PS1 because running scripts is prohibited on this system

Once beego failed to find bee after passing the go get command Exe's pit

Advanced mathematics | proficient in mean value theorem problem solving routines summary

记一次beego通过go get命令后找不到bee.exe的坑

Unity archive system - file in JSON format
![[analysis of STL source code] functions and applications of six STL components (directory)](/img/f2/872fd93ef52b1424343ba634be24f6.png)
[analysis of STL source code] functions and applications of six STL components (directory)

When they are in private, they have a sense of propriety

入坑机器学习:一,绪论
随机推荐
js正则匹配数字、大小写字母、下划线、中线和点[通俗易懂]
It is said that Yijia will soon update the product line of TWS earplugs, smart watches and bracelets
Charles packet capturing tool
14 bs对象.节点名称.name attrs string 获取节点名称 属性 内容
PSQL column to row
Summary of knowledge points of computer level III (database) test preparation topics
NPM package publishing tutorial
LINQ 查询(3)
14 BS object Node name Name attrs string get node name attribute content
E - average and median
mysql命令备份
doak-cms 文章管理系统 推荐
Migrate Oracle database from windows system to Linux Oracle RAC cluster environment (2) -- convert database to cluster mode
C#实现水晶报表绑定数据并实现打印
The Oracle 11g RAC cluster database cannot be started due to directory permission errors
202112-2 序列查询新解
入坑机器学习:一,绪论
Jetson Nano 从入门到实战(案例:Opencv配置、人脸检测、二维码检测)
Application of TSDB in civil aircraft industry
[STL source code analysis] configurator (to be supplemented)
