HMD Display Optics and Microdisplays I!

38
HMD Display Optics I Gordon Wetzstein Stanford University EE 267 Virtual Reality Lecture 7 stanford.edu/class/ee267/

Transcript of HMD Display Optics and Microdisplays I!

Page 1: HMD Display Optics and Microdisplays I!

HMD Display Optics I!

Gordon Wetzstein!Stanford University!

!

EE 267 Virtual Reality!

Lecture 7!stanford.edu/class/ee267/!

!

Page 2: HMD Display Optics and Microdisplays I!

Lecture Overview!

1.  stereo rendering for HMDs!2.  lens distortion correction using GLSL!

Page 3: HMD Display Optics and Microdisplays I!

All Current-generation VR HMDs are “Simple Magnifiers”!

1. Stereo Rendering for HMDs!

Page 4: HMD Display Optics and Microdisplays I!

Image Formation!

HMD!

lens!

Side View!

micro display!

Page 5: HMD Display Optics and Microdisplays I!

Image Formation!

HMD!

lens!

Side View!

deyeeye relief!

micro display!

f

d '

h '

Page 6: HMD Display Optics and Microdisplays I!

Image Formation!

HMD!

virtual image!

Side View!

d

h

deyeeye relief!

lens!micro

display!

f

d '

h '

Page 7: HMD Display Optics and Microdisplays I!

Image Formation!

HMD!

virtual image!

Side View!

d

1d+ 1d '

= 1f

! d = 11f" 1d '

Gaussian thin lens formula:!

h

deyeeye relief!

lens!micro

display!

f

d '

h '

Page 8: HMD Display Optics and Microdisplays I!

Image Formation!

HMD!

virtual image!

Side View!

d

1d+ 1d '

= 1f

! d = 11f" 1d '

Gaussian thin lens formula:!

Magnification:!

M = ff ! d '

" h = Mh '

h

deyeeye relief!

lens!micro

display!

f

d '

h '

Page 9: HMD Display Optics and Microdisplays I!

Image Formation!virtual image!

Side View!

d

h

eye relief!

deye

view frustum symmetric!

Page 10: HMD Display Optics and Microdisplays I!

Image Formation!virtual image!

Side View!

d

h

eye relief!

deye

view frustum symmetric! near

clipping plane!

Page 11: HMD Display Optics and Microdisplays I!

Image Formation!virtual image!

Side View!

d

h

eye relief!

deye

view frustum symmetric!

zneartop!

bottom!

near clipping plane!

Page 12: HMD Display Optics and Microdisplays I!

Image Formation!virtual image!

Side View!

d

h

eye relief!

deye

view frustum symmetric!

zneartop!

bottom!

similar triangles:!near

clipping plane!

top = znearh

2 d + deye( )

bottom = !znearh

2 d + deye( )

Page 13: HMD Display Optics and Microdisplays I!

Image Formation!

Top View!eye relief!

deye

ipd!

d 'w '

HMD!

Page 14: HMD Display Optics and Microdisplays I!

Image Formation – Left Eye!

HMD!

Top View!

deyeeye relief!

w '2

ipd/2!

Page 15: HMD Display Optics and Microdisplays I!

HMD!

virtual image!

Top View!

d

w1

deyeeye relief!

w2

ipd/2!

Image Formation – Left Eye!

Page 16: HMD Display Optics and Microdisplays I!

HMD!

virtual image!

Top View!

d

w1

deyeeye relief!

w2

w1 = Mipd2

w2 = Mw '! ipd2

"#$

%&'

ipd/2!

Image Formation – Left Eye!

Page 17: HMD Display Optics and Microdisplays I!

virtual image!

Top View!

deye relief!

deye

view frustum asymmetric!

znear

near clipping plane!

w1

w2

Image Formation – Left Eye!

Page 18: HMD Display Optics and Microdisplays I!

virtual image!

Top View!

deye relief!

deye

view frustum asymmetric!

znear

right!

left!

near clipping plane!

w1

w2

Image Formation – Left Eye!

Page 19: HMD Display Optics and Microdisplays I!

virtual image!

Top View!

deye relief!

deye

view frustum asymmetric!

znear

right!

left!

similar triangles:!

right = znearw1

d + deye

left = !znearw2

d + deye

near clipping plane!

w1

w2

Image Formation – Left Eye!

Page 20: HMD Display Optics and Microdisplays I!

virtual image!

Top View!

deye relief!

deye

view frustum asymmetric!

w1

w2

Image Formation – Right Eye!

w1 = Mipd2

w2 = Mw '! ipd2

"#$

%&'

Page 21: HMD Display Optics and Microdisplays I!

virtual image!

Top View!

deye relief!

