vault backup: 2025-10-27 18:56:24

This commit is contained in:
2025-10-27 18:56:25 +08:00
parent bee0258e6c
commit 2a66eb5c88
3 changed files with 72 additions and 32 deletions

View File

@@ -1 +1 @@
{"舒菁亲密付":{"舒菁亲密付":{"currentFile":{"count":1,"lastUpdated":1759419218049}}},"支付宝:支出":{"支付宝:支出":{"currentFile":{"count":1,"lastUpdated":1759419268158}}},"DESC":{"DESC":{"currentFile":{"count":1,"lastUpdated":1759830688208}}}}
{"舒菁亲密付":{"舒菁亲密付":{"currentFile":{"count":1,"lastUpdated":1759419218049}}},"支付宝:支出":{"支付宝:支出":{"currentFile":{"count":1,"lastUpdated":1759419268158}}},"DESC":{"DESC":{"currentFile":{"count":1,"lastUpdated":1759830688208}}},"相关命令行":{"相关命令行":{"currentFile":{"count":1,"lastUpdated":1761555658044}}}}

View File

@@ -9,7 +9,9 @@ destination:
share: false
obsidianUIMode: source
---
# Level Streaming Hitch
# 前言
录制视频:[[UFSH2025]卡顿大追猎:排查逐帧瓶颈 | Ari Arnbiornsson Epic Games 开发者关系资深工程师(官方字幕)](https://www.bilibili.com/video/BV1k44mzWEvq/?share_source=copy_web&vd_source=fe8142e8e12816535feaeabd6f6cdc8e)
# Level Streaming Hitches
## Using Actor for Static Geometry
1. 不要在Actor中放入过多StaticMesh。避免使用Actor—+Stat
@@ -20,11 +22,15 @@ obsidianUIMode: source
4. Foliage Tool
5. Niagara/Mass
## 5.6 针对大世界流式加载有迭代
## 5- .6 针对大世界流式加载有迭代
- Asynchronous component registration
- Asynchronous physics statecreation/destruction
- Unified/shared budget for AsyncLoading and Level Streaming
## Fast Stream Plugin
巫师四使用了这个插件。
# Physics Hitch
# Physics Hitches
## 优化你的物理
1. 使用Simple Physics
2. 手动关闭Complex Physics
@@ -32,43 +38,46 @@ obsidianUIMode: source
## 设置碰撞通道
1. 关闭不需要的Overlaps也就是关闭不需要Actor的Generate Overlap Events。
2. 设置Update Overlap Method During Level Streaming => 可以在ini或者PerActor中惊醒设置。
2. 设置Update Overlap Method During Level Streaming => OnlyUpdateMovable可以在ini或者PerActor中惊醒设置Actor里可以设置为`UseConfigDefault`)
ini位于`[/Script/Engine.Actor]`
## 减小物理场景大小
1. Chaos Visual Debugger
1. 物理调试工具:Chaos Visual Debugger
2. 使用物理代理
1.
3. 使用AsyncTraces
1. 1
1. 将多个物理物体替换一个简单物理代理。
3. 使用异步物理
1. 目前只能使用c++实现UE5.5实验性/5.7正式)。
2. 或者在下一帧执行traces。
3. 减少物理场景的大小或者复杂度使得traces更快。
4. 相关命令行
1. LevelStreaming.AllowIncrementalPreRegisterComponents = true
2. LevelStreaming.AllowIncrementalPreUnregisterComponents = true
3. p.Chaos.EnableAsyncInitBody = true
## 异步物理初始化
PS. 5.6 Chaos有若干提升。
# Actor Spawning Hitch
# Actor Spawning Hitches
1. 简化Actor
2. 限制Per Frame Spawn Num
3. **延迟初始化组件**
## Actor Pool
4. 构建Actor对象池重用Actor。
# PSO Compilation Hittches
1. Bundled PSO Cache
## PSO Precaching & Bundled PSO Cache
1. 5.3之后。默认开启Precacheing 5.6支持在LoadingScreen 中获取编译Shader进度。
2. 建议PSO Prechacing、Bundled PSO Cache 混用
## PSO Precaching
5.3 默认开启。
使用`-clearPSODriverCache`命令行来清理PSOCache也可以使用[PSOCacheBuster](https://github.com/Flassari/PSOCacheBuster)插件自动清理PSOCache。
使用`r.PSOPrecace.Validaion=2`通过日志来记录Miss情况
5.3之前你需要设置PSO Bundleed
5.3之后。默认开启Precacheing 5.6支持在LoadingScreen 过程中变异
建议PSO Prechacing Bundled PSO Cache 混用
## CMD
-clearPSODriverCache
r.psoprecache. 通过日志来记录Miss情况
# Garbage
##
obj list -countsort
# Garbage Collection Hitches
1. 减少UObject数量
1. StaticMeshActor可能成为一个痛点。
2. 使用WorldPartition或者关卡流送来加载角色附近的可见区域。
2. 使用`obj list -countsort`来查看所有的UObject。
1. 一般低于50w否者就需要去研究如果减少他们。
3. 如果短时间需要创建大量UObejct就得考虑使用对象池
4. 在LoaddingScreen/黑屏/屏幕冻结 情况下中执行GC操作。
# 同步载入卡
github flassari/CommonValidator
避免使用同步加载逻辑,可以使用下面的插件来检查项目中是否使用:
https://github.com/Flassari/CommonValidators

View File

@@ -9,8 +9,39 @@ destination:
share: false
obsidianUIMode: source
---
# Tips
- RaiseScriptError()蓝图节点
- Stat none清除所有Stat。
- [[#Dumpcvars]]
- [[#ABTest]]
- slomo慢动作调试细节。
- BugItGoBugItGo <坐标> <旋转> 相机就可以快速到达某地地点
- [[#UnrealInsight技巧]]
- 音频调试
- CommandLine
- au.Debug.SoundMixes
- au.DumpActiveSounds
- au.Debug.AudioMemReport
- AudioInsights
- RewindDebugger(Tool->Debug)
## RaiseScriptErrorUE5.6
该节点引发蓝图编译系统错误,可以让开发者更快发现逻辑问题。
## Dumpcvars
可以打印出当前所有CVar的数值。以及输入制定名字的CVar并且输出为CSV文件。
- dumpcvars
- - showhelp
- -deprecated
- -csv=XXX
## ABTest
快速切换比较CVars的效果。
abtest r.DynamicGlobalIlluminationMethod 0 1
## UnrealInsight技巧
- 勾选OpenInsightsAfterTrace记录完Trace后自动打开UnrealInsight。
- trace.snapshotfile生成Trace文件。
### RegionName
在UE编辑器中有一个RegionName与BeginRegion按钮可以用在记录Traces时添加时间段注释这段时间在做什么
#
## BuildGraph
-ListOnly
-Preprocess