GithubHelp home page GithubHelp logo

Comments (18)

JeroMiya avatar JeroMiya commented on August 16, 2024

There is a fix in the works for the projection code to use the overfill-adjusted projections from RenderManager in OSVR-Unreal. 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.

If it's still off, let us know.

from osvr-rendermanager.

ccll avatar ccll commented on August 16, 2024

@JeroMiya Thanks for the tip, I've tried your solution but unfortunately it's still off.
OverfillFactor 1.5:
ue4-overfill-1_5
OverfillFactor 1.0:
ue4-overfill-1_0

from osvr-rendermanager.

russell-taylor avatar russell-taylor commented on August 16, 2024

See https://github.com/OSVR/OSVR-Docs/blob/master/Configuring/projectionAndViewMatrices.md for a description of the OSVR RenderManager transformations. Details of the meanings for center of projection, fields of view, overlap percentage and so forth are in https://github.com/OSVR/OSVR-Docs/blob/master/Configuring/distortion.md and to see how to programmatically set them from a new HMD along with distortion correction, see https://github.com/OSVR/distortionizer/blob/master/angles_to_config/doc/anglesToConfig.md

from osvr-rendermanager.

russell-taylor avatar russell-taylor commented on August 16, 2024

It is correct that the DK2 has its eyes centered on the halfs of the screen, so has 0.5 as its X COP. The OSVR HDK has slightly offset centers of projection, as reflected in the different offsets.

from osvr-rendermanager.

ccll avatar ccll commented on August 16, 2024

@russell-taylor Thanks for the guides, I thought I've read these thoroughly and fully understanding what the COP means, I'll read these again to ensure nothing is missed, but for now I still suppose the problem is not on our side, because in UE4 center_proj_x only changed 'the center of the radial distortion', while in Unity3D it changed both 'the center of the radial distortion' and 'the center of the rendered image', and our HMD looks correct in Unity3D.

Meanwhile I've accidentally found out that when our display resolution is set to 1920x1080 as the same as DK2, the views align correctly in UE4, but in full resolution 2560x1440 views do not align and looks far apart just as I reported previously, hope this can give some lead.

from osvr-rendermanager.

russell-taylor avatar russell-taylor commented on August 16, 2024

Glad to hear that you had already found the docs. As Jeremy said, there is a fix in the works for UE4 that uses the RenderManager projection matrices that should help on that platform.

from osvr-rendermanager.

JeroMiya avatar JeroMiya commented on August 16, 2024

It should already be merged into master.

from osvr-rendermanager.

ccll avatar ccll commented on August 16, 2024

@JeroMiya Nice to hear that! I would like to known when will this be included in the pre-compiled binaries.

from osvr-rendermanager.

ccll avatar ccll commented on August 16, 2024

@russell-taylor @JeroMiya I've updated both OSVR-Runtime and OSVR-Unreal to the latest version, OSVR-Runtime to v0.6-1194-g0c54f5e, OSVR-Unreal to b60d5d, and still no luck.
I suppose the 'projection matrices fix' you mentioned is in commit 0f51e9, unfortunately after this commit the left and right eye looks even further away in HMD.

from osvr-rendermanager.

russell-taylor avatar russell-taylor commented on August 16, 2024

If things are working for you in the RenderManager example programs and Unity, then it looks like we need to take another look at the Unreal plug-in to see what is going on. If it fails in all three, we'll need to take another look at RenderManager and/or how the configuration files match the HMD.

from osvr-rendermanager.

ccll avatar ccll commented on August 16, 2024

@russell-taylor Just confirmed, it's PERFECT in both the RenderManager example and Unity, the issue only appears in Unreal.

from osvr-rendermanager.

russell-taylor avatar russell-taylor commented on August 16, 2024

We're looking into this with a device we have, which reproduces the problem. Testing with a current build of and Unreal demo. Failing that, we'll take a look at the following:

[4:25 PM] Jeremy Bell: here is where the projection is calculated: https://github.com/OSVR/OSVR-Unreal/blob/rel-ue-4.12/OSVRUnreal/Plugins/OSVR/Source/OSVR/Private/OSVRHMDDescription.cpp#L255 which we call from here: https://github.com/OSVR/OSVR-Unreal/blob/rel-ue-4.12/OSVRUnreal/Plugins/OSVR/Source/OSVR/Private/OSVRHMD.cpp#L650
[4:26 PM] Jeremy Bell: And this is where we get the projection clipping planes from render manager: https://github.com/OSVR/OSVR-Unreal/blob/rel-ue-4.12/OSVRUnreal/Plugins/OSVR/Source/OSVR/Private/OSVRCustomPresentD3D11.h#L164

from osvr-rendermanager.

russell-taylor avatar russell-taylor commented on August 16, 2024

We've gotten this fixed in the latest master of RenderManager, and it has been tested in the latest Unreal. We replaced the projection transforms used by the Unreal plug-in with ones that work in this case.

from osvr-rendermanager.

JeroMiya avatar JeroMiya commented on August 16, 2024

@russell-taylor have we actually tested with the above configuration from @ccll? Also the OSVR-Unreal branch that uses the new API isn't merged yet. I haven't done regression testing with the QAGAME map and Unreal 4.13 build-from-source yet.

from osvr-rendermanager.

ccll avatar ccll commented on August 16, 2024

@russell-taylor I've sent you an email ([email protected]) with our HMD config json attached, hope that can help debugging the issue.

@JeroMiya Sorry but I couldn't find your email on Github.

from osvr-rendermanager.

JeroMiya avatar JeroMiya commented on August 16, 2024

Here is OSVR-Unreal with the updated projection code. This is the "extreme" configuration above used to demo the issue. Also, I'm using a renderOverfillFactor of 1.5 in this screenshot.

image

from osvr-rendermanager.

ccll avatar ccll commented on August 16, 2024

@JeroMiya Great! It looks correct in the screenshot, I'm curious how it looks like in the VRGate HMD.

from osvr-rendermanager.

JeroMiya avatar JeroMiya commented on August 16, 2024

@ccll This is now merged into OSVR-Unreal:

OSVR/OSVR-Unreal#75

from osvr-rendermanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.