Commit Graph

20 Commits

Author SHA1 Message Date
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
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
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
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
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
matija kecman
3741003f3b RenderCaptureBaking: Improve performance when adding/removing capture channels
- When adding a new channel: Only the newly requested channel is captured, previously all enabled channels were (re)captured
- When removing an already captured channel: We no longer recompute all remaining channels, we just wipe the one that was removed


#rnx
#rb ryan.schmidt
#preflight 6372120fbf76990b71f17750

[CL 23115901 by matija kecman in ue5-main branch]
2022-11-14 05:09:53 -05:00
matija kecman
f4900ae7a1 Render Capture Baking: Use depth capture to eliminate occlusion artefacts which can appear when baking non-convex shapes and look like weird sihouettes/blotches in the base color channel
Also removed artefacts that became visible after the ones fixible with a depth test were resolved. These were related to linearly interpolating data on the photosets, this was fixed since the baking framework is where texture filtering should take place

#rnx
#rb lonnie.li, ryan.schmidt
#jira none
#preflight 62d473b0dc4397d384a06bc8

[CL 21148985 by matija kecman in ue5-main branch]
2022-07-18 11:21:15 -04:00
matija kecman
c128de6a9a Fix Editor Mac which broke in Horde Issue #180297: Compile errors in Module.ModelingComponents.cpp and SceneCapturePhotoSet.cpp
#rnx
#rb jimmy.andrews
#jira none
#preflight 62a7511aaf7ad033effcec61
#preflight 62a7511aaf7ad033effcec61

[CL 20627748 by matija kecman in ue5-main branch]
2022-06-13 11:19:07 -04:00
matija kecman
6f80932e2b Render Capture Baking: Add messages warning users about missing tangents or UVs
#rnx
#rb lonnie.li
#jira none
#preflight 62a72d695a44fbc402908e21

[CL 20626847 by matija kecman in ue5-main branch]
2022-06-13 10:27:34 -04:00
Ryan Schmidt
bc8042333e Add additional capture locations to FSceneCapturePhotoSet::AddStandardExteriorCapturesFromBoundingBox(), on upper and side box edge midpoints. Enable by default in Approximate Actors and BakeRenderCaptureTool.
#rb jimmy.andrews
#preflight 62a11612e820a589df5e36dd
#fyi matija.kecman

[CL 20570945 by Ryan Schmidt in ue5-main branch]
2022-06-08 23:39:09 -04:00
matija kecman
c0efeb5f4f Render Capture Baking: Add FScopedSlowTask to give user progress feedback on game thread scene capture
#rb lonnie.li
#rnx
#jira none
#preflight 62822298046b81bf9399584e

[CL 20221812 by matija kecman in ue5-main branch]
2022-05-16 06:50:35 -04:00
matija kecman
b47e74f1a8 Render Capture Baking: Move visibility raycast from evaluators to detail sampler
Benchmark configuration:
- Test scene with 4 meshes: a mossy stone nanite mesh, a beach ball, a ball with an emissive blue cross and a hut mesh
- Target mesh: 11.8k triangles mesh, created by voxel wrapping the meshes in the test scene elements
- 4096x4096 output texture with 16x multisampling baking BaseColor, Emissive, PackedMRS and Normal maps
- 4096x4096 photo capture resolution

Unreal Insights reports the following times for the Bake call:
- Before this change: 2 mins 45 seconds
- After this change: 55.9 seconds

Aside: (Unaffected by this change) In both cases the photo capture, which is done on the game thread, took about 1 min

#jira none
#rb
#rnx
#preflight 627e64e01748fbc85bb24a42

[CL 20221383 by matija kecman in ue5-main branch]
2022-05-16 05:13:25 -04:00
matija kecman
929525effb Render Capture Baking: Support correspondence sample validity checking, use BSpline filtering and enable multisampling
#rb lonnie.li
#rnx
#jira none
#preflight 6262d4dbd558dfdec3934905

[CL 19899614 by matija kecman in ue5-main branch]
2022-04-25 05:41:52 -04:00
michael balzer
a49c74b915 MeshModelingToolset: Move ModelingOperators and ModelingOperatorsEditorOnly modules out of experimental plugin
#jira UETOOL-3823
#rb lonnie.li
#preflight 617b1aea5794a500014f544a

#ROBOMERGE-AUTHOR: michael.balzer
#ROBOMERGE-SOURCE: CL 17972239 in //UE5/Release-5.0/... via CL 17972248
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17972256 by michael balzer in ue5-release-engine-test branch]
2021-10-28 19:47:45 -04:00