Forum Discussion
SPEShane
11 years agoHonored Guest
Double Vision at certain depths
I'm attempting to get a quick Oculus prototype running with one of our old game engines (Vicious Engine 1), and I'm still working on getting stereoscopic 3D working. I've read the docs, and I feel like I understand the concept, but I can't seem to get a proper 3D image. At this point, I'm not worried about distortion, I'm just trying to get the stereoscopic viewports working. Right now, I have two viewports, each offset from the center of the player, parallel to each other. However, I have to toy with the IPD, and once I get it right while looking at an object, it becomes incorrect for other objects further (or closer) distance away. And as soon as I move away from the object I was looking at, that object also becomes doubled. So my question is, what am I doing wrong? Or, does anyone more experienced know what I'm doing that's causing this?
Thanks for your help,
Shane
Thanks for your help,
Shane
5 Replies
- klasodethHonored GuestSilly question, but have you checked to make sure you don't have your viewpoints swapped?
- SPEShaneHonored GuestAfter a few tests that doesn't appear to be what's wrong. The way I have this set up I am not using the Oculus SDK whatsoever. Would using the Oculus SDK help out in this first step? I know the SDK includes stuff for the distortion mesh and head tracking, but is there anything important in there for just setting up the correct viewports?
- klasodethHonored GuestWould you mind posting some screenshots illustrating the problem? It might help to see what the problem actually looks like.
- renderingpipeliHonored Guest
"SPEShane" wrote:
After a few tests that doesn't appear to be what's wrong. The way I have this set up I am not using the Oculus SDK whatsoever. Would using the Oculus SDK help out in this first step? I know the SDK includes stuff for the distortion mesh and head tracking, but is there anything important in there for just setting up the correct viewports?
I would highly suggest using the SDK for the view and projection matrices as well as the distortion. Those things are easy to get wrong in subtle ways which can cause increased motion sickness in the long run.
It sounds like you try to render the two eyes with an average IPD in "parallel-shift" stereo: the two view frusta are just moved outwards. That's not how the Rift works. If you check the docs of the SDK, you will find a translation added to the projection matrix from left (OpenGL style) meaning it's not moving the camera but changing the projection to a "off-axis" projection. Simple speaking: The amount of screen (for one eye) an eye sees in the Rift is not equal on the left and right. Sounds like you got this bit of the matrix wrong.
Note that the projection matrix is depending on the users eye positions (not only one IPD value!) and the Rift itself. Even if you get it right for you now, it can be wrong for the next person (unless you read the user calibration data from the SDK) and it could also be wrong for the next Rift...
It is not hard to use the SDK just for the matrices (which also gives you tracking!). Ideally you would also let the SDK handle the distortion (free async time-warp as soon as that works!). - SPEShaneHonored GuestI've been diving deeper into the docs, and saw the stuff about the differing projection matrices. And after your explanation, that sounds like what I'm missing. Thanks for the help, I'll post an update once I get everything working correctly to hopefully clear things up for anyone else in my position in the future.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 months ago
- 3 months ago
- 7 months ago