当前位置:网站首页>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 .
边栏推荐
- LINQ query (3)
- Charles packet capturing tool
- 国信金太阳打新债步骤 开户是安全的吗
- 分布式事务解决方案和代码落地
- 打新债是不是骗局 开户是安全的吗
- Lizuofan, co-founder of nonconvex: Taking quantification as his lifelong career
- 把 Oracle 数据库从 Windows 系统迁移到 Linux Oracle Rac 集群环境(1)——迁移数据到节点1
- vie的刷新机制
- Talking about the advantages of flying book in development work | community essay solicitation
- Go synchronization waiting group
猜你喜欢

Solution of separating matlab main window and editor window into two interfaces

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

DDD concept is complex and difficult to understand. How to design code implementation model in practice?

自动化测试

使用ShaderGraph制作边缘融合粒子Shader的启示

DSPACE设置斑马线和道路箭头

Overview of AOSP ~ WiFi architecture

背了八股文,六月赢麻了……

leecode学习笔记-机器人走到终点的最短路径

李宏毅《机器学习》丨6. Convolutional Neural Network(卷积神经网络)
随机推荐
Computing service network: a systematic revolution of multi integration
Once beego failed to find bee after passing the go get command Exe's pit
目录权限错误导致 Oracle 11g rac 集群数据库无法启动的问题
random list随机生成不重复数
ERROR日志格式与注意点
Advanced usage of groovy
[live review] battle code pioneer phase 7: how third-party application developers contribute to open source
Migrate Oracle database from windows system to Linux Oracle RAC cluster environment (1) -- migrate data to node 1
Charles packet capturing tool
left join on和 join on的区别
Overview of AOSP ~ WiFi architecture
[i.mx6ul] u-boot migration (VI) network driver modification lan8720a
Jetson Nano 从入门到实战(案例:Opencv配置、人脸检测、二维码检测)
C#实现水晶报表绑定数据并实现打印
Application of TSDB in civil aircraft industry
vim的Dirvish中文文档
Dirvish Chinese document of vim
记一次beego通过go get命令后找不到bee.exe的坑
Leetcode 210: curriculum II (topological sorting)
It is said that Yijia will soon update the product line of TWS earplugs, smart watches and bracelets
