vault backup: 2025-11-30 19:55:44
This commit is contained in:
@@ -1 +1 @@
|
|||||||
{"相关命令行":{"相关命令行":{"currentFile":{"count":1,"lastUpdated":1761555658044}}},"AfterImage":{"AfterImage":{"currentFile":{"count":5,"lastUpdated":1761622711252}}},"支付宝:支出":{"支付宝:支出":{"currentFile":{"count":2,"lastUpdated":1762180517999}}},"CustomThunk":{"CustomThunk":{"internalLink":{"count":1,"lastUpdated":1762504378918}}},"shader使用方法":{"shader使用方法":{"currentFile":{"count":1,"lastUpdated":1763559532183}}}}
|
{"支付宝:支出":{"支付宝:支出":{"currentFile":{"count":2,"lastUpdated":1762180517999}}},"CustomThunk":{"CustomThunk":{"internalLink":{"count":1,"lastUpdated":1762504378918}}},"shader使用方法":{"shader使用方法":{"currentFile":{"count":1,"lastUpdated":1763559532183}}},"高频的GI信息会破坏卡通渲染质感?":{"高频的GI信息会破坏卡通渲染质感?":{"currentFile":{"count":1,"lastUpdated":1764499564433}}}}
|
||||||
@@ -9,6 +9,7 @@ destination:
|
|||||||
share: false
|
share: false
|
||||||
obsidianUIMode: source
|
obsidianUIMode: source
|
||||||
---
|
---
|
||||||
|
- [[UFSH2025]《鸣潮》中的光线追踪: 用光线构建动漫风格开放世界 | 王鑫 库洛游戏《鸣潮》图形渲染组长] https://www.bilibili.com/video/BV1hSW4zTEgQ/?share_source=copy_web&vd_source=fe8142e8e12816535feaeabd6f6cdc8e
|
||||||
# Rtx
|
# Rtx
|
||||||
实现功能
|
实现功能
|
||||||
1. Rtx反射
|
1. Rtx反射
|
||||||
@@ -16,11 +17,11 @@ obsidianUIMode: source
|
|||||||
3. RtxShadow
|
3. RtxShadow
|
||||||
|
|
||||||
# 选型&快速验证
|
# 选型&快速验证
|
||||||
需求
|
1. 需求:
|
||||||
32km 32km
|
1. 32km 32km
|
||||||
二次元
|
2. 二次元
|
||||||
TOD
|
3. TOD
|
||||||
4060 2k 60fps
|
4. 4060 2k 60fps
|
||||||
|
|
||||||
方案:
|
方案:
|
||||||
1. ReSTIR
|
1. ReSTIR
|
||||||
@@ -64,8 +65,84 @@ if(IsToonShadingModel(ShadingModelID))
|
|||||||
```
|
```
|
||||||
|
|
||||||
案例2:角色接入GI
|
案例2:角色接入GI
|
||||||
|
- 角色渲染与场景氛围贴合
|
||||||
|
- 角色需要接受环境反射的间接光
|
||||||
|
- 提升角色效果的通透感
|
||||||
|
- ![[WUWA_CharacterGI_1.png]]
|
||||||
|
- 风格化场景
|
||||||
|
- 高频的GI信息会破坏卡通渲染质感
|
||||||
|
- 头发与面部先做球形法线处理
|
||||||
|
- 角色整体法线朝向相机
|
||||||
|
- 低成本平滑的间接光
|
||||||
|
```c++
|
||||||
|
float3 V = -GetCameraVectorFromTranslatedWorldPosition(TranslatedWorldPosition);
|
||||||
|
if(IsToonShadingModel(Material. ShadingID))
|
||||||
|
{
|
||||||
|
Material.WorldNormal = normalize(lerp(WorldNormal, V, 0.5));
|
||||||
|
}
|
||||||
|
```
|
||||||
|
![[WUWA_CharacterGI_2.png]]
|
||||||
|
- 混合处理
|
||||||
|
- 卡渲阴影下并非全黑,避免爆掉和效果异常
|
||||||
|
- 将间接光转为HSV,限制饱和度与明度
|
||||||
|
- 乘上AO,增加层次感
|
||||||
|
- 穿日皮肤Mask,皮肤见扫GI影响
|
||||||
|
```c++
|
||||||
|
half3 IndirectLightHSV = RGBToHSVHalf(DiffuseIndirectLighting);
|
||||||
|
IndirectLightHSV.b = lerp(0, 0.3, IndirectLightHSV.b);
|
||||||
|
IndirectLightHSV.g = clamp(0, Θ.35, IndirectLightHSV.g);
|
||||||
|
```
|
||||||
|
![[WUWA_CharacterGI_3.png]]
|
||||||
|
|
||||||
案例3:角色接入反射
|
案例3:角色接入反射
|
||||||
|
- 希望能够应用在金属特性的表面
|
||||||
|
- 增加角色效果与环境的交互细节
|
||||||
|
- 风格化处理
|
||||||
|
- 粗糙度:Clamp在0~0.3999避免转为SSR
|
||||||
|
- 金属度:当做反射强度,超过0.9为镜面反射
|
||||||
|
- 混合处理
|
||||||
|
- 在Matcap基础上相加,不影响本身金属效果
|
||||||
|
|
||||||
|
![[WUWA_CharacterReflection_1.png]]
|
||||||
|
|
||||||
|
## HybridShadow
|
||||||
|
- Billboard和Imposter等物体需要阴影
|
||||||
|
- 光追和光栅化不同,无法分离ShadowPass和BasePass
|
||||||
|
- 混合了 CSM + Ray Traced Shadow
|
||||||
|
- 通过TileClassify减少Trace的像素
|
||||||
|
|
||||||
|
### RaytracingShadows
|
||||||
|
- 美术有时候会用单向Plane遮挡光照
|
||||||
|
- 需要适配原有的美术资源的阴影逻辑
|
||||||
|
- Shadow RayFlag:
|
||||||
|
- RAY_FLAG_CULL_FRONT_FACING_TRIANGLES
|
||||||
|
|
||||||
|
### VolumtricFog
|
||||||
|
- VolumetricFog依赖CSM
|
||||||
|
- 用ShadowRay预生成3D ShadowVolume
|
||||||
|
- Inject Lighting用ShadowVolume判断Visibility
|
||||||
|
- Hybrid Shadow可以用于性能优化,减少Trace物体解耦ShadowVolume和体积雾精度,低端机性能分级
|
||||||
|
### SingleLayerWater & Translucency
|
||||||
|
- SLW需要水底颜色 +水底深度,多Trace一条光线计算水底颜色和深度,模拟散射
|
||||||
|
- 和SLW一样,多发射一条光线,每层循环Trace,手动Blend,注意控制层数
|
||||||
|
|
||||||
|
### Skybox
|
||||||
|
- 鸣潮天空盒非常好看,但也非常复杂,反射里需要能看到天空(Very Important! ! )
|
||||||
|
- 可以在RayMiss或HitT足够远的时候进行3~4次的Ray Traversal去手动Blend,反射完整天空盒
|
||||||
|
- 会造成非常严重的性能开销
|
||||||
|
![[WUWA_SkyBox1.png]]
|
||||||
|
## 性能优化
|
||||||
|
### Skybox Capture
|
||||||
|
|
||||||
|
### Payload压缩
|
||||||
|
|
||||||
|
### OMM & SER
|
||||||
|
- Opacity Micro-Map (OMM)
|
||||||
|
- 和光栅化不同,光追中实现AlphaTest需要在AHS里计算Alpha
|
||||||
|
- Encode TriangleVisibleState To BLAS
|
||||||
|
- 黄色三角形才需要走AHS计算
|
||||||
|
- Shader Execution Reordering (SER)
|
||||||
|
- GPU上的计算尽量相似,否则会产生Divergence问题
|
||||||
|
- 做GI时光线方向非常发射,材质计算复杂度也不尽相同
|
||||||
|
- Nvidia推出SER的GPU Feature,可以一定程度解决问题
|
||||||
|
- 方向一致的计算提升不大,还会寄存器使用过多导致性能下降
|
||||||
|
|||||||
@@ -222,7 +222,10 @@ JD购物:137.68
|
|||||||
| 物业费 | 11.2 | 2029.32 | 支付宝 |
|
| 物业费 | 11.2 | 2029.32 | 支付宝 |
|
||||||
| 燃气费 | 10.31 | 80.6 | 支付宝 |
|
| 燃气费 | 10.31 | 80.6 | 支付宝 |
|
||||||
| 购买星露谷 | 11.1 | 120 | 支付宝 |
|
| 购买星露谷 | 11.1 | 120 | 支付宝 |
|
||||||
|
| 滨望物业费 | 11.2 | 2029.32 | 支付宝 |
|
||||||
|
| 中医 | 11.8 | 578 | |
|
||||||
|
| 优衣库 | | | |
|
||||||
|
|
||||||
支付宝:支出 收入
|
支付宝:6409.93支出 收入
|
||||||
微信:支持 收入
|
微信:支持 收入
|
||||||
JD购物:
|
JD购物:
|
||||||
BIN
08-Assets/Images/ImageBag/UnrealFest/2025/WUWA_CharacterGI_1.png
LFS
Normal file
BIN
08-Assets/Images/ImageBag/UnrealFest/2025/WUWA_CharacterGI_1.png
LFS
Normal file
Binary file not shown.
BIN
08-Assets/Images/ImageBag/UnrealFest/2025/WUWA_CharacterGI_2.png
LFS
Normal file
BIN
08-Assets/Images/ImageBag/UnrealFest/2025/WUWA_CharacterGI_2.png
LFS
Normal file
Binary file not shown.
BIN
08-Assets/Images/ImageBag/UnrealFest/2025/WUWA_CharacterGI_3.png
LFS
Normal file
BIN
08-Assets/Images/ImageBag/UnrealFest/2025/WUWA_CharacterGI_3.png
LFS
Normal file
Binary file not shown.
BIN
08-Assets/Images/ImageBag/UnrealFest/2025/WUWA_CharacterReflection_1.png
LFS
Normal file
BIN
08-Assets/Images/ImageBag/UnrealFest/2025/WUWA_CharacterReflection_1.png
LFS
Normal file
Binary file not shown.
BIN
08-Assets/Images/ImageBag/UnrealFest/2025/WUWA_SkyBox1.png
LFS
Normal file
BIN
08-Assets/Images/ImageBag/UnrealFest/2025/WUWA_SkyBox1.png
LFS
Normal file
Binary file not shown.
Reference in New Issue
Block a user