This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License
Computer Graphics
1
Dome Projection using a Vertex Shader
Mike Bailey mjb@cs.oregonstate.edu
dome.pptx
mjb – December 15, 2020
1
Dome Projection – Becoming more Common
2
Computer Graphics
mjb – December 15, 2020
I believe that it’s only a matter of time until it becomes a routine visualization tool
2
1
Programming a Dome display is easier when only a single projector is used
3
A fisheye lens distorts the image so that it spreads out across the dome. The trick is pre-distorting the image in the other direction so that it looks correct after being projected
Computer Graphics
mjb – December 15, 2020
3
Dome Distortion
Move the teapot so it surrounds the audience
4
Computer Graphics
mjb – December 15, 2020
4
2
Dome Projection:
Viewing Volume = (-1,-1) to (1,1)
5
The edge of the circle represents the edge of the dome projection = your left, right, bottom, top as you are sitting in the theater.
Computer Graphics
mjb – December 15, 2020
5
God’s-eye View:
pos.z Θ Φ
pos.x
Dome Vertex Shader:
As the eye sees it: From the side: YY
6
lenxy = sqrt(x2 + y2)
pos.y
Z
X pos.y
Θ XZ Φ
const float PI = 3.14159265;
void main( ) {
}
vec4 pos = gl_ModelViewMatrix * gl_Vertex; float lenxy = length( pos.xy );
float phi = atan( lenxy , -pos.z ); pos.xy=(phi/(PI/2.)) * (pos.xy/lenxy);
gl_Position = gl_ProjectionMatrix * pos;
pos.x eye position
pos.z
Computer Graphics
mjb – December 15, 2020
Note: ( pos.xy / lenxy ) = ( cosΘ,sinΘ )
6
3
Dome Vertex Shader:
Cartesian:
7
Dome:
Computer Graphics
mjb – December 15, 2020
7
Dome Vertex Shader:
Dome:
8
Computer Graphics
mjb – December 15, 2020
8
4
Flow Visualization in the Dome
9
Computer Graphics
9
mjb – December 15, 2020
Mars Panoram in the Dome
10
Computer Graphics
mjb – December 15, 2020
10
5
Large Lines and Polygons Need to be Tessellated
11
Note: This edge does not pass through the flow vectors!
Note: This edge does pass through the flow vectors!
Bounding Box edges were not tessellated. Straight lines on the monitor produced curved lines on the dome.
Bounding Box edges were tessellated. Curves lines on the monitor produced straight lines on the dome.
Computer Graphics
mjb – December 15, 2020
11
6