当前位置:网站首页>[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 ):
边栏推荐
- [party benefits] jsonobject to string, leave blank
- Appium自动化测试基础--补充:C/S架构和B/S架构说明
- 171. excel table column No
- [EI conference] the Third International Conference on nanomaterials and nanotechnology in 2022 (nanomt 2022)
- MFC窗口滚动条用法
- 242. 有效的字母异位词
- IPv4和IPv6、局域网和广域网、网关、公网IP和私有IP、IP地址、子网掩码、网段、网络号、主机号、网络地址、主机地址以及ip段/数字-如192.168.0.1/24是什么意思?
- 165. compare version numbers
- Are you still wasting brain cells for self-study? This interview note is definitely the ceiling of station C
- Pyramid Scene Parsing Network【PSPNet】论文阅读
猜你喜欢
Binary tree god level traversal: Morris traversal
Feature Pyramid Networks for Object Detection论文理解
[nine day training] content III of the problem solution of leetcode question brushing Report
Promql select time series
[TA frost wolf \u may- hundred people plan] 2.4 traditional empirical lighting model
【TA-霜狼_may-《百人计划》】1.3纹理的秘密
【TA-霜狼_may-《百人计划》】2.1 色彩空间
[TA frost wolf \u may - "hundred people plan"] 2.1 color space
Random seed torch in deep learning manual_ seed(number)、torch. cuda. manual_ seed(number)
[小样本分割]论文解读Prior Guided Feature Enrichment Network for Few-Shot Segmentation
随机推荐
访问阿里云存储的图片URL实现在网页直接预览略缩图而不直接下载
Blueprism registration, download and install -rpa Chapter 1
How do I use Google Chrome 11's Upload Folder feature in my own code?
Future of NTF and trends in 2022
409. longest palindrome
171. excel table column No
jeecgboot输出日志,@Slf4j的使用方法
10. regular expression matching
pytorch nn.AdaptiveAvgPool2d(1)
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
【TA-霜狼_may-《百人计划》】2.4 传统经验光照模型
Pytorch training deep learning network settings CUDA specified GPU visible
Cygwin的下载和安装配置
The combination of applet container technology and IOT
The method to measure the similarity of two vectors: cosine similarity, pytorch calculate cosine similarity: torch nn. CosineSimilarity(dim=1, eps=1e-08)
[ta - Frost Wolf May - 100 people plan] 2.3 Introduction aux fonctions communes
5. [WebGIS practice] software operation - service release and permission management
【TA-霜狼_may-《百人計劃》】2.3 常用函數介紹
[TA frost wolf \u may- hundred people plan] 2.3 introduction to common functions
187. 重复的DNA序列