If the OpenXR implementation does not support the expected amount of overlays, we restrict our usage of native layers to face-locked quads. We leverage the existing stereo layer compositing functionality in FDefaultStereoLayers to emulate world/tracker locked layers by compositing them directly in the background projection layer.
There are implementations that _do_ support the compliant number of layers, but using runtime layers significantly affects performance. This initial infrastructure allows apps to offload some performance implications by having FOpenXRHMD do some of the layer compositing in-engine.
#jira UE-137550
#preflight 6345d3118d665d55d0f126ee
#rb Jeff.Fisher
[CL 22467669 by robert srinivasiah in ue5-main branch]
- Refactor XrPath manipulation using a new FOpenXRPath utility class
- Allow XrSpace to be queried from OpenXRHMD
- Rename Special motion sources to the body tracking roles
#jira UE-147549
#rb christopher.fiala
#preflight 6340a4182a0a2c1ead9dbf48
[CL 22411907 by Jules Blok in ue5-main branch]
Before:
3648 unity files
Total CPU Time: 47886.140625 s
Total time in Parallel executor: 498.81 seconds
After:
3548 unity files
Total CPU Time: 46643.828125 s
Total time in Parallel executor: 486.06 seconds
#jira
#preflight
[CL 22173263 by marc audy in ue5-main branch]
Core - Added support for assigning a TObjectPtr<T> to a TScriptInterface just like you'd expect from a raw Object*.
Actor - Making a version of GetComponents that will work for TObjectPtr collections. Additionally fixed several places in the engine where we're forcing the template parameter instead of allowing it to be determined automatically - which forced me to leave one of the GetComponent implementations, but I think we aught to remove it. e.g.
Don't Do
TArray<UPrimitiveComponent*> PrimComponents;
Actor->GetComponents<UPrimitiveComponent>(PrimComponents);
Do
TArray<UPrimitiveComponent*> PrimComponents;
Actor->GetComponents(PrimComponents);
Slate - Introducing support for collections of TObjectPtr<T>'s being used as source lists for the STableView.
#preflight 630f7af8e54ec9d581b03d65
[REVIEW] [at]Marc.Audy, [at]Steve.Robb, [at]Zousar.Shaker
[CL 21727328 by nick darnell in ue5-main branch]
* Add Start XR Session blueprint node that allows changing the PMIC at runtime
* Make the controller action set persistent to reduce complexity
* Move interaction profile array to a local member used to build suggested bindings
#rb Jeff.Fisher
#preflight 6307da781615ec0db5291960
[CL 21571762 by Jules Blok in ue5-main branch]
The OpenXR plugin now adjusts the stereo render targets based on vr.pixeldensity
* AdjustViewRect respects PixelDensity, plus quantizes in order to match RenderTarget size in renderer logic (prevents upscale in MobileShadingRenderer)
* Override CalculateRenderTargetSize - previously, FOpenXRHMD was using the default implementation from FXRRenderTargetManager.
However, it doesn't care about the per-view quanitization utilized by AdjustViewRect. Instead of modifying the shared implementation,
we can provide a customized OpenXR version that shares logic with AdjustViewRect
* Allocate the depth texture at color alloc time - Because of the location of where IStereoRenderTargetManager::AllocateDepthTexture is called (scene texture creation time),
it's too late for us to acquire the swapchain because it is called _after_ OnBeginRendering_RenderThread. This means we would use janky logic to acquire the swapchain after
the frame has started. Instead, since we know if we're going to use depth at session time, and the parameters should be 'known', we can just allocate depth alongside color.
Then the interface `AllocateDepthTexture` call is a validator + getter. In the future, we could rename some of these interfaces.
* Update layer/swapchain state in PostRenderViewFamily_RenderThread - we only need this state updated for frame end, so we can update it just-in-time. This actually happens
'early' becase we enqueue directly onto GraphBuilder.RHICmdList. In the future, we could schedule a task onto GraphBuilder.
#rb Jules.Blok
#jira UE-131060
#preflight 62f3fff7466f8c150dba2286
[CL 21324195 by robert srinivasiah in ue5-main branch]
-Adding features related to play area bounds to OpenXR.
-New Blueprint to get the bounds and their origin in UE world space.
-New Delegate to respond to play area updates.
#jira UE-150888 UE-129957
#rb Robert.Srinivasiah
#preflight 62d5c8cdd54af4b9a23bf1ad
#ROBOMERGE-OWNER: jeff.fisher
#ROBOMERGE-AUTHOR: jeff.fisher
#ROBOMERGE-SOURCE: CL 21152966 in //UE5/Main/... via CL 21154942
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)
[CL 21181575 by jeff fisher in ue5-main branch]
Headers are updated to contain any missing #includes needed to compile and #includes are sorted. Nothing is removed.
#ushell-cherrypick of 21065896 by bryan.sefcik
#preflight 62d4b1a5a6141b6adfb0c892
#jira
#ROBOMERGE-OWNER: Bryan.sefcik
#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21150156 via CL 21151754 via CL 21154719
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)
#ROBOMERGE-CONFLICT from-shelf
[CL 21181076 by Bryan sefcik in ue5-main branch]
-Adding features related to play area bounds to OpenXR.
-New Blueprint to get the bounds and their origin in UE world space.
-New Delegate to respond to play area updates.
#jira UE-150888 UE-129957
#review-21074650
#rb Robert.Srinivasiah
#preflight 62d5c8cdd54af4b9a23bf1ad
[CL 21152966 by Jeff Fisher in ue5-main branch]
In the scenario where we have an atlased stereo texture, we need to make sure each half
of the texture is aligned by 8 (new Strata requirement). We can do this by manually quantizing
the texture after applying pixel density.
#jira UE-131060
#rb Jules.Blok Arciel.Rekman
#preflight 62cd99da8e451a65136f8232
[CL 21057719 by robert srinivasiah in ue5-main branch]
- Ported remaining ISceneViewExtension calls to RDG.
- Removed several empty override passes being added to the graph.
- Merged two graphs into one.
#preflight 62c4c61a2a05d4f55bd5912f
#rb luke.thatcher
[CL 20971717 by zach bethel in ue5-main branch]
-Added PrimaryPIEClientIndex setting to Editor Preferences->Level Editor->Play->Multiplayer Options->Client.
-Defaults to 0 which is the first pie client window (which means it could be the server in listen-server mode where the first window is both the server and a client). -1 means no primary at all. If it is larger than the number of indices we primary the last client. Other negative settings are disallowed by the UI, but would also result in no primary.
-In VRPreview the primary client will track the hmd, render in stereo, etc. The primary client's window size and position are also handled slightly differently.
-This could be hooked up to more things fairly easily. VR provides a number of examples of how to do it, because it is a fairly extensive feature. Much of the time the bool cached in the WorldContext is the best option.
#jira UE-153947
#review-20351483
#rb Robert.Srinivasiah Ben.Zeigler
#preflight 62b63499466962cd9a367bf6
[CL 20817989 by Jeff Fisher in ue5-main branch]
This change consists of multiple changes:
Core:
- Deprecation of ANY_PACKAGE macro. Added ANY_PACKAGE_DEPRECATED macro which can still be used for backwards compatibility purposes (only used in CoreUObject)
- Deprecation of StaticFindObjectFast* functions that take bAnyPackage parameter
- Added UStruct::GetStructPathName function that returns FTopLevelAssetPath representing the path name (package + object FName, super quick compared to UObject::GetPathName) + wrapper UClass::GetClassPathName to make it look better when used with UClasses
- Added (Static)FindFirstObject* functions that find a first object given its Name (no Outer). These functions are used in places I consider valid to do global UObject (UClass) lookups like parsing command line parameters / checking for unique object names
- Added static UClass::TryFindType function which serves a similar purpose as FindFirstObject however it's going to throw a warning (with a callstack / maybe ensure in the future?) if short class name is provided. This function is used in places that used to use short class names but now should have been converted to use path names to catch any potential regressions and or edge cases I missed.
- Added static UClass::TryConvertShortNameToPathName utility function
- Added static UClass::TryFixShortClassNameExportPath utility function
- Object text export paths will now also include class path (Texture2D'/Game/Textures/Grass.Grass' -> /Script/Engine.Texture2D'/Game/Textures/Grass.Grass')
- All places that manually generated object export paths for objects will now use FObjectPropertyBase::GetExportPath
- Added a new startup test that checks for short type names in UClass/FProperty MetaData values
AssetRegistry:
- Deprecated any member variables (FAssetData / FARFilter) or functions that use FNames to represent class names and replaced them with FTopLevelAssetPath
- Added new member variables and new function overloads that use FTopLevelAssetPath to represent class names
- This also applies to a few other modules' APIs to match AssetRegistry changes
Everything else:
- Updated code that used ANY_PACKAGE (depending on the use case) to use FindObject(nullptr, PathToObject), UClass::TryFindType (used when path name is expected, warns if it's a short name) or FindFirstObject (usually for finding types based on user input but there's been a few legitimate use cases not related to user input)
- Updated code that used AssetRegistry API to use FTopLevelAssetPaths and USomeClass::StaticClass()->GetClassPathName() instead of GetFName()
- Updated meta data and hardcoded FindObject(ANY_PACKAGE, "EEnumNameOrClassName") calls to use path names
#jira UE-99463
#rb many.people
[FYI] Marcus.Wassmer
#preflight 629248ec2256738f75de9b32
#codereviewnumbers 20320742, 20320791, 20320799, 20320756, 20320809, 20320830, 20320840, 20320846, 20320851, 20320863, 20320780, 20320765, 20320876, 20320786
#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20430220 via CL 20433854 via CL 20435474 via CL 20435484
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)
[CL 20448496 by robert manuszewski in ue5-main branch]
-Previous code said that the first PIE world was allowed to track the HMD. However sometimes the first PIE world is a dedicated server. Now the first non-dedicated-server PIE world gets HMD tracking.
-This fix is a bit ugly to fit with hotfix rules. I think it would be better to cache this value somewhere, but didn't see anywhere that was not a public header.
#jira UE-147360
[REVIEW]
#rb Arciel.Rekman
#preflight none
#ROBOMERGE-AUTHOR: jeff.fisher
#ROBOMERGE-SOURCE: CL 19929072 in //UE5/Release-5.0/... via CL 19930613
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
[CL 19932812 by jeff fisher in ue5-main branch]
-Thread safety of Modular Features has been improved and we were hitting ensures in the render thread update of motion controllers.
-Now we are caching the IMotionController that is used for the game thread update and only attempting to use that one for the render thread update. We are also watching for unregistered modules to null out cached IMotionControllers as necessary (this is unlikely, but if it happened it would be very bad).
#review-19473653
#rb Robert.Srinivasiah
#preflight 6255a4af3f5641db59f763ae
[CL 19723508 by Jeff Fisher in ue5-main branch]
-We started hitting some game thread asserts because the timing of render thread destruction/creation for VRPreview changed such that some code that used to run while the RenderThread did not exist, and thus ran on the game thread, now runs on the render thread.
-Changed CalculateRenderTargetSize assert so that it tolerates Game or Rendering thread. The HMD methods that it calls are already pipelined on some platforms. Fixing others. Ignoring some that are on their way out.
#review-19563892
#rb robert.srinivasiah
#jira UE-147503
#preflight 6245ce0dc51908059abd9103
[CL 19573899 by Jeff Fisher in ue5-main branch]