deye

view frustum asymmetric!

znearright!

left!

similar triangles:!

right = znearw2

d + deye

left = !znearw1

d + deyew1

w2

Image Formation – Right Eye!

Page 22: HMD Display Optics and Microdisplays I!

View Matrix - Lookat!

Top View!

d

h

eye relief!

deye

center point (right eye)!

center point (right eye)!

eye position (right eye)!

eye position (left eye)!

ipd!

Page 23: HMD Display Optics and Microdisplays I!

Prototype Specs!•! ViewMaster VR Starter Pack (same specs as Google

Cardboard 1):!

•! lenses focal length: 45 mm!•! lenses diameter: 25 mm!•! interpupillary distance: 60 mm!

•! distance between lenses and screen: 42 mm!!

•! Topfoison 6” LCD: width 132.5 mm, height 74.5 mm (1920x1080 pixels)!

Page 24: HMD Display Optics and Microdisplays I!

Image Formation!

•! use these formulas to compute the perspective matrix in WebGL!

•! you can use:! THREE.Matrix4().makePerspective(left,right,top,bottom,near,far) THREE.Matrix4().lookAt(eye,center,up)

!•! that’s all you need to render stereo images on the HMD!

Page 25: HMD Display Optics and Microdisplays I!

Image Formation for More Complex Optics!

•! especially important in free-form optics, off-axis optical configurations & AR!

•! use ray tracing – some nonlinear mapping from view frustum to microdisplay pixels!

•! much more computationally challenging & sensitive to precise calibration; our HMD and most magnifier-based designs will work with what we discussed so far!

Page 26: HMD Display Optics and Microdisplays I!

All lenses introduce image distortion, chromatic aberrations, and other artifacts – we need to correct

for them as best as we can in software!!

2. Lens Distortion Correction!

Page 27: HMD Display Optics and Microdisplays I!

image from: https://www.slideshare.net/Mark_Kilgard/nvidia-opengl-in-2016

•! grid seen through HMD lens!

•! lateral (xy) distortion of the image!

•! chromatic aberrations: distortion is wavelength dependent!!

Lens Distortion!

Page 28: HMD Display Optics and Microdisplays I!

Pincussion Distortion!

Lens Distortion!

Barrel Distortion!

Page 29: HMD Display Optics and Microdisplays I!

Pincussion Distortion!optical!

Lens Distortion!

Barrel Distortion!digital correction!

Page 30: HMD Display Optics and Microdisplays I!

Lens Distortion!

image from: https://www.slideshare.net/Mark_Kilgard/nvidia-opengl-in-2016

Page 31: HMD Display Optics and Microdisplays I!

Lens Distortion!

Barrel Distortion!digital correction!

xu , yu

Page 32: HMD Display Optics and Microdisplays I!

Lens Distortion!

Barrel Distortion!digital correction!

xd ! xu 1+ K1r2 + K2r

4( )yd ! yu 1+ K1r

2 + K2r4( )

xu , yu

r2 = xu ! xc( )2 + yu ! yc( )2

undistorted point!

xc , yc

radial distance from center!

center!

Page 33: HMD Display Optics and Microdisplays I!

Lens Distortion!

xd ! xu 1+ K1r2 + K2r

4( )yd ! yu 1+ K1r

2 + K2r4( )

xu , yu

r2 = xu ! xc( )2 + yu ! yc( )2

undistorted point!

xc , yc

radial distance from center!

center!

NOTES:!•! center is assumed to be the

center point (on optical axis) on screen (same as lookat center)!

•! distortion is radially symmetric around center point = (0,0)!

•! easy to get confused!!

•! typically implemented in fragment shader!

Page 34: HMD Display Optics and Microdisplays I!

Lens Distortion – Center Point!!

Top View!

d

h

eye relief!

deye

right eye!

xc , yc

xc , yc

left eye!

ipd!

Page 35: HMD Display Optics and Microdisplays I!

Lens Distortion Correction Example!

stereo rendering without lens distortion correction!

Page 36: HMD Display Optics and Microdisplays I!

Lens Distortion Correction Example!

stereo rendering with lens distortion correction!

Page 37: HMD Display Optics and Microdisplays I!

How to Render into Different Parts of the Window?!•! WebGLRenderer.setViewport(x,y,width,height)

•! x,y lower left corner; width, height viewport size !

(x1,y1) width1

height1

(x1,y1)

height2

height3

width3

width2

(x3,y3)(x3,y3)

(x2,y2)(x2,y2)

Page 38: HMD Display Optics and Microdisplays I!

Next Lecture: HMD Displays Optics II!

•! advanced VR & AR optics!•! microdisplays!

drawing from Google Glass patent!