This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License
Mike Bailey mjb@cs.oregonstate.edu
Computer Graphics
Dome Projection using a Vertex Shader
dome.pptx
mjb – December 15, 2020
1
Computer Graphics
Dome Projection – Becoming more Common
2
I believe that it’s only a matter of time until it becomes a routine visualization tool
mjb – December 15, 2020
Computer Graphics
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
mjb – December 15, 2020
Computer Graphics
Dome Distortion
4
Move the teapot so it surrounds the audience
mjb – December 15, 2020
Viewing Volume = (-1,-1) to (1,1)
Dome Projection:
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
}
God’s-eye View:
As the eye sees it: From the side: YY
Computer Graphics
pos.y pos.z Θ
Φ X Z pos.x
pos.y
Θ X Z Φ
lenxy = sqrt(x2 + y2)
const float PI = 3.14159265;
void main( ) {
Dome Vertex Shader:
6
vec4 pos = gl_ModelViewMatrix * gl_Vertex;
float lenxy = length( pos.xy );
Note: ( pos.xy / lenxy ) = ( cosΘ,sinΘ )
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
mjb – December 15, 2020
Computer Graphics
Cartesian:
Dome:
Dome Vertex Shader:
7
mjb – December 15, 2020
Computer Graphics
Dome Vertex Shader:
8
Dome:
mjb – December 15, 2020
Computer Graphics
Flow Visualization in the Dome
9
mjb – December 15, 2020
Computer Graphics
Mars Panoram in the Dome
10
mjb – December 15, 2020
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