当前位置:网站首页>Introduction and Principle notes of UE4 material
Introduction and Principle notes of UE4 material
2022-07-02 10:18:00 【Qiao'an fish】
Introduction and principle of materials
1. Shaders
Now there are procedural texture effect tools , It can be used to make water 、 Flame, etc 

Shading language
Material field (material domain): To which aspect
shading model
Mixed mode
Other settings
Set the above to form a material template , Material template + expression = texture of material

Expressions are only used in daily work 5%-10%
Custom nodes : You can put each lsl Import into expression
If some effects cannot be achieved with expressions , You can also call Hlsl layer


2. texture Texture
The texture is displayed as a node , By default, each material can have 16 A texture , Using a shared sampler can achieve 28 individual
The texture is just a sample , Just drag it in 
3. Parameter set
Less commonly used , But it's easy to use . Modify a , After that, all effects will be read directly , Don't change one by one 

4. Material examples ( Shader )
A bad , Very often . It is only used when compilation is required , Useful when building materials
Can be copied , Change some effects . You can also superimpose effects , Become part of another shader .

5. compile
Translate it into shader Language , Automatically arrange shaders . Unreal engines always use more optimized materials
So choose a platform 、 purpose 、 switch
Finally, unused shaders will be automatically deleted when packaging 
6. application
Will be applied to ui、 decode 、 light 、 Post processing 、 Mention material 、 The surface of the 
Virtual texture : It can make objects melt into the scene 
7. Performance performance

Stats Commands can let you know how many instructions there are for materials 
Shader Complexity —— You can know which material costs in the viewport 
Quality switch —— You can make low configuration version and high configuration version . The low configuration version is to synchronize a texture , For mobile phones . The high configuration version is applied in the whole network , Suitable for pc
Material analyzer —— Not commonly used , You can find whether there are duplicate materials 
Suggest
1. Balance between instances and materials
If everything is made of special materials , There will be a lot of trouble in the future . Because all materials are special , Iteration is difficult , At the same time, it will create many shader Shaders .
If you make everything into examples , It can be troublesome . When you want to modify a specific instance , You must modify the parent material , Add many functions , This will cause the parent material to be very complex .
If you only focus on a small part of materials , You can't predict what the project will eventually look like , So try more , Find instances and materials Balance point .

Common functions correspond to some main materials , The main material corresponds to some instances , Instance and then derive other instances .
To find the right structure , You can use layers or not
**
2. Instances within instances
**
One instance can be derived from another 
3. Shader compilation allocation
Use Incredibuild( Developer kits ) There can be significant differences in the number of compilations , In large projects Incredibuild Can greatly speed up compilation
4. Merge maps / Packaging channel
Pack multiple gray-scale textures through three channels of red, green and blue . This can avoid using alpha Channels store textures , because alpha It is usually uncompressed , This can Save a space 

5.Pbr
speckle specular And metallic metalic Often it's just a simple value , We don't assign textures to highlights or metallic colors , It is a 0-1 Value , The default is 0.5.
Roughness roughness At present, it is the most important , This is where you generate the texture , Useful for simple materials or distant geometric objects , And it takes up less space .
Ao Ambient occlusion is only applicable to static objects , The game is dynamic lighting , So you can not ao Add to the rendering pipeline .
6. function library
You can build your own functions , This can improve efficiency . Don't easily modify the standard functions of the engine
7. Be prepared for compatibility
Consider texture groups and quality switches from day one , Pay attention to other useful material marks . Some expressions may have much more memory than others .
边栏推荐
猜你喜欢
随机推荐
Blender海洋制作
Edge computing accelerates live video scenes: clearer, smoother, and more real-time
Blender ocean production
Junit4运行mvn test 测试套件升级方案
阿里云Prometheus监控服务
Data insertion in C language
职业规划和发展
Notes de base sur les plans illusoires d'IA (triés en 10 000 mots)
【Unity3D】无法正确获取RectTransform的属性值导致计算出错
Blender多鏡頭(多機比特)切換
Minimum number of C language
Summary of demand R & D process nodes and key outputs
Network real-time video streaming based on OpenCV
【避坑指南】使用UGUI遇到的坑:Text组件无法首行缩进两格
【避坑指南】Unity3D项目接入腾讯Bugly工具时遇到的坑
MySQL index
2837xd code generation - Supplement (2)
This monitoring system makes workers tremble: turnover intention and fishing can be monitored. After the dispute, the product page has 404
Matlab生成dsp程序——官方例程学习(6)
2.14 is it Valentine's day or Valentine's day when the mainstream market continues to fluctuate and wait for changes?









