SOLVED

Gamma/brightness wrong when using Unity with HDRP on Windows Mixed Reality

%3CLINGO-SUB%20id%3D%22lingo-sub-1984661%22%20slang%3D%22en-US%22%3EGamma%2Fbrightness%20wrong%20when%20using%20Unity%20with%20HDRP%20on%20Windows%20Mixed%20Reality%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1984661%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20I%20have%20a%20scene%20in%20Unity%202020%2C%20which%20I%20am%20trying%20to%20get%20working%20with%20Mixed%20Reality%20XR%20Plug-in.%20So%20far%20I%20imported%20MRTK%2C%20enabled%20%22Windows%20Mixed%20Reality%22%20in%20Project%20Settings%20-%26gt%3B%20XR%20Plug-in%20Management%2C%20got%20hmd%20position%20and%20controller%20input%20working%20again%20by%20following%20%3CA%20href%3D%22https%3A%2F%2Fdocs.unity3d.com%2FManual%2Fconfiguring-project-for-xr.html%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Emigration%20notes%20by%20Unity%3C%2FA%3E.%20I%20have%20an%20HP%20Reverb%20headset%20(gen%201).%20The%20problem%20I%20am%20facing%20right%20now%20is%20that%20scene%20looks%20visually%20different%20in%20HMD%20when%20working%20with%20Windows%20Mixed%20Reality%20natively.%20It%20is%20much%20darker%20than%20in%20editor%20window%20and%20overall%20ugly.%20If%20I%20switch%20to%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FValveSoftware%2Fsteamvr_unity_plugin%2Freleases%2Ftag%2F2.6.1%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ESteamVR%20plugin%3C%2FA%3E%2C%20the%20picture%20in%20the%20device%20looks%20exactly%20like%20it%20is%20supposed%20to%20look%20(using%20the%20exact%20same%20headset).%20Here%20is%20a%20screenshot%20of%20the%20problem%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Steam.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F240127i84ECD7D3ABCE672B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Steam.png%22%20alt%3D%22Steam%20VR%20XR%20Plug-in%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ESteam%20VR%20XR%20Plug-in%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22MRTK.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F240126i4553B56A32AA89C7%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22MRTK.png%22%20alt%3D%22Mixed%20Reality%20XR%20Plug-in%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EMixed%20Reality%20XR%20Plug-in%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThe%20scene%20is%20exactly%20the%20same%2C%20I%20used%20the%20camera%20rig%20that%20comes%20with%20MRTK%20in%20both%20cases%2C%20I%20didn't%20touch%20any%20of%20the%20settings%20(light%2C%20quality%2C%20render%2C%20HDRP%2C...)%2C%20the%20only%20difference%20is%20in%20the%20XR%20Plug-in%20Management%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22MXTstngs.png%22%20style%3D%22width%3A%20394px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F240130iE25A25BD31FB364E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22MXTstngs.png%22%20alt%3D%22correct%20visual%20output%20using%20steam%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Ecorrect%20visual%20output%20using%20steam%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Steamstngs.png%22%20style%3D%22width%3A%20382px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F240131iB9117B49DF0ED139%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Steamstngs.png%22%20alt%3D%22incorrect%20visual%20output%20using%20Mixed%20Reality%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3Eincorrect%20visual%20output%20using%20Mixed%20Reality%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ECan%20you%20please%20point%20me%20to%20the%20right%20direction%20to%20solve%20this%20problem%3F%20Are%20there%20some%20settings%20that%20should%20be%20different%20for%20Mixed%20Reality%20to%20work%20correctly%20with%20HDRP%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1984892%22%20slang%3D%22en-US%22%3ERe%3A%20Gamma%2Fbrightness%20wrong%20when%20using%20Unity%20with%20HDRP%20on%20Windows%20Mixed%20Reality%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1984892%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F899109%22%20target%3D%22_blank%22%3E%40BDarVirtu%3C%2FA%3E%26nbsp%3BColor%20Space%20is%20configurable%20depending%20on%20the%20platform%20(in%20Build%20settings)%2C%20I'm%20guessing%20one%20is%20set%20to%20linar%2C%20the%20other%20is%20set%20to%20Gamma.%3C%2FP%3E%3CP%3EMore%20info%20here%20%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.unity3d.com%2F2019.3%2FDocumentation%2FManual%2FLinearRendering-LinearOrGammaWorkflow.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EUnity%20-%20Manual%3A%20Linear%20or%20gamma%20workflow%20(unity3d.com)%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1985558%22%20slang%3D%22en-US%22%3ERe%3A%20Gamma%2Fbrightness%20wrong%20when%20using%20Unity%20with%20HDRP%20on%20Windows%20Mixed%20Reality%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1985558%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F901002%22%20target%3D%22_blank%22%3E%40valentinlgs%3C%2FA%3EThe%20render%20settings%20are%20the%20same%2C%20the%20platform%20is%20the%20same.%20Gamma%20is%20set%20to%20linear.%20The%20only%20difference%20is%20in%20the%20XR%20plugin%20management.%20Literally%2C%20you%20can%20just%20switch%20the%20plugin%20in%20XR%20management%2C%20hit%20play%20and%20you%20can%20right%20away%20see%20the%20change%20in%20HMD.%20(even%20though%20in%20the%20editor%20everything%20looks%20the%20same)%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi I have a scene in Unity 2020, which I am trying to get working with Mixed Reality XR Plug-in. So far I imported MRTK, enabled "Windows Mixed Reality" in Project Settings -> XR Plug-in Management, got hmd position and controller input working again by following migration notes by Unity. I have an HP Reverb headset (gen 1). The problem I am facing right now is that scene looks visually different in HMD when working with Windows Mixed Reality natively. It is much darker than in editor window and overall ugly. If I switch to SteamVR plugin, the picture in the device looks exactly like it is supposed to look (using the exact same headset). Here is a screenshot of the problem:

Steam VR XR Plug-inSteam VR XR Plug-inMixed Reality XR Plug-inMixed Reality XR Plug-in

The scene is exactly the same, I used the camera rig that comes with MRTK in both cases, I didn't touch any of the settings (light, quality, render, HDRP,...), the only difference is in the XR Plug-in Management:

correct visual output using steamcorrect visual output using steamincorrect visual output using Mixed Realityincorrect visual output using Mixed Reality

Can you please point me to the right direction to solve this problem? Are there some settings that should be different for Mixed Reality to work correctly with HDRP?

 

Thank you for your help.

3 Replies

@BDarVirtu Color Space is configurable depending on the platform (in Build settings), I'm guessing one is set to linar, the other is set to Gamma.

More info here : Unity - Manual: Linear or gamma workflow (unity3d.com)

@valentinlgsThe render settings are the same, the platform is the same. Gamma is set to linear. The only difference is in the XR plugin management. Literally, you can just switch the plugin in XR management, hit play and you can right away see the change in HMD. (even though in the editor everything looks the same)

best response confirmed by BDarVirtu (New Contributor)
Solution

@BDarVirtuSo finally I was able to pinpoint the problem. The Gamma settings actually need to be different, for the render to look the same. If I use Open VR, and the Color space in player settings is set to Linear, the render looks correctly. If I switch to Mixed reality, I need to switch the color space to Gamma. But I would be happier with a solution that lets me use Linear color space and somehow informs mixed reality that this is a color space I am actually planning to use, not the other way around... Hopefully, this is just a bug or can be adjusted somewhere in Windows Mixed Reality settings...