Commit Graph

57 Commits

Author SHA1 Message Date
jimmy andrews
f82bec6181 remove various deprecated methods from modeling components code
#rb jimmy.andrews

[CL 31501927 by jimmy andrews in ue5-main branch]
2024-02-14 19:10:11 -05:00
steve robb
f029468598 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30729174 by steve robb in ue5-main branch]
2024-01-19 16:41:35 -05:00
matija kecman
83e552908e BakeRC: Fix bug where the Opacity channel was not rebaked when a setting invalidating all baked textures was changed
#rb jimmy.andrews

[CL 29230280 by matija kecman in ue5-main branch]
2023-10-30 08:27:50 -04:00
matija kecman
a1bbb38703 FWorldRenderCapture: Consolidate Emissive render capture code path with the other buffer visualization code paths
#rb sebastien.lussier

[CL 29177106 by matija kecman in ue5-main branch]
2023-10-27 05:36:48 -04:00
matija kecman
a98eba83ca Fix horde issue 383964
#horde 383964

[CL 28957977 by matija kecman in ue5-main branch]
2023-10-20 05:30:17 -04:00
matija kecman
afae44812a FWorldRenderCapture: Remove unecessary caching of view matrices
#rb Sebastien.Lussier

[CL 28912140 by matija kecman in ue5-main branch]
2023-10-19 06:11:19 -04:00
matija kecman
75d644e16a FWorldRenderCapture: Improve performance of pixel format conversions
#rb Sebastien.Lussier

[CL 28873656 by matija kecman in ue5-main branch]
2023-10-18 07:11:56 -04:00
matija kecman
8d8feb7a0a WorldRenderCapture: Refactoring to clarify the code and make it easier to rearrange for performance optimization experiments
#rnx
#rb Sebastien.Lussier, Jimmy.Andrews

[CL 28661302 by matija kecman in ue5-main branch]
2023-10-11 09:21:11 -04:00
matija kecman
dbef50a389 Render Capture Baking: Add ability to explicity specify the render capture cameras to use in the BakeRC Geometry Script node
#jira UE-194912
#rb Jimmy.Andrews

[CL 28183016 by matija kecman in ue5-main branch]
2023-09-25 06:44:24 -04:00
matija kecman
26cd8cea5a Remove CacheShadersForMaterial call in FWorldRenderCapture
#rb Sebastien.Lussier

[CL 28182163 by matija kecman in ue5-main branch]
2023-09-25 05:36:38 -04:00
sebastien lussier
c344fbeb86 Approximate Actors - Fix ensure() caused by empty scene representation
* Return an error if no valid input was provided
#rb jimmy.andrews, lonnie.li

[CL 27845860 by sebastien lussier in ue5-main branch]
2023-09-13 15:43:42 -04:00
sebastien lussier
3668334a65 WorldRenderCapture - Renamed CVarModelingWorldRenderCaptureVTWarmupFrames to CVarModelingWorldRenderCaptureWarmupFrames
* Warmup is not specific to VT, but also of use for Nanite
#rb matija.recman

[CL 27831331 by sebastien lussier in ue5-main branch]
2023-09-13 10:48:23 -04:00
sebastien lussier
b0d4418ed2 WorldRenderCapture - Modified capture to use default time (0) and set realtime update off on the view family context
* Makes it clear that the capture isn't using a realtime view, and prevent materials relying on Time from giving different results based on the time elapsed since the app start
#rb matija.kecman

[CL 27830514 by sebastien lussier in ue5-main branch]
2023-09-13 10:28:02 -04:00
matija kecman
fccb4f9aff Scene sampling using a Render Capture approach
#rb jimmy.andrews
#jira UE-193152,UE-194653

[CL 27637471 by matija kecman in ue5-main branch]
2023-09-06 11:39:40 -04:00
sebastien lussier
9ba039e68e Approximate Actors - Allow approximate actors to use an array of components as input, rather than only actors
#rb patrick.enfedaque

[CL 27597062 by sebastien lussier in ue5-main branch]
2023-09-05 11:04:59 -04:00
sebastien lussier
825738d91d MeshModelingToolset - Render Capture: Use of the fallback material could be captured in some cases, as the first render could potentially trigger shader(s) compilation.
* After the render, test if there are assets pending compilation. If so, wait for compilation to complete and restart the scene capture.
#rb matija.kecman, ryan.schmidt

[CL 27593647 by sebastien lussier in ue5-main branch]
2023-09-05 08:42:15 -04: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
matija kecman
d9a8710948 Fix ensure in BakeRC tool which occured when disabling a capture channel after cancelling a previous scene capture
#rb lonnie.li
#jira UE-191193

