diff --git a/.obsidian/plugins/various-complements/histories.json b/.obsidian/plugins/various-complements/histories.json index 402f95b..c220bcc 100644 --- a/.obsidian/plugins/various-complements/histories.json +++ b/.obsidian/plugins/various-complements/histories.json @@ -1 +1 @@ -{"舒菁亲密付":{"舒菁亲密付":{"currentFile":{"count":1,"lastUpdated":1759419218049}}},"支付宝:支出":{"支付宝:支出":{"currentFile":{"count":1,"lastUpdated":1759419268158}}},"DESC:":{"DESC:":{"currentFile":{"count":1,"lastUpdated":1759830688208}}}} \ No newline at end of file +{"舒菁亲密付":{"舒菁亲密付":{"currentFile":{"count":1,"lastUpdated":1759419218049}}},"支付宝:支出":{"支付宝:支出":{"currentFile":{"count":1,"lastUpdated":1759419268158}}},"DESC:":{"DESC:":{"currentFile":{"count":1,"lastUpdated":1759830688208}}},"相关命令行":{"相关命令行":{"currentFile":{"count":1,"lastUpdated":1761555658044}}}} \ No newline at end of file diff --git a/02-Note/演讲与教程笔记/虚幻开放日2025/Hitch Hunter:排查逐帧瓶颈.md b/02-Note/演讲与教程笔记/虚幻开放日2025/Hitch Hunter:排查逐帧瓶颈.md index 3cc30fd..602790d 100644 --- a/02-Note/演讲与教程笔记/虚幻开放日2025/Hitch Hunter:排查逐帧瓶颈.md +++ b/02-Note/演讲与教程笔记/虚幻开放日2025/Hitch Hunter:排查逐帧瓶颈.md @@ -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 \ No newline at end of file +避免使用同步加载逻辑,可以使用下面的插件来检查项目中是否使用: +https://github.com/Flassari/CommonValidators \ No newline at end of file diff --git a/02-Note/演讲与教程笔记/虚幻开放日2025/超越PrintString:虚幻引擎调试工具极速巡览.md b/02-Note/演讲与教程笔记/虚幻开放日2025/超越PrintString:虚幻引擎调试工具极速巡览.md index c45ee4b..25fb225 100644 --- a/02-Note/演讲与教程笔记/虚幻开放日2025/超越PrintString:虚幻引擎调试工具极速巡览.md +++ b/02-Note/演讲与教程笔记/虚幻开放日2025/超越PrintString:虚幻引擎调试工具极速巡览.md @@ -9,8 +9,39 @@ destination: share: false obsidianUIMode: source --- +# Tips +- RaiseScriptError()蓝图节点 +- Stat none:清除所有Stat。 +- [[#Dumpcvars]] +- [[#ABTest]] +- slomo:慢动作调试细节。 +- BugItGo:BugItGo <坐标> <旋转> 相机就可以快速到达某地地点 +- [[#UnrealInsight技巧]] +- 音频调试 + - CommandLine + - au.Debug.SoundMixes + - au.DumpActiveSounds + - au.Debug.AudioMemReport + - AudioInsights +- RewindDebugger(Tool->Debug): +## RaiseScriptError(UE5.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