当前位置:网站首页>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 .
边栏推荐
- automated testing
- Detailed explanation of cache (for the postgraduate entrance examination of XD)
- 折叠屏将成国产手机分食苹果市场的重要武器
- Computing service network: a systematic revolution of multi integration
- Summary of knowledge points of computer level III (database) test preparation topics
- 运行时修改Universal Render Data
- Migrate Oracle database from windows system to Linux Oracle RAC cluster environment (2) -- convert database to cluster mode
- js正则匹配数字、大小写字母、下划线、中线和点[通俗易懂]
- F - spices (linear basis)
- 入坑机器学习:一,绪论
猜你喜欢

Leecode learning notes - the shortest path for a robot to reach its destination

Getting started with unityshader - Surface Shader

Software testing salary in first tier cities - are you dragging your feet

Sumati gamefi ecological overview, element design in the magical world

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

【STL源码剖析】配置器(待补充)

【STL源码剖析】STL六大组件功能与运用(目录)

qt打包exe文件,解决“无法定位程序输入点_ZdaPvj于动态链接库Qt5Cored.dll”

Rod and Schwartz cooperated with ZhongGuanCun pan Lianyuan Institute to carry out 6G technology research and early verification

vie的刷新机制
随机推荐
PyTorch学习笔记(七)------------------ Vision Transformer
Uncaught Error: [About] is not a <Route> component. All component children of <Routes> must be a <Ro
Unity archive system - file in JSON format
折叠屏将成国产手机分食苹果市场的重要武器
把 Oracle 数据库从 Windows 系统迁移到 Linux Oracle Rac 集群环境(1)——迁移数据到节点1
Yarn: unable to load file c:\users\xxx\appdata\roaming\npm\yarn PS1 because running scripts is prohibited on this system
left join on和 join on的区别
I've been doing software testing for two years. I'd like to give some advice to girls who are still hesitating
Squid 代理服务器之 ACL 访问控制
打新债100%中签的方法 开户是安全的吗
js正则匹配数字、大小写字母、下划线、中线和点[通俗易懂]
微信小程序获取扫描二维码后携带的参数
Overview of AOSP ~ WiFi architecture
ERROR日志格式与注意点
给你讲懂 MVCC 续篇
打新债是不是骗局 开户是安全的吗
vie的刷新机制
Distributed transaction solutions and code implementation
Rod and Schwartz cooperated with ZhongGuanCun pan Lianyuan Institute to carry out 6G technology research and early verification
Advanced mathematics | proficient in mean value theorem problem solving routines summary
