{"action":"created","issue":{"url":"https://api.github.com/repos/sensics/OSVR-RenderManager/issues/79","repository_url":"https://api.github.com/repos/sensics/OSVR-RenderManager","labels_url":"https://api.github.com/repos/sensics/OSVR-RenderManager/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/sensics/OSVR-RenderManager/issues/79/comments","events_url":"https://api.github.com/repos/sensics/OSVR-RenderManager/issues/79/events","html_url":"https://github.com/sensics/OSVR-RenderManager/issues/79","id":151640252,"number":79,"title":"Center-of-Projection (COP) handling is wrong in UnrealEngine4 (or RenderManager) with our custom HMD","user":{"login":"ccll","id":5366582,"avatar_url":"https://avatars.githubusercontent.com/u/5366582?v=3","gravatar_id":"","url":"https://api.github.com/users/ccll","html_url":"https://github.com/ccll","followers_url":"https://api.github.com/users/ccll/followers","following_url":"https://api.github.com/users/ccll/following{/other_user}","gists_url":"https://api.github.com/users/ccll/gists{/gist_id}","starred_url":"https://api.github.com/users/ccll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccll/subscriptions","organizations_url":"https://api.github.com/users/ccll/orgs","repos_url":"https://api.github.com/users/ccll/repos","events_url":"https://api.github.com/users/ccll/events{/privacy}","received_events_url":"https://api.github.com/users/ccll/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"JeroMiya","id":320332,"avatar_url":"https://avatars.githubusercontent.com/u/320332?v=3","gravatar_id":"","url":"https://api.github.com/users/JeroMiya","html_url":"https://github.com/JeroMiya","followers_url":"https://api.github.com/users/JeroMiya/followers","following_url":"https://api.github.com/users/JeroMiya/following{/other_user}","gists_url":"https://api.github.com/users/JeroMiya/gists{/gist_id}","starred_url":"https://api.github.com/users/JeroMiya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeroMiya/subscriptions","organizations_url":"https://api.github.com/users/JeroMiya/orgs","repos_url":"https://api.github.com/users/JeroMiya/repos","events_url":"https://api.github.com/users/JeroMiya/events{/privacy}","received_events_url":"https://api.github.com/users/JeroMiya/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-04-28T13:24:32Z","updated_at":"2016-04-28T14:52:54Z","closed_at":null,"body":"Our team have been playing with OSVR-Unreal integration for 2 days, and encountered an significant issue where the rendered stereo images do not align in our HMD, the same object in left eye and right eye are too far away to create a combined stereoscopic view.\r\nThe same issue actually appeared when we're evaluating OSVR-Unity the first time, after we adjusted the `center_proj_x` setting to 0.6/0.4 according to the specs of our HMD, the views align perfectly.\r\n![vrgatecop](https://cloud.githubusercontent.com/assets/5366582/14886070/7572428c-0d81-11e6-9ae5-6b9131b522ba.png)\r\n\r\nNow with the same settings, they do not align any more in OSVR-Unreal, so I started messing with some parameters and capture the output from both Unity3D and UE4, and found out the difference.\r\n\r\nFirstly let's set the distortion to identity and set `center_proj_x` to a extremely biased value (for example 0.8/0.2).\r\n![withoutdistortion](https://cloud.githubusercontent.com/assets/5366582/14886202/33b07408-0d82-11e6-991d-0270f15b4f18.png)\r\nOutput from Unity3D:\r\n![unity](https://cloud.githubusercontent.com/assets/5366582/14886259/7afcc78a-0d82-11e6-8aa4-59aa1c3d8e2f.png)\r\nOutput from UE4:\r\n![ue4](https://cloud.githubusercontent.com/assets/5366582/14886266/82f76d14-0d82-11e6-9d84-e8a51bd7c7f5.png)\r\n\r\nIt's not very obvious what's wrong, let's add some odd distortion to visualize the 'center of projection'.\r\n![distortionparams](https://cloud.githubusercontent.com/assets/5366582/14886313/c045181a-0d82-11e6-9fa0-1e0b378f9c78.png)\r\nOutput from Unity3D: (you can see that when we put the boxes at the COP in left eye, the same boxes also appear at the COP in right eye, this is perfectly aligned to someone with a super-narrow IPD :)\r\n![unitydistorted](https://cloud.githubusercontent.com/assets/5366582/14886330/d58f5a6e-0d82-11e6-8ba9-0cda8383f7ac.png)\r\nOutput from UE4: (when boxes is put at the COP in left eye, the same boxes is way off in right eye)\r\n![ue4distorted](https://cloud.githubusercontent.com/assets/5366582/14886334/dc6e50d8-0d82-11e6-942b-beaa18f8e32f.png)\r\n\r\n\r\nI hope this may give some lead.\r\n\r\nP.S. Later I messed around with OSVR-Oculus-Rift plugin and a DK2, no matter what value is given to `center_proj_x`, the output looks great in UE4 (but unaligned in Unity3D unless `center_proj_x` is set to 0.5/0.5), I suppose it's because the actual physical COP of DK2 is exactly 0.5/0.5 where the output of OSVR-Unreal perfectly matches this metric. And another question arises, I see that HDK 1.3 is using a 0.471/0.529 COP setting from the sample config, so does it look correct in UE4?"},"comment":{"url":"https://api.github.com/repos/sensics/OSVR-RenderManager/issues/comments/215451747","html_url":"https://github.com/sensics/OSVR-RenderManager/issues/79#issuecomment-215451747","issue_url":"https://api.github.com/repos/sensics/OSVR-RenderManager/issues/79","id":215451747,"user":{"login":"JeroMiya","id":320332,"avatar_url":"https://avatars.githubusercontent.com/u/320332?v=3","gravatar_id":"","url":"https://api.github.com/users/JeroMiya","html_url":"https://github.com/JeroMiya","followers_url":"https://api.github.com/users/JeroMiya/followers","following_url":"https://api.github.com/users/JeroMiya/following{/other_user}","gists_url":"https://api.github.com/users/JeroMiya/gists{/gist_id}","starred_url":"https://api.github.com/users/JeroMiya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeroMiya/subscriptions","organizations_url":"https://api.github.com/users/JeroMiya/orgs","repos_url":"https://api.github.com/users/JeroMiya/repos","events_url":"https://api.github.com/users/JeroMiya/events{/privacy}","received_events_url":"https://api.github.com/users/JeroMiya/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T14:52:54Z","updated_at":"2016-04-28T14:52:54Z","body":"There is a fix in the works for the projection code to use the overfill-adjusted projections from RenderManager. In the meantime, could you set your renderOverfillFactor to 1.0 in your renderManagerConfig and see if that improves your center of projection? It still won't be exactly right (the RM projection and the OSVR-Core projection clipping planes are still slightly different even with renderOverFillFactor of 1.0), but it should be closer.\r\n\r\nIf it's still off, let us know."}}