Files
UnrealEngineUWP/Engine/Source/Runtime/HeadMountedDisplay/Private/HeadMountedDisplayModule.cpp

49 lines
1.1 KiB
C++
Raw Normal View History

// Copyright Epic Games, Inc. All Rights Reserved.
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3209340 on 2016/11/23 by Ben.Marsh Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h. Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms. * Every header now includes everything it needs to compile. * There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first. * There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h. * Every .cpp file includes its matching .h file first. * This helps validate that each header is including everything it needs to compile. * No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more. * You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there. * There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible. * No engine code explicitly includes a precompiled header any more. * We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies. * PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files. Tool used to generate this transform is at Engine\Source\Programs\IncludeTool. [CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
#include "CoreMinimal.h"
#include "HAL/IConsoleManager.h"
#include "Misc/App.h"
#include "Modules/ModuleManager.h"
#include "Templates/Casts.h"
#include "EngineGlobals.h"
#include "PrimitiveSceneProxy.h"
#include "Components/PrimitiveComponent.h"
#include "Engine/Engine.h"
#include "IHeadMountedDisplayModule.h"
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3512802) #lockdown Nick.Penwarden #rb no.one ===================================== MAJOR FEATURES + CHANGES ===================================== Change 3060975 by Ryan.Vance Integrating 3058175 from Oculus Change 3466079 by Nick.Atamas Added rudimentary collision support to MrMesh. Change 3468111 by Mike.Beach Give the SceneRender component's scene view a specific ViewActor (the component's owner). This lets us set bOnlyOwnerSee on components belonging to the same actor, and have it only showup in the render scene view. Change 3468267 by Nick.Atamas Now using non-interleaved data in MRMeshComponent Change 3468475 by Mike.Beach Initial checkin for new mixed reality plugin (WIP). New MixedReality capture component, intended to mimic a real world camera. Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) #jira UEVR-795, UEVR-789 Change 3468483 by Mike.Beach Marking the new MixedReality plugin as experimental (as it is incomplete and a WIP) Change 3468511 by Mike.Beach CIS fixes for fallout from CL 3468475. Change 3469754 by Mike.Beach CIS compiler error fixes (fallout from CL 3468475). Change 3470407 by Mike.Beach *sigh* more CIS fixes (fallout from 3468475) Change 3471494 by Douglas.Copeland Test content for GearVR Stereo Layers Change 3476135 by Jeff.Fisher UE-45661 Duplicate .so files in GoogleVR. -We want the version of each file from the android_x86 style folder, but in the android\x86 folder, and the APL.xml file needed to reference the new path rather than the old path. -This fix was also made in Release-4.16 for 4.16.2 in cl 3476133. #jira UE-45661 #review-3474770 Change 3480446 by Dustin.Holmes Added support for Vive Tracker. #jira UEVR-792 Change 3480552 by Dustin.Holmes Added map and gamemode for calibration #jira UEVR-808 Change 3483325 by Nick.Atamas Merging //UE4/Partner-Google-VR to Dev-VR (//UE4/Dev-VR) Known issue with Mac build packaging. Change 3485969 by Nick.Atamas Fixed double-spacing and formatting issues. Converted TangoEcefUtils.cpp to follow Epic coding standards. Change 3486071 by Nick.Atamas Rename/move file(s) from Plugins/Runtime/Tango/... to Plugins/Runtime/GoogleTango/... Change 3486078 by Nick.Atamas Fixed non-portable (wrong case) include path. Change 3486906 by Jeff.Fisher Fixing build warning about a variable being shadowed. Change 3487245 by Jeff.Fisher Fixing build break in some template source files from HeadMountedDisplayFunctionLibrary move. Change 3487827 by Nick.Atamas Fixing the missing platforms header; should resolve CIS warning. Change 3488808 by Keli.Hlodversson Fix vr.Debug.VisualizeTrackingSensors when ViewTarget->HasActiveCameraComponent() is true. Also switched to use GWorld instead of passing in the current World argument to the handler as the world pointer can change for instance if turning the setting on and loading another level in the editor. #jira UE-45949 Change 3490841 by Nick.Atamas Fixing more CIS and coding standard issues related to Tango. Change 3491038 by Nick.Atamas Modified GoogleInstantPreview.Build.cs to use RuntimeDependencies instead of explicit dylib/dll copying. Change 3492481 by Jeff.Fisher Fixing HeadMountedDisplayTypes.h shadowed member warning. Change 3495157 by Mike.Beach New XR modular feature - XRDeviceAssets. Intended to give us access to device models so we can render arbitrary devices. Implements this for SteamVR. #jira UEVR-829 Change 3495205 by Mike.Beach CIS fix (fallout from 3495157) - missing leading 'template<>' for template specializations. Change 3495213 by Mike.Beach Fixing the vr.SpectatorScreenMode CVar so that it's sink function doesn't override other CVar commands that set the mode themselves. #jira UEVR-790 Change 3495403 by Nick.Atamas - Disabled Google Tango support for Win32. - Disabled GoogleInstantPreview files being erroneously included while building game; it is only used by Editor. - Renamed Tango.uplugin -> GoogleTango.uplugin - Fixed self-assignment in TangoImageComponent.cpp Change 3496225 by Mike.Beach Fixing CIS compiler error for non-editor builds (fallout from CL 3495157). Change 3496981 by Nick.Atamas GoogleInstantPreview libraries are now checked into Binaries/ThirdParty/... so that no copying from .Build.cs is necessary. Change 3497033 by Nick.Atamas Going back from GoogleTango/ to Tango/. It's a bigger change that previously thought. Change 3498487 by Nick.Whiting Adding option to PIE settings to NOT minimize editor when doing VR PIE Change 3499242 by Dustin.Holmes Fixed static analysis warning by updating the number of devices that can have their button states tracked. Change 3499341 by Nick.Atamas Hopefully fixes Mac Editor CIS. Change 3499395 by Arciel.Rekman Copying //UE4/Partner-Valve@3499365 to Dev-VR (//UE4/Dev-VR) Change 3499550 by Ryan.Vance Fixing compile issue. Change 3499678 by Nick.Atamas - Dummy Mesh Reconsturctor now sometimes generates empty blocks to test more scenarios. - Removed unused code in DummyMeshReconstructorModule - Removed unused variable in GoogleInstantPreview.Build.cs Change 3499840 by Nick.Atamas std::string needed by google's online system. Change 3499889 by Nick.Atamas Fixed static code analysis CIS fails. Change 3500007 by Nick.Whiting Removing Vulkan RHI dependency on a plugin, refactoring it to use an interface to check to break the dependency Change 3500027 by Nick.Whiting Fixing missing include file in SteamAudio Change 3500030 by Nick.Whiting Changing cast from reinterp to static. Copypasta fail Change 3500078 by Nick.Whiting Speculative fix for the builder for an error that doesn't repro locally Change 3500086 by Nick.Atamas More build fixups. Change 3500096 by Nick.Atamas Copying //UE4/Partner-Google-VR-Minimal at CL3499964 to Dev-VR (//UE4/Dev-VR) Change 3500107 by Nick.Atamas Does this fix CIS? Change 3500121 by Nick.Atamas More CIS fixing, hopefully. Change 3500129 by Nick.Atamas More CIS fixing. Change 3500713 by Nick.Whiting Fix for Win32 build break Change 3500887 by Arciel.Rekman Fixed copyright notices and compilation errors in Steam Audio. (Edigrating CL 3500131) Change 3501010 by Arciel.Rekman Fix shadowing error. Change 3501230 by Nick.Atamas Make warning go away. Change 3501890 by Nick.Atamas Moving Tango->GoogleTango. Fixup pass in next CL. Change 3501900 by Jeff.Fisher UE-46265 Crash attempting to Play in VR -Need to call UpdateSpectatorScreenMode_RenderThread in PreRenderViewFamily_RenderThread so that the mode is set before other renderthread work decides what to do based on the mode. #review-3501882 #jira UE-46256 Change 3502152 by Nick.Whiting Oculus Unified Plugin. OculusHMD plugin now supports both the Rift and the GearVR in one plugin. Minor supporting engine modifications included Change 3502199 by Nick.Atamas Checking in TangoQA project with fixed-up content to point at GoogleTango plugin. Known issue: crash when building cooking collision for bricks with no triangles. Change 3502215 by Nick.Atamas Fixed UIScale curve. Change 3502253 by Nick.Whiting Trying to fix up p4's botch of the merge Change 3502930 by Mike.Beach Attempt to fix build errors (fallout from CL 3502873), using new (moved/renamed) PhysX cook util struct. Change 3503559 by Jeff.Fisher UE-46300 Editor process crashes when opening with Oculus HMD plugged in -Reimplementing spectator screen for updated oculus plugin. #jira UE-46300 #review-3503455 Change 3503685 by Jeff.Fisher TM-SpectatorScreen -made the scene capture component follow the camera orientation so i can make it look at different stuff. Change 3503695 by Nick.Whiting Fixes for build breaks Change 3503819 by Jeff.Fisher TM-SpectatorScreen -Adjusted scene capture and render target to get approximately correct color in the spectator screen. Change 3503852 by Nick.Atamas - Fixed crash when sending a brick with 0 data. - Added implementation to ClearAllBricks. Change 3503947 by Ryan.Vance Fixing overspecified method definitions. Change 3505242 by Douglas.Copeland Added gamepad inputs to SpectatorScreen Level BP for more efficient test setup Change 3505307 by Douglas.Copeland Re-saving Emmissive_Blue Material to resolve map warning Change 3505704 by Ryan.Vance We can't pass a nullptr into RenderTexture_RenderThread. Instead of checking for a mirror window here, the RenderTexture_RenderThread implementation should do the right thing. Jeff's mirrorwindow/socialscreen refactoring should handle this correctly now. Change 3505914 by Jeff.Fisher UE-46370 Ensure handled when restarting Editor after disabling Oculus plugin -remove scaling from the pose if necessary. It appears that when running oculus rift through steamvr the tracking reference comes through at .99 scale. We can't build a quat out of it unless it is normalized. #jira UE-46370 #review-3505892 Change 3506650 by Jack.Porter External Texture fixes changes from Dev-Sequencer - fix ENGINE_API meaning singletons were existing in each module - fix crash releasing an External RHITexture resource. - Recache uniform expressions when external textures are registered and unregistered Change 3506653 by Jack.Porter Remove external texture logging that was accidentally enabled. Change 3507043 by Mike.Beach Fixing CIS content errors (copied material still referencing assets from a separate plugin) - redid the material. Change 3507231 by Ryan.Vance #jira UE-46426 Fail preinit on gearvr if bPackageForGearVR is false Change 3507822 by Jeff.Fisher UE-46445 Player can't move through level by holding one grip button in Editor VR Mode -We were passing worldscalefactor, rather than worldscale into the get controller position function. WorldScaleFactor is worldscale / 100, making it a unitless multiplier of the world scale. So a *magical* 100 needs to be multipled back in here. Oculus must have found that and fixed it, looks like it was broken for 4.16. #jira UE-46445 Change 3508167 by Jeff.Fisher Fixing CheckSlow at startup on Oculus. The head pose orientation was being initialized to zero rather than identity, which isn't so useful. Change 3509622 by Jeff.Fisher Adding commented out null check to commented out implementation of ShouldDisableHiddenAndVisibileAreaMeshForSpectatorScreen_RenderThread. Change 3509983 by Jeff.Fisher Fixing vr.MirrorMode alias to vr.SpectatorScreenMode -was trying to use a cvar that no longer exists Change 3510188 by Ryan.Vance #jira UE-46454 We need to set the render target before applying cached render targets. Change 3510231 by Mike.Beach Setting up redirects for the plugin, since it was renamed from "OculusLibrary" to "OculusHMD" - ensuring that projects don't loose references in Blueprints, etc. #jira UE-46462 Change 3510253 by Ryan.Vance #jira UE-46452 We need to execute the clear before seting up shader state for the copy. Change 3511627 by Mike.Beach Correcting some CIS warnings - Updating misc. GetWorldFromContextObject() calls since the old signature was deprecated by the latest Framework integration. Change 3511984 by Mike.Beach Fixing fallout from integration with Main (CL 3511845)... common shader file renamed (to .ush instead of .usf). Change 3512797 by Mike.Beach Static analysis fix - making doubly sure that we're not indexing into out of bounds memory. Change 3512802 by Mike.Beach Only warning about the OculusHMD module being unavailable when it isn't loaded (otherwise, we were extraneously warning when users didn't have a rift). #jira UE-46575 DONE! [CL 3512933 by Mike Beach in Main branch]
2017-06-27 23:02:31 -04:00
#include "IHeadMountedDisplayVulkanExtensions.h"
Copying //UE4/Dev-Build to //UE4/Dev-Main (Source: //UE4/Dev-Build @ 3209340) #lockdown Nick.Penwarden #rb none ========================== MAJOR FEATURES + CHANGES ========================== Change 3209340 on 2016/11/23 by Ben.Marsh Convert UE4 codebase to an "include what you use" model - where every header just includes the dependencies it needs, rather than every source file including large monolithic headers like Engine.h and UnrealEd.h. Measured full rebuild times around 2x faster using XGE on Windows, and improvements of 25% or more for incremental builds and full rebuilds on most other platforms. * Every header now includes everything it needs to compile. * There's a CoreMinimal.h header that gets you a set of ubiquitous types from Core (eg. FString, FName, TArray, FVector, etc...). Most headers now include this first. * There's a CoreTypes.h header that sets up primitive UE4 types and build macros (int32, PLATFORM_WIN64, etc...). All headers in Core include this first, as does CoreMinimal.h. * Every .cpp file includes its matching .h file first. * This helps validate that each header is including everything it needs to compile. * No engine code includes a monolithic header such as Engine.h or UnrealEd.h any more. * You will get a warning if you try to include one of these from the engine. They still exist for compatibility with game projects and do not produce warnings when included there. * There have only been minor changes to our internal games down to accommodate these changes. The intent is for this to be as seamless as possible. * No engine code explicitly includes a precompiled header any more. * We still use PCHs, but they're force-included on the compiler command line by UnrealBuildTool instead. This lets us tune what they contain without breaking any existing include dependencies. * PCHs are generated by a tool to get a statistical amount of coverage for the source files using it, and I've seeded the new shared PCHs to contain any header included by > 15% of source files. Tool used to generate this transform is at Engine\Source\Programs\IncludeTool. [CL 3209342 by Ben Marsh in Main branch]
2016-11-23 15:48:37 -05:00
#include "IHeadMountedDisplay.h"
Merging //UE4/Release-4.11 to //UE4/Main (up to CL#2852902) ========================== MAJOR FEATURES + CHANGES ========================== Change 2835191 on 2016/01/19 by Nick.Whiting Invert the y-axis on the SteamVR controllers to match the convention of the engine and the rest of the gamepads #jira UE-22705 Change 2835686 on 2016/01/20 by Gareth.Martin Fixed landscape material instances not being updated if holes are painted on a landscape that doesn't have the landscape visibility mask node in the material and then the visibility mask node is added to the material later. #jira UE-18187 Change 2835767 on 2016/01/20 by Richard.Hinckley #jira UE-25499 Added a cursor to TopDown template (C++ version) to match the BP version. Change 2835772 on 2016/01/20 by Richard.Hinckley #jira UE-25499 Adding the material asset for the C++ TopDown template's cursor. Change 2835811 on 2016/01/20 by Taizyd.Korambayil #jira UE-25699 Added Validity Checks in BP logic, unchecked CDO for Pixel Ship, to Fix Log Warnings #jira UE-25704 Adjusted Matinee to happen at Box Location #jira UE-25688 Adjusted Player Starts #jira UE-25693 Adjusted Player Starts Change 2835863 on 2016/01/20 by Gareth.Martin Fixed crash in the landscape ramp and mirror tools if the streaming level containing the landscape is hidden (or possibly if the landscape actor is deleted) #jira UE-24883 Change 2835889 on 2016/01/20 by Taizyd.Korambayil #jira UE-25698 Enabled V-sync, also fixed up player Respawn Issue Change 2835995 on 2016/01/20 by Jamie.Dale The output log now hard-wraps lines to prevent long lines causing performance issues #jira UE-24187 Change 2836052 on 2016/01/20 by Taizyd.Korambayil #jira UE-25675 Added Blocking Volume to prevent Player from Falling off map #jira UE-25676 Added Blocking Volumes so that the Player doesn't get stucl at awkward corners under the Bridge Change 2836137 on 2016/01/20 by Chad.Taylor Vehicle and VehicleAdv template content fixes for new VR camera #jira UE-25507 Change 2836166 on 2016/01/20 by Gareth.Martin Fixed hiding a streaming level containing a landscape causing the landscape editor to switch to the "New Landscape" tool instead of exiting #jira UE-25093 Change 2836174 on 2016/01/20 by Chad.Taylor IHeadMountedDisplay crash fix associated with accessing a dangling pointer. #jira UE-25272 Change 2836179 on 2016/01/20 by Jamie.Dale Optimized FShapedGlyphSequence reverse look-up There's now a reverse look-up map of cluster indices to their glyph data in order to avoid brute force looping #jira UE-24187 Change 2836286 on 2016/01/20 by Chris.Babcock Update Qualcomm TextureConverter for OSX #jira UE-22092 #ue4 #android Change 2836328 on 2016/01/20 by Nick.Darnell Fixing a problem with widget components crashing on destruction with the render commands to pre/post render for window render commands needing access to the policy, but it potentially being deleted. Inserting a NoOp command that keeps the shared ptr alive through the RHI render process. #jira UE-25752 Change 2836342 on 2016/01/20 by Nick.Darnell Depending on shutdown order, the Slate Renderer may go away, and then render data handles may not be collected correctly because they are trying to reference a pointer that's no longer valid and cause a crash on exit. The correct approach would be to have render handles actually have a pointer back to who owns them, in this case the RHI Resource Manager, which is still alive and well at this point in the pipeline. Then if the resource manager is collected, it forces all handles to get cleaned up correctly, or if the handles are collected first, they can be sure they've got a valid pointer back to the resource manager. #jira UE-25753 Change 2836358 on 2016/01/20 by Taizyd.Korambayil #jira UE-25710 Replaced Deprecated Nodes Change 2836510 on 2016/01/20 by Taizyd.Korambayil #jira UE-25718 Adjsuted BP to make pointer decal rotate in the direction of surface Change 2836564 on 2016/01/20 by Taizyd.Korambayil #jira UE-25716 Added bool to store last Moved Direction Change 2836697 on 2016/01/20 by Taizyd.Korambayil #jira UE-25740 Removed unused VR Nodes to remove Log errors on Mac Change 2836725 on 2016/01/20 by Peter.Sauerbrei workaround for thread race when trying to release the TargetDeviceService endpoint after an unclaim message is sent #jira UE-25123 Change 2836782 on 2016/01/20 by Jamie.Dale Added FTextLayout::AddLines This is similar to AddLine, however it allows you to add multiple lines in a single call, thus avoiding the re-justification cost associated with each call to AddLine. AddLine has also been changed to take the same structure type as AddLines (which takes an array of these structures), and the existing version of AddLine has been deprecated. #jira UE-24187 Change 2836801 on 2016/01/20 by Jeff.Campeau [CL 2857187 by Matthew Griffin in Main branch]
2016-02-05 11:54:00 -05:00
#include "PrimitiveSceneInfo.h"
class FHeadMountedDisplayModule : public IHeadMountedDisplayModule
{
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3636795) #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 2932765 by Nick.Whiting Merging updated license files for Oculus libraries Change 3480552 by Dustin.Holmes Added map and gamemode for calibration #jira UEVR-808 Change 3502253 by Nick.Whiting Trying to fix up p4's botch of the merge Change 3513736 by Keli.Hlodversson Move duplicated late update code into a common FLateUpdateManager #jira UEVR-893 Change 3514798 by Mike.Beach #4.17 Exposing a way for Blueprint users to remap the SteamVR controller's d-pad buttons (clashes with the Oculus mappings). #jira UE-42634 Change 3516042 by Dustin.Holmes Runtime handedness changes in Vive controllers are now reflected when a new device is connected. Device mappings are also reset when a device disconnects, so that if it connects again it fully reregisters instead of just assuming the role it previously had. Change 3517781 by Keli.Hlodversson Remove unused local variable bUseCustomPresentTexture Change 3517951 by Mike.Beach #4.17 Guarding against dereferencing a null pointer. Defaulting to the identity when we don't (yet) have a valid head pose to use. #jira UE-43685 Change 3518142 by Mike.Beach #4.17 Resolving fallout from bad merge (CL 3514868) - checking for teminating null in array (which was added to keep ARRAY_COUNT from acting on an empty array). Change 3523183 by Ryan.Vance #jira UE-46493, UEVR-661 Fixes GearVR only displaying a black screen on startup Fixes GearVR rendering incorrectly with mobile multi-view w/o direct mode enabled Adding mobile multi-view direct support to Daydream Change 3523718 by Nick.Whiting Adding core controller recentering delegate, and moving Google over to that system. Change 3527263 by Dan.Oconnor Mirror 3526925 for Nick Donaldson Change 3533596 by Dustin.Holmes Add garbage matte map, gamemode, and blueprints. Change 3533598 by Dustin.Holmes Expose the Set Tint Color and Opacity function for Widget Components as a Blueprint node. Change 3538139 by Mike.Beach Moving Oculus debug shader directly into Oculus plugin. #jira UE-47134 Change 3543185 by Nick.Atamas Address UEVR-891 : Merge in changes to Google Tango plugin. #jira UEVR-891 Change 3543285 by Nick.Atamas Merging using //UE4/Release-4.17/... -> //UE4/Dev-VR/... : Fixed UEVR-852: Adjusted Google Tango Plugins copyright to Copyright Google 2017. Removed Apache 2.0 license. Change 3545505 by Nick.Atamas Fix UEVR-851 : some fix-ups to MeshReconHUD and overlay material now has a material parameter for tinting the reconstructed mesh to help debug visualization. Change 3547549 by Jeff.Fisher Fixing DefaultSpectatorScreenController comment. Change 3551339 by Ryan.Vance #jira UE-44947 Editor primitives we not being handled correctly with ISR. Change 3554169 by Dustin.Holmes Reconcile missed Mixed Reality blueprint Change 3566825 by Mike.Beach Fixing some bad merges from Main (fallout from CL 3566309) Change 3567143 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3567572 by Mike.Beach [WIP] Adding some MR plugin dependencies to keep CIS quiet (SteamVR is just temporary, and will be removed). Change 3569116 by Jeff.Fisher Mixed reality build breaks for PS4 -Module is dependent on steamvr, so don't build it for PS4. -Removed unused class that doesn't compile with clang. Change 3569362 by Mike.Beach Organizing MR plugin content, to make way for new calibration modes. Change 3572802 by Jeff.Fisher UEVR-832 Add save/load system for calibrated camera settings -Moved MixedRealityConfigurationSaveGame to c++. #review-3571779 #jira UEVR-832 Change 3573864 by Mike.Beach [WIP] Initial work on MR cam alignment controller - records point/frustum data from user input. Change 3575900 by Jeff.Fisher Vive spectator flat rect expanded to match other platforms. -The vive 'full flat eye' rect was narrower than other platforms. Expanded it to be closer to the other platforms. Change 3578684 by Mike.Beach Static analysis fixes for CIS. #jira UE-48204, UE-48203, UE-48206 Change 3579460 by Mike.Beach [WIP] New calibration mode for camera alignment. #jira UEVR-785 Change 3581232 by Mike.Beach [WIP] Saving off alignment calibration data, and loading it on initialization. We skip alignment calibration if it has been configured. #jira UEVR-832 Change 3588411 by Mike.Beach [WIP] Adding calibration for compositing (chroma color, etc.). #jira UEVR-785 Change 3588541 by Mike.Beach [WIP] Cleaning up some display issues with the MR calibration. #jira UEVR-785 Change 3588680 by Mike.Beach Re-organizing the MR content, now that the alignment controller calibrates more than just alignment (renaming, etc.). Change 3588694 by Mike.Beach Renaming the MR calibration pawn (since it doesn't do any calibrating itself). Change 3591518 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3591671 by Ryan.Vance Debug stereo layer support This adds an option to render the debug canvas to a stereo layer which greatly improves console and stat readability in an hmd. Change 3591812 by Ryan.Vance Don't snap motion controllers to the origin when tracking is lost. Change 3594681 by Mike.Beach [WIP] Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3596679 by Mike.Beach CIS fix (likely fallout from CL 3591671) - changing the order of initialization to better match the order of declaration. Change 3598191 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Created MixedRealityGarbageMatteCaptureComponent. An instance of this is spawned by and attached to MixedRealityCaptureComponent. Saved config data is loaded into it. It spawns a garbage matte actor. It then captures the garbage matte actor into a render target (which is set on MixedRealityCaptureComponent). #jira UEVR-807 #review-3598179 Change 3598276 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3598332 by Mike.Beach Guarding against a blind cast in the SteamVRChaperone component, which can be used cross platform (can't assume SteamVR). Change 3605271 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3608490 by Jeff.Fisher UEVR-987 Social Screen PS4 need to go to 'mirroring' for hmd setup dialog because system dialogs are not visible in separate mode. UEVR-988 SpectatorScreen Flickering UE-47234 Spectator screen: need frame delay before assigning dynamically created rendertarget to spectator texture UE-47310 Spectator Screen: crash if you release a render target which is assigned as the spectator texture -Test level content for all of these bugs. Change 3608883 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Set material to use the garbage matte render target. Change 3613292 by Mike.Beach Moving header fcn decl up, under the proper interface section (for organization's sake). Change 3616943 by Nick.Whiting Updating SteamVR libraries to 1.0.9, so we can bring back macOS support Change 3616970 by Nick.Whiting Adding in steamvr visible area mesh support. Can be toggled with vr.SteamVR.UseVisibleAreaMesh Change 3617866 by Mike.Beach Updating the VR template to reflect Oculus HMD device naming that we've keyed off of in these Blueprints (when determining which VR system we're running on). Change 3620108 by Mike.Beach [WIP] Adding an intermediate calibration step to tweak the MR virtual cam's alignment. Change 3620982 by Mike.Beach Tying off some loose ends with the MR calibration map: * Saving after each calibration phase * Fixing blocked input from garbage matte creation * Blocking input handling while exiting/previewing * Adding minimum radius for random screen pt Change 3621551 by Mike.Beach [MR] Leveraging camera support in the new media framework - working for limited cameras in calibration. Change 3621552 by Mike.Beach [MR calibration] - fixing it so when you first switch into compoisiting calibration it updates the property readout. Change 3621660 by Mike.Beach [MR calibration] Cleaning up how we display text (adding a struct to wrap the coresponding properties). Change 3623323 by Dustin.Holmes Fix buffer overflow when using 5+ Vive generic trackers and add more Special hand designations to cover the maximum 11 trackers Vive supports Change 3625900 by Keli.Hlodversson Remove fixed 16:9 aspect ratio for SteamVR and Oculus splash screens. Oculus was already fixed in CL#3413801, but regressed with plugin renaming and unificiation with GearVR in CL#3502152. #jira UE-40220 StereoLayer splash layers are hardcoded to 8 by 4.5 meters (16:9 aspect ratio) Change 3628409 by Mike.Beach Speculative CIS fix. #jira UE-49339 Change 3628440 by Nick.Whiting Fix for SteamVR OSX build issues Change 3628489 by Nick.Whiting Fix for win32 build break Change 3629045 by Mike.Beach Shadowed variable name fix (CIS). Change 3629202 by Arciel.Rekman Copying //UE4/Partner-Valve@3629179 to Dev-VR (//UE4/Dev-VR) Change 3629340 by Nick.Atamas Unshelved and resolved changes from Oculus. Change 3629772 by Ryan.Vance Fixing Oculus Vulkan related compile issues. This will break Oculus Vulkan support, but the code needs to be refactored anyway. Change 3629833 by Mike.Beach Fixing up CIS warning introduced by Oculus 1.17 changes - "unsafe conversion" warning #jira UE-49376 Change 3630696 by Jeff.Fisher UE-49415 //UE4/Dev-VR: Incremental UE4Editor Win64 completed with errors - 5 Errors Switching an include to a forward declaration -Not sure why the previous version didn't compile on the build machine, but fewer dependencies is good. Change 3630783 by Mike.Beach Fixing CIS compiler failures for our vehicle templates. #jira UE-49417 Change 3630802 by Mike.Beach Better fix than 3630783 - updating the vehicle template's stereoscopic check (fixing the VehicleHud.cpp logic as well) #jira UE-49417 Change 3630870 by Mike.Beach Pragma'ing out a function pointer cast warning. Good warning, but I figure we know what we're doing here and there's no other way around it. #jira UE-49376 Change 3630993 by Ryan.Vance Check to ensure we have a valid third camera before trying to use it. We could check >= 3 or if the left and right cameras are left/right stereo etc. decided to go with the simple test for now. Change 3631322 by Jeff.Fisher UEVR-909 PIP in Garbage Matte -Added ExternalGarbageMatteActor to MixedRealityGarbageMatteCaptureComponent and exposed it to blueprint though MixedRealityCaptureComponent. This lets us switch from using the normal mixed reality component save/load garbage matte data and instead use an external actor, in this case the actor we use to setup the garbage matte. Then the mask is able to capture that actor live as it is edited. -Also implemented GetViewOwner() so that we can use SetOwnerOnlySee to prevent other cameras and captures from seeing the garbage matte actor. -Calibration level now uses the external garbage matte actor to let the garbate matte mask live update. It also does a picture-in-picture preview of the mixed reality scene. 'P' can show/hide the garbage matte actor on that PIP preview. -Added SetUnmaskedPixelHighlightColor to MixedRealityCaptureComponent and the material. With this one can make unmasked video pixels more obvious in the output. The calibration level has this mapped to shift-P and makes pixels bright yellow to white. -Added blueprint to calibration level to make the garbage matte actor visible in the mixed reality capture. That is bound to ctrl-g. -GarbageMatteActors spawned by the mixed reality capture component are now attached to the vr origin. The calibration level now saves garbage matte mesh transforms relative to the vr origin. -The garbage matte mesh is now plugin content, and is referenced in the mixedrealitycomponent default object, so it is cooked in any project that includes the plugin. -Fog and AtmosphericFog no longer affect the garbage matte mask capture... there may be other things we need to turn off there. #review-3618345 #jira UEVR-909 Change 3631362 by Keli.Hlodversson #jira UE-49418 Exiting Google Instant Preview displays half of the editor viewport as black. Note convoluted fix: passing bIsStereoScopic3D to IsActiveThisFrame. ISceneViewExtension code cannot rely on StereoRenderingDevice->IsStereoEnabled to know whether to render in stereo, as the current viewport widget may disable it. This was not a problem before the refactoring, as HMD-related viewextensions were only added to the active list after establishing that stereo indeed was enabled and allowed by the current view port widget. Change 3631887 by Jeff.Fisher Fixing IsActiveThisFrame build break. Change 3632206 by Nick.Atamas Fix for UE-49413. Registering FOculusHMD as an extensions the same way as others: now creates an XRCamera that passes all the calls back to the HMD. Change 3632264 by Nick.Whiting Fix for Vive rendering getting cropped off due to invalid subrect values being submitted to the compositor. Change 3632340 by Nick.Atamas Merged in change from Loren; opted for our solution to ViewExtensions instead of the one in the changelist. Original description below. Change 3632214 by Loren.McQuade@Loren.McQuade_Dev-VR on 2017/09/07 19:51:29 *pending* [Dev-VR] Added OculusHMD_SceneViewExtension, PlayerPosition/PlayerOrientation values, FOculusHMD::GetRelativeEyePose cross-eyed madness (CL 3631541, 3631687) Change 3632353 by Ryan.Vance #jira UE-49468 Don't apply xr camera rotation on the player controller when not using xr tracking. Change 3632735 by Keli.Hlodversson Better fix for #jira UE-49413. Revert oculus xr camera code and use that one can have more than one view extension registered instead. Use GetPriority to have the OculusHMD view extension code execute after the default xr camera. The xr camera subclass did not forward the calls to ISceneViewExtension to the parent, breaking various functionality such as late update. Fixes a crash when entering VR pie twice, back to back. Change 3632752 by Keli.Hlodversson Applying change 3632592 by Loren.McQuade@Loren.McQuade_Dev-VR_Branch on 2017/09/08 02:08:22 [Dev-VR] Push //UE4/Partner-Oculus@3632591 #rb merge //UE4/Partner-Oculus to //UE4/Dev-VR/... Reverted OculusHMD_XRCamera changes, as that clas has been removed in the interim. Change 3633211 by Mike.Beach Backing out Oculus MotionController hiding that accidently got submitted - we decided not to adopt this change originally. Change 3633315 by Jeff.Fisher merge from main with dev-platform problem children -expecting SDRBackBuffer stuff to be wrong. Change 3634006 by Mike.Beach Resurecting Oculus clip plane settings which got dropped in the IXR refactor. #jira UE-49520 Change 3634639 by Keli.Hlodversson Avoid include cycle https://ec-01.epicgames.net/commander/link/jobStepDetails/jobSteps/68863219?stepName=UE4Editor%20Static%20Analysis%20Win64%20%28IncludeTool%29&jobId=7995809&jobName=UE4%20Dev-VR%20-%20CL%203632752%20-%20Nightly%20Build&tabGroup=diagnosticHeader&firstPage=1 Change 3634641 by Jeff.Fisher UE-49535 Lighting is blown out when playing in VR Preview on Vive -Need pixel format to be PF_B8G8R8A8 for vr, now the plugins all build their render target and use that format. #review-3634623 Change 3634682 by Jeff.Fisher IHeadMountedDisplay forward declarations needed. Change 3634690 by Ryan.Vance We can't override the screen percentage when rendering for stereo #jira UE-49287 Change 3635970 by Keli.Hlodversson #jira UE-49563 Crash while opening QA-Game Referencing SharedPointer.h Verify that StereoRendering is valid before calling IsStereoEnabled() Change 3635979 by Mike.Beach CIS static analysis fix - checking a ptr for null before we use it. #jira UE-49531 Change 3636059 by Mike.Beach Fixing XR system name aliasing for the -hmd command. [CL 3638830 by Ryan Vance in Main branch]
2017-09-12 11:27:30 -04:00
virtual TSharedPtr< class IXRTrackingSystem, ESPMode::ThreadSafe > CreateTrackingSystem()
{
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3636795) #lockdown Nick.Penwarden ============================ MAJOR FEATURES & CHANGES ============================ Change 2932765 by Nick.Whiting Merging updated license files for Oculus libraries Change 3480552 by Dustin.Holmes Added map and gamemode for calibration #jira UEVR-808 Change 3502253 by Nick.Whiting Trying to fix up p4's botch of the merge Change 3513736 by Keli.Hlodversson Move duplicated late update code into a common FLateUpdateManager #jira UEVR-893 Change 3514798 by Mike.Beach #4.17 Exposing a way for Blueprint users to remap the SteamVR controller's d-pad buttons (clashes with the Oculus mappings). #jira UE-42634 Change 3516042 by Dustin.Holmes Runtime handedness changes in Vive controllers are now reflected when a new device is connected. Device mappings are also reset when a device disconnects, so that if it connects again it fully reregisters instead of just assuming the role it previously had. Change 3517781 by Keli.Hlodversson Remove unused local variable bUseCustomPresentTexture Change 3517951 by Mike.Beach #4.17 Guarding against dereferencing a null pointer. Defaulting to the identity when we don't (yet) have a valid head pose to use. #jira UE-43685 Change 3518142 by Mike.Beach #4.17 Resolving fallout from bad merge (CL 3514868) - checking for teminating null in array (which was added to keep ARRAY_COUNT from acting on an empty array). Change 3523183 by Ryan.Vance #jira UE-46493, UEVR-661 Fixes GearVR only displaying a black screen on startup Fixes GearVR rendering incorrectly with mobile multi-view w/o direct mode enabled Adding mobile multi-view direct support to Daydream Change 3523718 by Nick.Whiting Adding core controller recentering delegate, and moving Google over to that system. Change 3527263 by Dan.Oconnor Mirror 3526925 for Nick Donaldson Change 3533596 by Dustin.Holmes Add garbage matte map, gamemode, and blueprints. Change 3533598 by Dustin.Holmes Expose the Set Tint Color and Opacity function for Widget Components as a Blueprint node. Change 3538139 by Mike.Beach Moving Oculus debug shader directly into Oculus plugin. #jira UE-47134 Change 3543185 by Nick.Atamas Address UEVR-891 : Merge in changes to Google Tango plugin. #jira UEVR-891 Change 3543285 by Nick.Atamas Merging using //UE4/Release-4.17/... -> //UE4/Dev-VR/... : Fixed UEVR-852: Adjusted Google Tango Plugins copyright to Copyright Google 2017. Removed Apache 2.0 license. Change 3545505 by Nick.Atamas Fix UEVR-851 : some fix-ups to MeshReconHUD and overlay material now has a material parameter for tinting the reconstructed mesh to help debug visualization. Change 3547549 by Jeff.Fisher Fixing DefaultSpectatorScreenController comment. Change 3551339 by Ryan.Vance #jira UE-44947 Editor primitives we not being handled correctly with ISR. Change 3554169 by Dustin.Holmes Reconcile missed Mixed Reality blueprint Change 3566825 by Mike.Beach Fixing some bad merges from Main (fallout from CL 3566309) Change 3567143 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3567572 by Mike.Beach [WIP] Adding some MR plugin dependencies to keep CIS quiet (SteamVR is just temporary, and will be removed). Change 3569116 by Jeff.Fisher Mixed reality build breaks for PS4 -Module is dependent on steamvr, so don't build it for PS4. -Removed unused class that doesn't compile with clang. Change 3569362 by Mike.Beach Organizing MR plugin content, to make way for new calibration modes. Change 3572802 by Jeff.Fisher UEVR-832 Add save/load system for calibrated camera settings -Moved MixedRealityConfigurationSaveGame to c++. #review-3571779 #jira UEVR-832 Change 3573864 by Mike.Beach [WIP] Initial work on MR cam alignment controller - records point/frustum data from user input. Change 3575900 by Jeff.Fisher Vive spectator flat rect expanded to match other platforms. -The vive 'full flat eye' rect was narrower than other platforms. Expanded it to be closer to the other platforms. Change 3578684 by Mike.Beach Static analysis fixes for CIS. #jira UE-48204, UE-48203, UE-48206 Change 3579460 by Mike.Beach [WIP] New calibration mode for camera alignment. #jira UEVR-785 Change 3581232 by Mike.Beach [WIP] Saving off alignment calibration data, and loading it on initialization. We skip alignment calibration if it has been configured. #jira UEVR-832 Change 3588411 by Mike.Beach [WIP] Adding calibration for compositing (chroma color, etc.). #jira UEVR-785 Change 3588541 by Mike.Beach [WIP] Cleaning up some display issues with the MR calibration. #jira UEVR-785 Change 3588680 by Mike.Beach Re-organizing the MR content, now that the alignment controller calibrates more than just alignment (renaming, etc.). Change 3588694 by Mike.Beach Renaming the MR calibration pawn (since it doesn't do any calibrating itself). Change 3591518 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3591671 by Ryan.Vance Debug stereo layer support This adds an option to render the debug canvas to a stereo layer which greatly improves console and stat readability in an hmd. Change 3591812 by Ryan.Vance Don't snap motion controllers to the origin when tracking is lost. Change 3594681 by Mike.Beach [WIP] Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3596679 by Mike.Beach CIS fix (likely fallout from CL 3591671) - changing the order of initialization to better match the order of declaration. Change 3598191 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Created MixedRealityGarbageMatteCaptureComponent. An instance of this is spawned by and attached to MixedRealityCaptureComponent. Saved config data is loaded into it. It spawns a garbage matte actor. It then captures the garbage matte actor into a render target (which is set on MixedRealityCaptureComponent). #jira UEVR-807 #review-3598179 Change 3598276 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3598332 by Mike.Beach Guarding against a blind cast in the SteamVRChaperone component, which can be used cross platform (can't assume SteamVR). Change 3605271 by Mike.Beach Copying //Tasks/UE4/Dev-MixedReality to Dev-VR-Minimal (//UE4/Dev-VR-Minimal) Change 3608490 by Jeff.Fisher UEVR-987 Social Screen PS4 need to go to 'mirroring' for hmd setup dialog because system dialogs are not visible in separate mode. UEVR-988 SpectatorScreen Flickering UE-47234 Spectator screen: need frame delay before assigning dynamically created rendertarget to spectator texture UE-47310 Spectator Screen: crash if you release a render target which is assigned as the spectator texture -Test level content for all of these bugs. Change 3608883 by Jeff.Fisher UEVR-807 Setup M_MRVidProcessing to use 3D garbage matte data. -Set material to use the garbage matte render target. Change 3613292 by Mike.Beach Moving header fcn decl up, under the proper interface section (for organization's sake). Change 3616943 by Nick.Whiting Updating SteamVR libraries to 1.0.9, so we can bring back macOS support Change 3616970 by Nick.Whiting Adding in steamvr visible area mesh support. Can be toggled with vr.SteamVR.UseVisibleAreaMesh Change 3617866 by Mike.Beach Updating the VR template to reflect Oculus HMD device naming that we've keyed off of in these Blueprints (when determining which VR system we're running on). Change 3620108 by Mike.Beach [WIP] Adding an intermediate calibration step to tweak the MR virtual cam's alignment. Change 3620982 by Mike.Beach Tying off some loose ends with the MR calibration map: * Saving after each calibration phase * Fixing blocked input from garbage matte creation * Blocking input handling while exiting/previewing * Adding minimum radius for random screen pt Change 3621551 by Mike.Beach [MR] Leveraging camera support in the new media framework - working for limited cameras in calibration. Change 3621552 by Mike.Beach [MR calibration] - fixing it so when you first switch into compoisiting calibration it updates the property readout. Change 3621660 by Mike.Beach [MR calibration] Cleaning up how we display text (adding a struct to wrap the coresponding properties). Change 3623323 by Dustin.Holmes Fix buffer overflow when using 5+ Vive generic trackers and add more Special hand designations to cover the maximum 11 trackers Vive supports Change 3625900 by Keli.Hlodversson Remove fixed 16:9 aspect ratio for SteamVR and Oculus splash screens. Oculus was already fixed in CL#3413801, but regressed with plugin renaming and unificiation with GearVR in CL#3502152. #jira UE-40220 StereoLayer splash layers are hardcoded to 8 by 4.5 meters (16:9 aspect ratio) Change 3628409 by Mike.Beach Speculative CIS fix. #jira UE-49339 Change 3628440 by Nick.Whiting Fix for SteamVR OSX build issues Change 3628489 by Nick.Whiting Fix for win32 build break Change 3629045 by Mike.Beach Shadowed variable name fix (CIS). Change 3629202 by Arciel.Rekman Copying //UE4/Partner-Valve@3629179 to Dev-VR (//UE4/Dev-VR) Change 3629340 by Nick.Atamas Unshelved and resolved changes from Oculus. Change 3629772 by Ryan.Vance Fixing Oculus Vulkan related compile issues. This will break Oculus Vulkan support, but the code needs to be refactored anyway. Change 3629833 by Mike.Beach Fixing up CIS warning introduced by Oculus 1.17 changes - "unsafe conversion" warning #jira UE-49376 Change 3630696 by Jeff.Fisher UE-49415 //UE4/Dev-VR: Incremental UE4Editor Win64 completed with errors - 5 Errors Switching an include to a forward declaration -Not sure why the previous version didn't compile on the build machine, but fewer dependencies is good. Change 3630783 by Mike.Beach Fixing CIS compiler failures for our vehicle templates. #jira UE-49417 Change 3630802 by Mike.Beach Better fix than 3630783 - updating the vehicle template's stereoscopic check (fixing the VehicleHud.cpp logic as well) #jira UE-49417 Change 3630870 by Mike.Beach Pragma'ing out a function pointer cast warning. Good warning, but I figure we know what we're doing here and there's no other way around it. #jira UE-49376 Change 3630993 by Ryan.Vance Check to ensure we have a valid third camera before trying to use it. We could check >= 3 or if the left and right cameras are left/right stereo etc. decided to go with the simple test for now. Change 3631322 by Jeff.Fisher UEVR-909 PIP in Garbage Matte -Added ExternalGarbageMatteActor to MixedRealityGarbageMatteCaptureComponent and exposed it to blueprint though MixedRealityCaptureComponent. This lets us switch from using the normal mixed reality component save/load garbage matte data and instead use an external actor, in this case the actor we use to setup the garbage matte. Then the mask is able to capture that actor live as it is edited. -Also implemented GetViewOwner() so that we can use SetOwnerOnlySee to prevent other cameras and captures from seeing the garbage matte actor. -Calibration level now uses the external garbage matte actor to let the garbate matte mask live update. It also does a picture-in-picture preview of the mixed reality scene. 'P' can show/hide the garbage matte actor on that PIP preview. -Added SetUnmaskedPixelHighlightColor to MixedRealityCaptureComponent and the material. With this one can make unmasked video pixels more obvious in the output. The calibration level has this mapped to shift-P and makes pixels bright yellow to white. -Added blueprint to calibration level to make the garbage matte actor visible in the mixed reality capture. That is bound to ctrl-g. -GarbageMatteActors spawned by the mixed reality capture component are now attached to the vr origin. The calibration level now saves garbage matte mesh transforms relative to the vr origin. -The garbage matte mesh is now plugin content, and is referenced in the mixedrealitycomponent default object, so it is cooked in any project that includes the plugin. -Fog and AtmosphericFog no longer affect the garbage matte mask capture... there may be other things we need to turn off there. #review-3618345 #jira UEVR-909 Change 3631362 by Keli.Hlodversson #jira UE-49418 Exiting Google Instant Preview displays half of the editor viewport as black. Note convoluted fix: passing bIsStereoScopic3D to IsActiveThisFrame. ISceneViewExtension code cannot rely on StereoRenderingDevice->IsStereoEnabled to know whether to render in stereo, as the current viewport widget may disable it. This was not a problem before the refactoring, as HMD-related viewextensions were only added to the active list after establishing that stereo indeed was enabled and allowed by the current view port widget. Change 3631887 by Jeff.Fisher Fixing IsActiveThisFrame build break. Change 3632206 by Nick.Atamas Fix for UE-49413. Registering FOculusHMD as an extensions the same way as others: now creates an XRCamera that passes all the calls back to the HMD. Change 3632264 by Nick.Whiting Fix for Vive rendering getting cropped off due to invalid subrect values being submitted to the compositor. Change 3632340 by Nick.Atamas Merged in change from Loren; opted for our solution to ViewExtensions instead of the one in the changelist. Original description below. Change 3632214 by Loren.McQuade@Loren.McQuade_Dev-VR on 2017/09/07 19:51:29 *pending* [Dev-VR] Added OculusHMD_SceneViewExtension, PlayerPosition/PlayerOrientation values, FOculusHMD::GetRelativeEyePose cross-eyed madness (CL 3631541, 3631687) Change 3632353 by Ryan.Vance #jira UE-49468 Don't apply xr camera rotation on the player controller when not using xr tracking. Change 3632735 by Keli.Hlodversson Better fix for #jira UE-49413. Revert oculus xr camera code and use that one can have more than one view extension registered instead. Use GetPriority to have the OculusHMD view extension code execute after the default xr camera. The xr camera subclass did not forward the calls to ISceneViewExtension to the parent, breaking various functionality such as late update. Fixes a crash when entering VR pie twice, back to back. Change 3632752 by Keli.Hlodversson Applying change 3632592 by Loren.McQuade@Loren.McQuade_Dev-VR_Branch on 2017/09/08 02:08:22 [Dev-VR] Push //UE4/Partner-Oculus@3632591 #rb merge //UE4/Partner-Oculus to //UE4/Dev-VR/... Reverted OculusHMD_XRCamera changes, as that clas has been removed in the interim. Change 3633211 by Mike.Beach Backing out Oculus MotionController hiding that accidently got submitted - we decided not to adopt this change originally. Change 3633315 by Jeff.Fisher merge from main with dev-platform problem children -expecting SDRBackBuffer stuff to be wrong. Change 3634006 by Mike.Beach Resurecting Oculus clip plane settings which got dropped in the IXR refactor. #jira UE-49520 Change 3634639 by Keli.Hlodversson Avoid include cycle https://ec-01.epicgames.net/commander/link/jobStepDetails/jobSteps/68863219?stepName=UE4Editor%20Static%20Analysis%20Win64%20%28IncludeTool%29&jobId=7995809&jobName=UE4%20Dev-VR%20-%20CL%203632752%20-%20Nightly%20Build&tabGroup=diagnosticHeader&firstPage=1 Change 3634641 by Jeff.Fisher UE-49535 Lighting is blown out when playing in VR Preview on Vive -Need pixel format to be PF_B8G8R8A8 for vr, now the plugins all build their render target and use that format. #review-3634623 Change 3634682 by Jeff.Fisher IHeadMountedDisplay forward declarations needed. Change 3634690 by Ryan.Vance We can't override the screen percentage when rendering for stereo #jira UE-49287 Change 3635970 by Keli.Hlodversson #jira UE-49563 Crash while opening QA-Game Referencing SharedPointer.h Verify that StereoRendering is valid before calling IsStereoEnabled() Change 3635979 by Mike.Beach CIS static analysis fix - checking a ptr for null before we use it. #jira UE-49531 Change 3636059 by Mike.Beach Fixing XR system name aliasing for the -hmd command. [CL 3638830 by Ryan Vance in Main branch]
2017-09-12 11:27:30 -04:00
TSharedPtr<IXRTrackingSystem, ESPMode::ThreadSafe> DummyVal = nullptr;
return DummyVal;
}
Copying //UE4/Dev-VR to //UE4/Dev-Main (Source: //UE4/Dev-VR @ 3145687) #lockdown Nick.Penwarden #rb Merge ========================== MAJOR FEATURES + CHANGES ========================== Change 3094167 on 2016/08/18 by Jeff.Fisher UEVR-97 Morpheus HMD tracking needs to wait until HMD is fully tracked. -Morpheus CALIBRATING/NOT_TRACKED tracking state hmd orientation update disabled and delegates added to present instructions to the user. This behavior is controlled by morpheus ini setting bDisableHMDOrientationUntilHMDHasBeenTracked, but defaulted to true to avoid subtly bad user experiences. #review-3094106 @chad.taylor #jira UEVR-97 Change 3104799 on 2016/08/29 by Jeff.Fisher UEVR-178 Morpheus HMD Black crescents -Switched reprojection frame time for 60/120 mode from 120hz to 60hz so we much better predict where the hmd will be pointing when the frame we are about to render is actually displayed, and are run off the edge of it less often and less severely. This makes the black crescent artifacts only just visible during very fast head turning. The kWrapModeMirror change, which will be submitted separately, makes the left and right crescents invisible to me. -Renamed the functions for setting the prediction info in the PS4Tracker. -Added render frame parameters to sony reprojection functions, these can help with debugging reprojection. -Added commented out sce call to get the reprojection debug data. Not allowed to submit an executable that calls it, but its nice to at least know where one can put it. May improve this later. -Wrapped PS4Tracker->Synchronize call in a check that the tracker handle is valid, because I managed to get it called when it wasn't (probably during hmd power off testing, but I don't remember now). It should be fine to not do it if the tracker is not functioning. #review-3104780 chad.taylor #jira UEVR-178 Change 3108423 on 2016/08/31 by Jeff.Fisher Morpheus Config Improvements. -UEVR-138 Morpheus HMD reprojection wrap mode config setting -Can now switch between wrap mode Mirror and ClampToBorder. Mirror is the default. -Made bDisableHMDOrientationUntilHMDHasBeenTracked editable in UE4Editor project settings. -Using generic project setting for bStartInVR, removed the morpheus specific one. #jira UEVR-138 #review-3106999 @nick.whiting Change 3111231 on 2016/09/01 by Jeff.Fisher Fixed bStartInVR ini setting. -Initial implementation worked via a generic EnableStereo call, which worked, but happened after the hmd setup dialog, which is not what I wanted. -Also fixed a tracking frame mismatch assert that hit when I powered the hmd off once, causing it to lose tracking. Its ok that it doesn't update in that circumstance. #review-3111211 @ryan.vance Change 3115196 on 2016/09/06 by Keli.Hlodversson #jira UEVR-128 Map move controller Select button to Invalid, as it is always handled by the system Change 3116425 on 2016/09/07 by Chad.Taylor PSVR: stereo layers implementation Change 3116593 on 2016/09/07 by Jeff.Fisher UEVR-126 Morpheus HMD connect dialog cancel reactions -VR only apps can't allow the player to cancel out of the hmd setup dialog, so lets just pop the dialog up again (sony were ok with a licencee doing this) if an ini setting says to do that. -VR/2D apps might want to switch to 2d if the player cancels out of the hmd setup dialog, so there is an ini setting for that. -A delegate only implementation is also provided for apps that want to do something else. This leaves the game rendering in VR mode, and fires the delegate. -Refactored to better separate successful HMD acquisition from stereo rendering. This was necessary to support the delegate only option on startup. If you start in vr mode with your hmd off and cancel the dialog stereo rendering now starts with default values for the hmd hardware stats (as read from my pvt) instead of crashing trying to use uninitialized data. When an hmd is connected its values will be read. -Refactored to ensure reprojection starts immediately when we call StartReprojection. #jira UEVR-126 #review-3116221 Change 3116754 on 2016/09/07 by Keli.Hlodversson bPixelDensityAdaptive is a bool and not a float property Change 3117692 on 2016/09/08 by Jeff.Fisher UEVR-135 Morpheus HMD recent feature error reporting UEVR-173 2DVR flexibility (UTexture) -Error log for sceHmdReprojectionSetOutputMinColor failure. -Made the parameter for 2dVR a UTexture* instead of a UTexture2D*, so it can be a rendertarget, etc. -Added error logs for missing texture, invalid texture, wrong texture format to 2DVR. #jira UEVR-135 #jira UEVR-173 #review-3116955 @keli.hloedversson Change 3117990 on 2016/09/08 by Jeff.Fisher UEVR-127 Morpheus HMD removal reaction -Added VRHeadsetPutOnHead and VRHeadsetRemovedFromHead delegates, and implemented them for Morpheus. #jira UEVR-127 #review-3117968 @keli.hlodversson Change 3120198 on 2016/09/09 by Jeff.Fisher MorpheusReprojector frame complete wait error log -Now log a warning if the sceKernalWaitEqueue returns an error. It not a problem if this happens rarely, but something is very broken if it starts happening continuously. Change 3121754 on 2016/09/12 by Keli.Hlodversson #jira UE-21878 - Also emit VR initialization analytics events in the editor. Change 3122311 on 2016/09/12 by Nick.Whiting Merging fix for Adreno devices rendering black from 4.13.1 Change 3123057 on 2016/09/13 by Keli.Hlodversson #jira UE-30097 Use the current value of r.ScreenPercentage on Occulus Rift if it's explicitly set. * If the SetBy part of the flags for the console var is SetBy_Constructor, then ignore the value. * If it's SetBy_Scalability, then ignore it if it equals 100 * Else, call SetScreenPercentage using the current value The obsolete HMD SCREENPERCENTAGE console command is still available and will override the setting until r.ScreenPercentage is modified the next time. Change 3123200 on 2016/09/13 by Chad.Taylor PS4 Stereo Layer double buffering. Since the overlays are reprojected at 120hz but rendered at 60hz we need to render to a separate buffer than the one being used by reprojection. Change 3125845 on 2016/09/14 by Keli.Hlodversson #jira UE-33996 Add hmd=<name> command line option to allow overriding which HMD module is used. Renamed GetModulePriorityKeyName to simply GetModuleKeyName, as this name is now also used to match against the command line options. Change 3127293 on 2016/09/15 by Jeff.Fisher UEVR-225 Morpheus HMD top and bottom black crescents -The hidden and visible area meshes for morpheus were too restrictive. Nudged them out a bit, no black crescents at the top and bottom of the screen. We are rendering a few more pixels now though. #review-3127145 @ryan.vance #jira UEVR-225 Change 3130635 on 2016/09/19 by Jeff.Fisher UEVR-226 Morpheus HMD mirrored fill wrong on outer edges -The setting was never being used, leaving the wrap mode at 0 aka kWrapModeWrap. -Refactored how the setting is applied so it works, and is less convoluted. #jira UEVR-226 #review-3129403 Change 3131615 on 2016/09/19 by Keli.Hlodversson #jira UE-29341. Update Chaperone bounds when SteamVR tells us they have changed Change 3136527 on 2016/09/22 by Keli.Hlodversson Don't depend on the current state of the VR subsystem when exiting PIE mode to decide whether the main window should be restored. Instead always restore it if it was minimized at the start. Change 3136652 on 2016/09/22 by Keli.Hlodversson Allow shutting down Steam VR subsystem without shutting down the Steam VR plugin completely in response to quitting from the SteamVR overlay. Enabling stereo rendering again will reinitialize SteamVR. This is useful when using PIE in VR mode as it allows entereing it again without restarting the editor. Also fixes crashes by first disabinge stereo rendering a short while before shutting down the VR subsystem. #jira UE-35940 Change 3138901 on 2016/09/23 by Ryan.Vance Merging 3138521 using OdinToDevVR to bring over temporary forward lighting ISR changes for 4.14 Change 3141614 on 2016/09/27 by Keli.Hlodversson Implement GetNumOfTrackingSensors and GetTrackingSensorProperties on SteamVR. #jira UE-32994 Change 3141948 on 2016/09/27 by Jeff.Fisher UEVR-242 Is AddControllerYawInput not allowed when morpheus is enabled? -Indeed it did not work. Looks like morpheus would not accumulate the yaw, so it would be reset every frame. I made the implementation of ApplyHmdRotation very similar to the one used for occulus (also similar to other platforms) to fix this. #jira UEVR-242 #review-3141933 keli.hlodversson Change 3143484 on 2016/09/28 by Nick.Whiting Integrating Oculus 1.8 SDK support, includes support for cylinder and cubemap stereo layers Change 3143517 on 2016/09/28 by Chad.Taylor Merging PS4Tracker fixes from Release-4.13 into Dev-VR Change 3143805 on 2016/09/28 by Keli.Hlodversson #jira UE-36478 Workaround to make world to meters scale apply correctly to Occulus controllers while running in PIE Change 3143943 on 2016/09/28 by Nick.Whiting Merging latest drop from OSVR Change 3144221 on 2016/09/28 by Keli.Hlodversson Implement GetTrackingSensorProperties on PS4 #jira UE-32994 Change 3144352 on 2016/09/28 by Ryan.Vance Initial implementation of mobile multi-view. This is non-functioning and requires a lot more work, but enough of the framework exists to make the 4.14 branch for an experimental release. Change 3144585 on 2016/09/29 by Jeff.Fisher UEVR-14 PSVR Support for 90Hz to 90Hz, and 120Hz to 120Hz -Enum setting added for the three frame sequences. -90Hz mode is trying to run camera updates at 90hz, but they can only run at 60 so every third one fails. This works, but its dubious. -Feature marked as experimental for now because of that 90hz tracking issue, and the lack of testing. -Defaulting to 60/120. #jira UEVR-14 #review-3143486 chad.taylor nick.whiting Change 3145263 on 2016/09/29 by Nick.Whiting Fix for constructor initialization order in StereoLayerComponent, which threw a warning on Clang Change 3145536 on 2016/09/29 by Nick.Whiting Fixes for project files to prevent mystery pop up from CAPI Change 3145663 on 2016/09/29 by Keli.Hlodversson PSVR: Make sure the camera orientation returned from GetTrackingSensorProperties points in the right direction. Change 3145670 on 2016/09/29 by Keli.Hlodversson For some reason the orientation of the Oculus tracking sensor is reported as pointing backwards. This flips it around to face front Change 3145687 on 2016/09/29 by Chad.Taylor VR splash screen support [CL 3146243 by Nick Whiting in Main branch]
2016-09-30 01:16:13 -04:00
FString GetModuleKeyName() const
{
return FString(TEXT("Default"));
}
};
IMPLEMENT_MODULE( FHeadMountedDisplayModule, HeadMountedDisplay );
IHeadMountedDisplay::IHeadMountedDisplay()
{
Merging //UE4/Release-4.11 to //UE4/Main (Up to CL#2909747) #lockdown Nick.Penwarden ========================== MAJOR FEATURES + CHANGES ========================== Change 2898120 on 2016/03/07 by Chris.Babcock Disable NvTimerQuery on Nexus 9 before Android 6.0 to fix slow frame updates #jira UE-28013 #ue4 #android Change 2898539 on 2016/03/08 by Matthew.Griffin Merging //UE4/Dev-Build to //UE4/Release-4.11 Change 2887414 on 2016/03/01 by Ben.Marsh Dump all the *.crash files produced while running commandlets, to make it easier to diagnose build system crashes cooking on Mac. Change 2898788 on 2016/03/08 by Keith.Judge Latest DX12.x integration from Microsoft. Brings XB1 up to PC level of functionality and improved perf. #jira UEPLAT-325 Change 2898836 on 2016/03/08 by Taizyd.Korambayil #jira UE-27990 Reimported River_Basin_02 Mesh with Adjacency Buffer Change 2898897 on 2016/03/08 by Sean.Gribbin #Jira UE-26550 Adding name to credits of Match 3 Change 2898938 on 2016/03/08 by Taizyd.Korambayil #jira UE-26284 Fixed Up Some Materials and BP errors Change 2898967 on 2016/03/08 by Benjamin.Hyder Updating Qa_Materials map #jira UE-24473 Change 2899032 on 2016/03/08 by Zachary.Wilson Fixing broken assets in QA-LightsStationary and eliminating log errors. Fixing mispelling and player start height in QA-LightsStationary. #jira UE-24473 Change 2899244 on 2016/03/08 by Peter.Sauerbrei addition of launch images for iPad Pro #jira UE-24793 Change 2899335 on 2016/03/08 by Richard.Hinckley #jira UE-27356 Fixing code for VR headsets so that the camera starts inside the vehicle if the user has an active HMD. Found that the C++ templates never had HMD support, so mirroring the BP templates for that functionality. Works in my testing, but a proper QA pass should be performed. Change 2899402 on 2016/03/08 by Michael.Schoell Macro instance nodes now have a hard dependency to any object class or structs their pins reference. Expanded UK2Node_MacroInstance::HasExternalDependencies to iterate over all pins and add their struct or object's class. #jira UE-27795 - Split Pins on a referenced Macro Library will crash the editor on restart Change 2899424 on 2016/03/08 by Dmitry.Rekman Fix CrossCompilerTool on Linux (UE-28056). #jira UE-28056 Change 2899445 on 2016/03/08 by Dmitry.Rekman Fix CrossCompilerTool invocation in debug scripts. #jira UE-28056 Change 2899488 on 2016/03/08 by Ryan.Vance #jira UE-28000 We can't test how many views are in the view family when initializing a view. There's no guaruntee that the family is setup yet. We'll need to move this test to the calling code. Change 2899546 on 2016/03/08 by Zachary.Wilson Updating QA-PostProcessing to match the 4.12 Main version of the map. #jira UE-24473 Change 2899553 on 2016/03/08 by Michael.Schoell Reinstancer will no longer queue BPs to be saved when compiling skeleton class dependencies and will no longer process all queued BPs to save when it is complete. #jira UE-27509 - Save on compile set to always causes a crash on compile #jira UE-27856 - "Always" Save on Compile does not save the Blueprint Change 2899558 on 2016/03/08 by Benjamin.Hyder building Lighting for QA-Materials #jira UE-24473 Change 2899597 on 2016/03/08 by Chris.Babcock Change reporting level of audio buffer decompression type logging #jira UE-28058 #ue4 #android Change 2899704 on 2016/03/08 by Benjamin.Hyder Updating Qa-Materials map #Jira UE-24473 Change 2899736 on 2016/03/08 by Benjamin.Hyder Updating TM-LPV map #Jira UE-24473 Change 2899810 on 2016/03/08 by Lauren.Ridge #jira UE-27995 UE-27987 Final UM3 UI Tweaks, + bug fix Change 2899876 on 2016/03/08 by Peter.Sauerbrei [CL 2913181 by Matthew Griffin in Main branch]
2016-03-17 11:10:14 -04:00
}
bool IHeadMountedDisplay::DoesAppUseVRFocus() const
{
return FApp::UseVRFocus();
}
bool IHeadMountedDisplay::DoesAppHaveVRFocus() const
{
return FApp::HasVRFocus();
}