当前位置:网站首页>[ta- frost wolf \u may- hundred people plan] 2.2 model and material space
[ta- frost wolf \u may- hundred people plan] 2.2 model and material space
2022-07-01 03:47:00 【zczplus】
【TA- Frost Wolf _may-《 Hundred people plan 》】2.2 Model and material space
–
Rendering pipeline and model foundation
Realization principle of the model
Connect the dots into a line , Line enclosing surface , And then form a polygon , So far, a model in the model space has been formed .
UV
UV Like a mineral water bottle , Cut it apart . Tile in a two-dimensional coordinate system .
Every position of the bottle ( Every vertex of the model ), In three-dimensional space and two-dimensional space can be one-to-one correspondence . The corresponding position of the vertex in the two-dimensional coordinate system is the texture coordinate of the vertex .
therefore , Each vertex can use the texture coordinates to obtain the information stored in the map .
Model UV
In modeling software Conduct UV an ,UV Will be placed in a horizontal direction for U Vertical is V, Range (0-1) In a two-dimensional coordinate system
Expanded UV stay SP Draw a map in ( Diffuse map 、 Normal map 、 height map 、 Metallicity mapping 、AO Mapping )
Information contained in a model ( With OBJ File as an example )
V Vertex coordinate data ( Of a single vertex in model space XYZ coordinate )
VT UVW Map ( The horizontal direction is U, The vertical direction is V, The scope is 0-1 Between )
VN Vertex normals ( The current peak Z The orientation of the axis , This Z The axis is the orientation of the vertex itself in model space . And the vertex normals ultimately determine the orientation of the face )
Vertex color ( Of a single vertex RGBA Channel color information )
OBJ And FBX Format comparison
fbx The format supports vertex Color, Multi quadrant UV as well as LOD( Level of detail model )
Material foundation
texture of material
Some objects don't scatter much when they reflect light (Scatter), This produces a small high spot ;
And some objects will scatter a lot of light , Produce a highlight with a larger radius
Diffuse reflection
Lambertian The method simply considers that light is reflected evenly ;
Specular reflection
Specular reflection is the reflection of incident light according to the surface normal , And there is energy only in the direction of reflection , The energy in other directions is 0;( Add :Games101 Mentioned in , Specular reflection , The reflection angle is not necessarily equal to the incident angle , The highlight area can be seen only within a certain range of the specular reflection angle , So the energy in other directions is 0 It's a general statement )
refraction
For the dielectric of glass , In addition to reflection, it also refracts part of the light into the object according to the refractive index of the object , The amount of reflected and refracted energy is determined by Fresnel's law .
Rough specular reflection ( Add the specular reflection above )
Frosted metal surface
Rough specular reflection
All kinds of ground glass
Multi layer material
Besides the material of the object itself , The outer layer is also attached to other materials such as : Transparent paint, etc 
Subsurface scattering
Subsurface scattering objects are generally translucent objects , for example : Jade 、 Candles, etc ;
Multilayer skin model
Think of the skin as three layers , Respectively : Grease layer , Epidermis , Dermis .
The grease layer provides direct reflection , Produce a highlight effect on the skin surface ;
Another part of the light enters the surface layer through refraction , Light is partially absorbed after entering these layers ( To produce color ) And scattering , And then from the exit point near the incident point in the skin . This process produces the effect of subsurface scattering .
Change the material surface
reason :
- There is no perfectly smooth plane in the real world ;
- A model vertex carries a finite number of normals .
Therefore, normal mapping can be used to supplement
And diffuse reflection , highlights , The normal is involved in the calculation of refraction , So make adjustments to the normals , Can affect the result of its illumination calculation .
Model data analysis
- Vertex animation : In the vertex shader , Modify the vertex position of the model . So as to achieve the effect of model movement ;
- Texture animation : In the fragment shader , Modify magical UV Information , When sampling maps , Produce movement effect due to displacement ;
- Vertex color : At the time of rendering , Affect output results . Control the color range
Texture animation
principle 1
By modifying the normal map , Change the direction of reflection and refraction . Normals by 1 change 2, Reflected light is also caused by 1 change 2, As shown in the figure below :
Simply modify the normal , Keep other data unchanged , Can change the texture and appearance of an object .
principle 2
change UV Sample points to produce animation 
Vertex animation
Operate on the vertices of the model in the vertex shader to produce the effect of animation . Vertex shaders are applied to every vertex , The data of each vertex is different , So the same calculation formula is on different vertices , The calculated results are also different
In some 3D modeling software , The animation K Frame can also be understood as a kind of vertex animation ;
Vertex color
Control vertex color in vertex shader , application : shadow , Line thickness, etc
Barycentric coordinate color interpolation
Use vertex coordinates for interpolation ( Is not very good , Let's see later Games101 Did you say )
Vertex normals and face normals
A good understanding , Vertex normals are awesome .
Expand
In cartoon rendering , Generally, the back of the model is expanded outward along the normal direction , Then output a color , So as to achieve the effect of tracing , In objects that do not use smooth shading , The size of the face remains unchanged , Recolor will cause the fracture of the outer contour , This is caused by the discontinuity of normals .
summary
What other uses do vertex colors have ?
- Can be used to pre specify lighting 、 Light blocking and other visual effects .
- Render the model separately as a mask , Including but not limited to lighting calculation separately , Deal with animation, etc. separately ;
- Coloring with vertex colors ;
The influence of model smoothing group on normal ?
After using smoothing , Vertices re interpolate normals according to the smoothed model , Faces under the same smoothing group will have a smoothing effect ; As shown in the lower part of the figure below ( source ):
边栏推荐
- IPv4 and IPv6, LAN and WAN, gateway, public IP and private IP, IP address, subnet mask, network segment, network number, host number, network address, host address, and IP segment / number - what does
- Future of NTF and trends in 2022
- 187. 重复的DNA序列
- 214. 最短回文串
- [TA frost wolf \u may- hundred people plan] 2.4 traditional empirical lighting model
- Grid system in bootstrap
- 【EI会议】2022年第三届纳米材料与纳米技术国际会议(NanoMT 2022)
- 171. excel table column No
- Explain spark operation mode in detail (local+standalone+yarn)
- Visit the image URL stored by Alibaba cloud to preview the thumbnail directly on the web page instead of downloading it directly
猜你喜欢
![[ta - Frost Wolf May - 100 people plan] 2.3 Introduction aux fonctions communes](/img/be/325f78dee744138a865c13d2c20475.png)
[ta - Frost Wolf May - 100 people plan] 2.3 Introduction aux fonctions communes

Appium自动化测试基础 — APPium基本原理

使用selenium自动化测试工具爬取高考相关院校专业招生分数线及排名情况

【TA-霜狼_may-《百人计划》】2.3 常用函数介绍

[TA frost wolf \u may - "hundred people plan"] 2.1 color space

IPv4和IPv6、局域网和广域网、网关、公网IP和私有IP、IP地址、子网掩码、网段、网络号、主机号、网络地址、主机地址以及ip段/数字-如192.168.0.1/24是什么意思?

The combination of applet container technology and IOT

Asgnet paper and code interpretation 2

ASGNet论文和代码解读2

pytorch中的双线性插值上采样(Bilinear Upsampling)、F.upsample_bilinear
随机推荐
【EI会议】2022年国际土木与海洋工程联合会议(JCCME 2022)
bootsrap中的栅格系统
Review column - message queue
IPv4 and IPv6, LAN and WAN, gateway, public IP and private IP, IP address, subnet mask, network segment, network number, host number, network address, host address, and IP segment / number - what does
392. judgment subsequence
Valid brackets (force deduction 20)
Appium automation test foundation -- supplement: c/s architecture and b/s architecture description
Use selenium automated test tool to climb the enrollment score line and ranking of colleges and universities related to the college entrance examination
Appium fundamentals of automated testing - basic principles of appium
389. find a difference
318. Maximum word length product
How do I use Google Chrome 11's Upload Folder feature in my own code?
Research on target recognition and tracking based on 3D laser point cloud
171. excel table column No
6. Z 字形变换
The difference between MFC for static libraries and MFC for shared libraries
Leetcode 31 next spread, leetcode 64 minimum path sum, leetcode 62 different paths, leetcode 78 subset, leetcode 33 search rotation sort array (modify dichotomy)
Leetcode 128 longest continuous sequence (hash set)
Asgnet paper and code interpretation 2
Implement pow (x, n) function