Commit Graph

8 Commits

Author SHA1 Message Date
zach harris
c8c7fd62ec Various fixes and enhancements to the primitive debugger tool.
- Renamed the command to access the tool from DrawPrimitiveDebugger.Open to PrimitiveDebugger.Open
- Fixed access violations and crashes that occurred when opening and using the tool.
- Fixed issue where the debugger table would not populate until filter text was entered when using it in-game.
- Fixed an issue causing the server to crash if the console command cheat DrawPrimitiveDebugger.Open is used
- Added support for skeletal meshes and other primitives.
- Added a details panel for the currently selected row to declutter the table view and provide more in depth information such as the materials and textures used and the number of available LODs. The data displayed will refresh automatically and display the active location, LOD, and triangle count of the primitive.
- The details panel can force LOD levels, force disable nanite, display bounds, and show skeletal bones. Bounds and bone displays only work in development or debug builds.
- Note that any changes to primitives made by the debugger, as well as pinned and hidden entries, will be reset when the debugger is closed.
- Fixed communication between the game and render threads when handling frame captures.
- Enhanced search functionality. You can now search by primitive name, primitive class, actor name, actor class, material name, and texture used.

#rb daniele.vettorel
[FYI] elizabeth.bunner, nicolas.mercier, bryce.lumpkin
#tests FNTEST-128602

[CL 32064534 by zach harris in ue5-main branch]
2024-03-06 15:16:33 -05:00
dominic couture
8bc739dd3e This changelist contains various changes to allow the creation of FPrimitiveSceneProxy & FPrimtiveSceneInfos for meshes not associated with an AActor/UPrimitiveComponent pair. In other words, it's now possible to add primitives to FScene that aren't associated with AActors & UPrimitiveComponents. These are additional entry points, all existing code should continue to build & execute as is.
*Added FPrimitiveSceneDesc, a structure you can initialize with a description of the primitive you're trying to Add/Remove/Update in the FScene
-Added entry points in FSceneInterface to do those operations, legacy entry points using UPrimitiveComponent are untouched.
-The code that executes those operations in FScene has been refactored to be shared between the two entry points as much as possible to lessen the additional maintenance burden.


*Added FPrimitiveSceneProxyDesc/FStaticMeshSceneProxyDesc/FInstancedStaticMeshSceneProxyDesc, structures that hold all the necessary information to create a FPrimitiveSceneProxy/FStaticMeshSceneProxy/FInstancedStaticMeshSceneProxy without depending on AActors or UPrimitiveComponent.
-Those structures can be initialized by constructing them with the corresponding UPrimitiveComponents, or by constructing their default versions and initializing the desired fields.
-Creation code for FPrimitiveSceneProxy/FStaticMeshSceneProxy/FInstancedStaticMeshSceneProxy now takes all its info from those desc structures. They are created on demand during scene proxy creation for UPrimitiveComponents. This means no additional memory, and all serialized assets & blueprints are unaffected.


*Added IPrimitiveComponent/IStaticMeshComponent interfaces
-These allow for some editor-only interactions occurring during proxy creation, and serve as a common interface for some code that expected to manipulate UPrimitiveComponent/UStaticMeshComponents. For example FObjectCacheEventSink / FObjectCacheContext now uses those interfaces to associate the resources between various users and interactions like proxy recreation on shader/mesh changes occur through those interfaces.


* Misc
-Moved scene primitive related member variables into a new structure (FPrimitiveSceneInfoData) to facilitate code sharing and implementations of various related functionality (like SetLastRenderTime).
-Changed ObjectCacheContext to store associations between resources and components using component interfaces so that other systems creating proxies have the proper behaviors when resource changes require proxy recreation.
-Added natvis support so that component interfaces to UPrimitiveComponent/UStaticMeshComponent display the component ptr for easier debugging.
-Changed FMotionVectorSimulation to use UObject* instead of UPrimitiveComponent*, it was already using this internally
-Templatized some nanite helpers like ShouldCreateNaniteProxy & AuditMaterials since we need to use them from both UPrimitiveComponent & FPrimitiveSceneProxyDesc and it'll help make sure we keep them in sync.

#jira UE-191990

#rb Zach.Bethel, Ola.Olsson, Jason.Nadro, Krzysztof.Narkowicz

[CL 27200716 by dominic couture in ue5-main branch]
2023-08-18 09:26:39 -04:00
zach harris
a2ef851746 Fixing search bar material filtering functionality for DrawPrimitiveDebugger
#rb james.doverspike

[CL 23948404 by zach harris in ue5-main branch]
2023-02-01 10:34:19 -05:00
james doverspike
56933049cf Fix Unity compile missing headers in SDrawPrimitiveDebugger
[CL 21527194 by james doverspike in ue5-main branch]
2022-08-23 20:06:33 -04:00
ben zeigler
9bf327ac20 CIS Nonunity fix, not my code but I broke it at the same time
[CODEREVIEW] zach.harris
#rb none
#preflight none

[CL 21500007 by ben zeigler in ue5-main branch]
2022-08-22 21:25:18 -04:00
zach harris
acaecab963 Replacing monolithic header include from DrawPrimitiveDebugger slate implementation.
[CL 21499921 by zach harris in ue5-main branch]
2022-08-22 21:21:36 -04:00
zach harris
f39a5f42b6 Fixing missing header includes in DrawPrimitiveDebugger slate implementation.
[CL 21499917 by zach harris in ue5-main branch]
2022-08-22 21:21:22 -04:00
zach harris
bf34ebe040 Created a graphics debugging tool that can be used in the client to visualize draw call and primitive data. The tool can be opened with the command DrawPrimitiveDebugger.Open
[CL 21499897 by zach harris in ue5-main branch]
2022-08-22 21:20:36 -04:00