Forum Discussion
genetransfer
13 years agoExplorer
EyeToScreenDistance...
I was just wondering, if the HMD sends this data to EyeToScreenDistance in the info based on user adjustment realtime or is just a fixed value at present.
being it's used to calculate the FOV, is this something that has to be manually computed currently? also does the different lens types A,B,C get taken into account. at present the value is 0.041f and was just wondering. I don't have my rift yet but was curious about this, so I guess I'll find out when it gets here but was wondering if anybody had any info on it while I'm waiting.
being it's used to calculate the FOV, is this something that has to be manually computed currently? also does the different lens types A,B,C get taken into account. at present the value is 0.041f and was just wondering. I don't have my rift yet but was curious about this, so I guess I'll find out when it gets here but was wondering if anybody had any info on it while I'm waiting.
6 Replies
- tlopesHonored GuestI'm not sure if the SDK knows this (it may be using the center of the lens or some other known, fixed value). Team Fortress 2 asks you to enter which lens you're using (A, B, or C) because it can't query that info from the SDK, so it's likely that the EyeToScreenDistance is not derived from your lens type.
- jhericoAdventurer
"genetransfer" wrote:
I was just wondering, if the HMD sends this data to EyeToScreenDistance in the info based on user adjustment realtime or is just a fixed value at present.
being it's used to calculate the FOV, is this something that has to be manually computed currently?
It's hard-coded into the SDK at the moment, although it uses different values depending whether the early 5 in prototypes, the DK1, or the 1080p prototype are detected. In addition, you can fetch the values out of the device itself via an HID feature report query, but the SDK doesn't seem to use this for the EyeToScreenDistance value. Neither has any way of physically detecting the current Rift adjustments, nor do I see any code that changes the value based on the lenses you've specified in the config utility. - goddardExplorerI think the EyeToScreenDistance value should depend on which set of lenses A, B, or C are being used. Also I think the optimal value to give the field of view which is most correct, having minimum distortion, is not 41 millimeters as the SDK reports, but closer to 47 millimeters if you are using the A lenses, 44 mm if you are using the B lenses and 40 mm if you are using the C lenses for the developer kit 1 (DK1). This conclusion is based on tests and measurements, but I am not sure if it is correct. I'll give the details.
I added code to a molecular visualization program I work on called UCSF Chimera to use the oculus rift. I do radial warping and chromatic aberration correction in the shader in OpenGL and have the head tracking working. My effort has been to tune this to get the lowest distortion and lowest latency I can. This post is about the distortion issues.
I noticed when using the 41 mm EyeToScreenDistance that turning my head seemed to cause the scene (I'm in the middle of a 3-dimensional cross-linked net of collagen filaments from optical microscopy) to appear to rotate slightly (maybe 5 degrees) away from me as I turn 45 degrees. In other words if I turn my head to the left, the scene appears to rotate slightly about the vertical axis spinning to the left. I say it looks like a rotation, but I believe the cause is really that the depth of different parts of the scene appear to subtly change. This seemed most likely to be caused by incorrect radial warping, or warping using the wrong field of view. My shader code follows the Oculus SDK Overview (version 0.2.5) pdf closely and I could not find any problem with my code after extensive tests. So I started looking at parameters. First I just tried changing the field of view in degrees and visually testing the effect. A 10% wider field of view caused even more perception of rotation, a 10% smaller field of view removed the apparent rotation, and a 20% smaller field of view reversed the direction of the apparent rotation. So I took a close look at how I was computing field of view.
The EyeToScreenDistance is used to determine the field of view and is reported as 41 mm by the SDK. From my understanding of optics and the formula they give for field of view this distance is a bit misleadingly named -- it in fact should be the distance from the center of the lens to the screen. By the center of the lens I mean half way through the thickness of the lens at its center to the screen. I measured this value and it is 47 mm for the A lenses, 44 mm for the B lenses, and 40 mm for the C lenses. I may be off by 1 or 2 mm but I tried to make the measurements carefully. Using the 47 mm distance gives nearly exactly the 10% reduction in field of view that empirically I found to fix the apparent rotation. Maybe this was coincidence. So I put in the C lenses and tested those. The 40 mm distance then worked best with 47 mm giving a noticeable rotation. So it appears that this idea that the field of view should depend on the lenses and that the EyeToScreenDistance should really be LensToScreenDistance and depends on which lenses you use may be correct. You should understand that this is a pretty subtle effect. To see the apparent rotation I describe requires close attention while turning your head, but the difference is enough that a slight feeling of nausea with the wrong field of view is apparent to me.
As mentioned in an earlier reply the Oculus SDK does not report different EyeToScreenDistance values based on which lens you specify in the configuration tool. The previous post cited the source code, and I tested it empirically by changing the lens choice with the configuration program and running my code to see what distance value it reported -- always 41 mm.
I noticed a second disturbing shape distortion effect during my tests. What I described above was with my eyes physically very close to the A lenses. I have the extension bellows of the goggles adjust almost all the way to the closest eye-to-lens position. But if I crank out the bellows to leave much more space between my eyes and the lenses, say to put my glasses on, then there is a new slightly nauseating distortion on close inspection. As I turn my head and an object goes from right edge to center to left edge of the field of view, that object appears to move slightly closer in the center position. So I see the object get closer then farther, relative to what you would expect for a fixed object. It appears like a ripple distortion rather than a rotation -- far then near then far. Again it is rather subtle, but its nauseating power is easy to feel. This again looks like an error in the radial warping. I suspect that the radial warping parameters would need to be different if your eyes are further from the lenses versus if your eyes are closer to the lenses. Unfortunately it is a quite significant effect. The oculus configuration tool doesn't have any setting for this (eye-to-lens distance) so the SDK can't give you different radial distortion parameters. I was also curious whether the radial distortion parameters (1, 0.22, 0.24, 0 for DK1) would change if I specified different lenses A, B, C in the configuration tool. They do not change. Probably a careful understanding of the optical paths could suggest how the radial warping parameters need to change as the eye moves further from the lens. I have not investigated.
Unfortunately it seems that quite noticeable distortion effects, ones that give a subtle feeling a nausea, unless the field of view and warping parameters are just right, and the SDK does not appear to help you get them just right -- it depends on physical parameters (which lenses and how far your eyes are from the lenses) that the hardware cannot automatically detect. - cleverusernameExplorer
But if I crank out the bellows to leave much more space between my eyes and the lenses, say to put my glasses on, then there is a new slightly nauseating distortion on close inspection.
I just went to my eye doc a few days ago, he didn't know about the rift but now is calling me after I showed him a picture of Palmer wearing one! oops! LOL! Anyways he wanted me to get trifocal glasses, and I kept explaining to him I need computer glasses that will best help me using the HMD. So he ordered me a pair of glasses just to use while on the rift with a 14 inch focusing distance and a pair of bifocals for everyday life, I said why that distance, he said that is normal for most computer programmers, and I explained you understand though the screen is only an inch or so out but the lenses focuses to infinity, he said if you are a computer programmer, looking at a screen, foot to 2 feet is what many people sit back from the screen, I said here though, look at this HMD (and showed him a picture on my cellphone), that is going to be on my head a lot, are you POSITIVE that 14 inch focused computer glasses are right, he said he would get back to me. So there is confusion even among eye doctor professionals. Needs more clarification, ANYTHING to reduce nausea Maybe we need to consider options that are not "standardized" but a custom HMD with personalized lenses, 3d printing type technologies?
- brantlewAdventurer@goddard: You have no idea how far down the rabbit-hole this all goes. Distortion correction is an insidiously complex problem with a great number of variables. The next major SDK update will go a long way towards addressing a more complex and customizable model of distortion.
- smcmahonHonored Guest
"goddard" wrote:
As mentioned in an earlier reply the Oculus SDK does not report different EyeToScreenDistance values based on which lens you specify in the configuration tool. The previous post cited the source code, and I tested it empirically by changing the lens choice with the configuration program and running my code to see what distance value it reported -- always 41 mm.
Appreciate you testing this. I was wondering about some of the other settings pulled by the SDK as well. For instance, are horizontal screen size and vertical screen size also hard coded in, or are they dynamic? As well as the "lensseparationdistance".
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
- 10 years ago
- 13 years ago