[CL 26611051 by matija kecman in ue5-main branch]
2023-07-26 12:38:53 -04:00
matija kecman
e4e99966ed Fix horde issue 337708 related to text conflicts in LOCTEXT
#rb trivial
#horde 337708

[CL 26601159 by matija kecman in ue5-main branch]
2023-07-26 04:49:50 -04:00
matija kecman
00ca171680 Fix crashes in BakeRC tool, improved the scene capture progress bar, improved and simplified the scene capture cancellation behavior
* Fixed a crash that occurred in the baking step when cancelling a scene capture which was triggered by changing an option which invalidated all photo sets (i.e., render capture resolution or capture anti aliasing). This was occurring because the baking step proceeded after the scene capture cancellation and the needed photosets were empty.

* Fixed a crash which can happen if you have no channel enabled, change cleanup tolerance from 0 to 1 and then enable the BaseColor channel. This was fixed by changing the behavior of the Cleanup Threshold property, if its positive the DeviceDepth capture is enabled and its disabled otherwise, previously we also required that another channel was enabled which led to the crash in the baking step. The new semantics are easier to understand in the code and and is probably an improvement to the UX as well since the Cleanup Threshold property behavior does not depend on other properties.

* Improved the scene capture cancellation: Users can now cancel the scene capture when the tool is starting up which is better UX since if they picked slow settings they don't intend to reuse, the capture can be cancelled, also, the code is simpler. Changed the behavior of the BakeRC tool properties so that after cancellation the completed captures with the desired settings are enabled. The old behavior where cancellation was documented to restore old results was broken and cannot be made to work unless we store the old results in a separate scene capture but for high capture resolutions that would require a lot of memory. When the SceneCapture is cancelled the channels which were pending and didn't complete are logged in the Output Log in case the user forgets which ones were enabled.

* Simplified the code in various places: Added `operator[](ERenderCaptureType)` to structs with per-capture data, and use it to simplify many places where we previously checked channels individually. Added conversion functions from tool properties/geometry script parameters to the render capture parameters. Removed old confusing logic that determined if a capture had been updated by tracking the number of photos in each photoset with a new system based on a new per-capture pending state. Deprecated a bunch of functions which are no longer useful or which used the wrong types (e.g., `FRenderCaptureUpdate` was added because I hadn't noticed `FRenderCaptureTypeFlags`). Changed the defaults in `FSceneCapturePhotoSet` so that the DeviceDepth capture is off, its an advanced feature and the defaults are intended to make the class friendly to new developers

#rb lonnie.li

[CL 26569987 by matija kecman in ue5-main branch]
2023-07-25 08:46:23 -04:00
michael balzer
178a17d074 Fix access to render LOD0 in editor
#preflight 641cfd93973e609670965d20

[CL 24780771 by michael balzer in ue5-main branch]
2023-03-24 12:15:06 -04:00
sebastien lussier
f222818298 Use the new FBoxSphereBounds::Builder to clean other initialization of FBoxSphereBounds
* Those where correct, but did manual job to ensure the origin wasn't automatically included in the bounds
#rb jeanfrancois.dube, patrick.enfedaque

[CL 24739720 by sebastien lussier in ue5-main branch]
2023-03-21 17:09:36 -04:00
matija kecman
f05215f1c5 Render Capture Baking: Fix a crash which occurred because the SceneCapture state was not properly updated when its computation was cancelled
#jira UE-175047
#preflight 63d94591f626715201e45242

[CL 23933594 by matija kecman in ue5-main branch]
2023-01-31 14:12:46 -05:00
matija kecman
346ead8222 Render Capture Baking: Refactor how the scene capture and baking steps are managed to fix a crash when scene capture parameters changed and implement other improvements
The crash that was fixed occured when, for example, the userturned off a capture channel while the baking background compute was running
The refactoring has enabled the tool to only bake the newly captured channels only, previously when the scene capture was incrementally updated all pre-existing channels were baked again
The refactoring should enable us to more easily support a feature where the user toggles capture directions or adds new ones manually


#preflight 63c02c46345a532dfc273e6a
#rb lonnie.li
#rnx

[CL 23663959 by matija kecman in ue5-main branch]
2023-01-12 11:09:29 -05:00
matija kecman
802bf3bdfd Render Capture Baking: Add SubsurfaceColor and Opacity channels
#jira FORT-509766
#rb lonnie.li
#preflight 63b5fbd6202bee5e272b66c3

[CL 23585842 by matija kecman in ue5-main branch]
2023-01-05 05:19:44 -05:00