rasterization pipeline
DESCRIPTION
Rasterization Pipeline. Rasterization Clipping. Rasterization costs. Per vertex Lighting calculations Perspective transformation Slopes calculation Per pixel Interpolations of z, c (and leading trailing edges, amortized) Read, compare, right to update the z-buffer and frame buffer. - PowerPoint PPT PresentationTRANSCRIPT
1Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Rasterization Pipeline
Rasterization Clipping
2Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Rasterization costs
Per vertex– Lighting calculations– Perspective transformation– Slopes calculation
Per pixel– Interpolations of z, c (and leading trailing edges, amortized)– Read, compare, right to update the z-buffer and frame buffer
3Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Acceleration techniques
Reduce per pixel cost– Reduce resolution– Back-face culling
Reduce per vertex cost– T-strips and fans– Frustum culling– Simplification– Texture map
Reduce both– Occlusion culling
4Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Back-face culling
Done in screen space by hardware Test sign of (xB-xA) (yC-yA) - (xC-xA) (yB-yA)
AB
C
5Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
T-strips and fans
Reuse 2 vertices of last triangle
fan strip
Was important when hardware had only 3 registers
Less important in modern graphics boards
Saves nearly 2/3 of vertex processingA vertex is still processed twice on average
6Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Frustum culling
Build a tight sphere around each object– Center it at C=((xmax+xmin)/2, (ymax+ymin)/2, (zmax+zmin)/2 )– Compute radius r as min||CV|| for all vertices V
Test the sphere against each half-space of the frustum– If N•(EC)<-r then sphere is outside
NE
C
7Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Simplification
Collapse edges
NA B
Collapse A to B if |N•(AB)|<e Or use better error estimates
8Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Vertex clustering (Rossignac-Borrel)
Subdivide box around object into grid of cells Coalesce vertices in each cell into one “attractor” Remove degenerate triangles
– More than one vertex in a cell– Not needed for dangling edge or vertex
9Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Vertex clustering example
10Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Hausdorff distance between T-meshes
Expensive to compute, – because it can occur away from vertices and edges!
AA BB
The point of B that The point of B that is furthest away is furthest away from A is closest to from A is closest to 3 points on A that 3 points on A that are inside facesare inside faces
11Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
What is the error produced by edge collapses?
Volume of the solid bounded by old and new triangles– requires computing their intersection
Exact Hausdorff distance between old and new triangles– expensive to compute precisely
Distance between v and planes of all triangles incident on collapsed vertices– one dot product per plane (expensive, but guaranteed error bound)
Quadratic distance between v and planes old triangles– evaluate one quadratic form representing all the planes (cheap but not a bound)– leads to closed form solution for computing the optimal V’ (in least square sense)
Estimating edge-collapse error
v’v’ vv
12Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Measuring Error with Quadrics (Garland) Given plane P, and point v, we can define a quadric distance Q(v) = D(v,P)2
– P goes through point p and has normal N– D(v,P) = pvN– Q(p) = (pvN)2, which is a quadratic polynomial in the coordinatges of v– If v=(x,y,z), Q(p)=a11x2+a22y2+a33z2+2a23yz+2a13xz+2a12xy+2b1x+2b2y+2b3z+c
Q may be written represented by 3x3 matrix A,a vector b,and a scalar c Q(v) may be evaluated as v(Av)+2bv+c
– or in matrix form as:
[ ] [ ] czyx
bbbzyx
aaaaaaaaa
zyx
cQ
+⎥⎥⎦
⎤⎢⎢⎣
⎡+⎥
⎥⎦
⎤⎢⎢⎣
⎡⎥⎥⎦
⎤⎢⎢⎣
⎡
++=
321332313232212131211
2
2)( vbvAvv TT
13Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Optimal position for v Pick v to minimize average distance to planes Q(v)
– set dQ(v)/dv = 0, which yields: v = -A-1 b
14Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Q(v) measures flatness Isosurfaces of Q
– Are ellipsoids– Stretch in flat direction– Have eigenvalues proportional to the principal curvatures
15Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Texture map
Replace distant details with their images, pasted on simplified shapes or even no flat bill-boards
16Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Texture mapping
textureMode(NORMALIZED); PImage maya = loadImage(maya.jpg"); beginShape(QUADS); texture(maya); vertex(-1, 1, 1, 1, 1); vertex( 1, 1, 1, 0, 1); vertex( 1, -1, 1, 0, 0 ); vertex(-1, -1, 1, 1, 0); …endShape();
17Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Occlusion culling
Is ball containing an object hidden behind the triangle?
18Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Occlusion culling in urban walkthrough
From Peter Wonka Need only display a few facades--the rest is hidden
19Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Shadows / visibility duality Point light source
– Shadow (volume): set of points that do not see the light From-point visibility
– Occluded space: set of points hidden from the viewpoint
Area light source (assume flat for simplicity)– Umbra: set of points that do not see any light– Penumbra: set of points that see a portion of the light source– Clearing: set of points that see the entire light source
From-cell visibility (cell C)– Hidden space: set of points hidden from all points in C– Detectable space: set of points seen from at least one point in C– Exposed space: set of points visible from all points in C
20Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
From-point visibility What is visible from a given viewpoint
– Not from a given area
Usually computed at run-time for each frame– Should be fast– Or done in background before the user starts looking around
May be pre-computed for a set of important viewpoints– Can be slower– User will be invited to jump to these (street crossings)– Or to navigate along pre-computed paths (videos)
May be useful for pre-computing from-cell visibility– Which identifies all objects B that are invisible when the
viewpoint is in a cell A– The cell may be reduced to a trajectory (taxi metaphor)
21Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
From-point visibility
Viewpoint/light = {a} (a single point)
HIDDEN DETECTED CLEAR
22Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Zen break
The moon is a perfect ball It is full and perfectly clear You see it through your window You wonder about the meaning of life You trace its outline on the glass
Is is a circle?
Can you prove it?
23Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Nothing is perfect
In general, the outline of the moon is an ellipse Proof:
– The pencil of rays from your eye to the moon is a cone– The intersection of that cone with the window if a conic– If the moon is clear and visible through the window: it is an ellipse– When the window is orthogonal to the axis of the cone: it is a
circle
24Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Cherchez la lune
The moon is a ball B(c,r) of center c and radius r The occluder is a triangle with vertices d, e, and f Assume viewer is at point a Write the geometric formulae for testing whether the moon
is hidden behind the triangle
HIDDEN DETECTED CLEARde
f
c
25Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
When does a triangle appear clockwise?
When do the vertices d, e, f, of a triangle appear clockwise when seen from a viewpoint a?
clockwise de
f
counter-clockwiseed
f
26Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
A triangle appears clockwise when
The vertices d, e, f, of a triangle appear clockwise when seen from a viewpoint a when s(a,d,e,f) is true
Procedure s(a,d,e,f) {RETURN ad•(aeaf)>0}– ad•(aeaf) is a 3x3 determinant– It is called the mixed product (or the triple product)
clockwise
de
f
counter-clockwise
ed
f
a a
27Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Testing a point against a half-space?
Consider the plane through points d, e, and f– It splits space in 2 half-spaces
Consider the half-space H of all points that see d, e, f clockwise
How to test whether point c is in H?
clockwise
de
f
c
28Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Testing a point against a half-space
Consider the plane through points d, e, and f Consider the half-space H of all points that see d, e, f
clockwise A point c is in H when s(c,d,e,f)
s(c,d,e,f) {RETURN cd•(cecf)>0}
clockwise
de
f
c
29Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Is a point hidden by a triangle?
Is point c hidden from viewpoint a by triangle (d, e, f)?– Write down all the geometric test you need to perform
de
f
a
c
30Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Test whether a point is hidden by a triangle
To test whether c is hidden from a by triangle d, e, f do– IF NOT s(a,d,e,f) THEN swap d and e– IF NOT s(a,d,e,c) THEN RETURN FALSE– IF NOT s(a,e,f,c) THEN RETURN FALSE– IF NOT s(a,f,d,c) THEN RETURN FALSE– IF s(c,d,e,f) THEN RETURN FALSE– RETURN TRUE Clockwise from a
de
f
a
c
31Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Testing a ball against a half-space?
Consider the half-space H of all points that see (d, e, f) clockwise
When is a ball of center c and radius r in H?
Clockwise from a
de
f
c
32Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Testing a ball against a half-space
Consider the half-space H of all points that see (d, e, f) clockwise
A ball of center c and radius r is in H when:
ec • (edef) > r ||edef||
Clockwise from a
de
f
c
33Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Is the moon hidden by a triangle?
Is the ball of center c and radius r hidden from a by triangle with vertices d, e, and f?
Clockwise from ade
f
a
c
34Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Is the moon hidden by a triangle?
To test whether the ball of center c and radius r hidden from a by triangle with vertices d, e, and f do:– IF NOT s(a,d,e,f) THEN swap d and e– IF ac • (adae) < r || adae || THEN RETURN FALSE– IF ac • (aeaf) < r || aeaf || THEN RETURN FALSE– IF ac • (afad) < r || afad || THEN RETURN FALSE– IF ec • (edef) < r || edef || THEN RETURN FALSE– RETURN TRUE
Explain what each line tests Are these test correct? Are they sufficient?
Clockwise from ade
f
a
c
35Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Is the moon hiding a triangle?
Triangle d, e, f is hidden from viewpoint a by a ball of center c and radius r when its 3 vertices are (hidden).– Proof?– How to test it?
Hidden moond
f
c
Hidden triangle
d
f
c
ee
36Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
When is a planar set A convex?
seg(p,q) is the line segment from p to qA is convex ( pA qA seg(p,q)A )
pp qq
ppqq
pp
37Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
What is the convex hull of a set A?
The convex hull H(A) is the intersection of all convex sets that contain A.
38Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Is a convex occluder hiding a polyhedron?
A polyhedron P is hidden by a convex occluder O if all of its vertices are– Proof?– Is a subdivision surface hidden if its control vertices are?
We do not need to test all of the vertices– Only those of a container (minimax box, bounding ball, convex
hull)• Proof?
– Only those on the silhouette of a convex container• Proof?
What if the occluder is not convex?– Can it still work?
39Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Strategies for non-convex occluders?
What if O is not convex?– replace O by an interior ball
• Not easy to compute a (nearly) largest ball inside O• The average of the vertices of O may be outside of O
– replace O by an interior axis-aligned box• Not easy to compute a largest box inside
– replace O by a convex set it contains• O may be too thin
Andujar, Saona NavazoCAD, 32 (13), 2000
40Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
The Hoop principle
The occluder does not have to be convex, provided that a portion of its surface appears convex to the viewer and that the object is behind it.
41Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Hoop from non-convex occluders
Pick a candidate occluder S– large triangle mesh – close to the viewer
Select a set D of triangles of S whose border C is a hoop:– single loop– that has a convex projection on the screen
Build a shield O– on plane behind D– bounded by projection of C
O is a convex occluder– anything hidden by O– is hidden by D– and hence by S– sure?
OCD
S
42Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
When does a 3D polyloop appear convex?
Each pair of consecutive edges defines a linear half-space from where their common vertex appears convex.
The portion of space from which a loop C of edges appears convex is the intersection of these half-spaces or of their complements.
43Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Two strategies for building hoops
Grow a patch D on the surface S, or Grow a curve C on the boundary of interior octree cells
– simplify it, ensuring that the simplified border lies inside the solid
44Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Testing against a hoop
Given a hoop C, we can easily test whether the viewpoint or a whole cell sees it as convex.– Test whether the viewpoint (or whether all the vertices of the
cell,) lie in the intersections of all half-spaces.
But this is not sufficient if we want to construct a shield from it.– Why not?We must ensure that the shield O is behind the portion D
of the original surface S that is bounded by C.
45Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Ensuring that O is behind D
Store with the hoop the thickness
(depth of projection of D on the normal to C)
Compute normal using sum of cross-products
Use it to place the shield O sufficiently behind the hoop C so that it does not intersect D
C
D
n O
CD
n O
46Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Ensuring that D occludes O
Store with the hoop the thickness
(range of projection of D on the normal n to C)
Ensure that the viewer is not in that range
… or shoot a ray from viewer to O and check parity of hits with D
CD
n O
CD
n O
47Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Growing a hoop around the moon
Find the first intersection, i, between ac and the mesh of S Consider the triangle (d, e, f) of S that contains i If the triangle hides the moon, we are done (return hidden) Otherwise grow it by adding neighboring triangles
– Let C be the boundary of this patch D of triangles– Identify bad vertices of C that appear in front of the moon– Add triangles to make these vertices interior– Ensuring that C remains a simple loop– Stop when C has no bad vertices (return hidden)– or when you can’t grow (return not hidden)
Test the surface patch D bounded by C– Count intersections with ac– If odd then return hidden
Clockwise from ade
f
a
c
48Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Cell-to-cell visibility
Now, let us look at the problem of pre-computing whether any portion of a cell A is visible from a viewpoint in cell B.
Why? (Applications?)
49Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Notation and assumptions
Two sets, A and B Two points aA, bB O is the occluder A, B, and O are disjoint ab is the line segment from a to b a–b O ab = , a sees b (ignore self-occlusion) a | b O ab ≠ , a is occluded from by O
a b
BA
O
a b
BA
O
50Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
(Jarek’s) Terminology and definitions? HIDDEN: HO(A,B)
– B is entirely hidden from A by O– ?
DETECTED: DO(A,B)– B can be detected from any point of A– ?
GUARDED: GO(A,B)– B can be guarded from a single point of A– ?
CLEAR: CO(A,B)– B can be guarded from any point of A– ?
a bBA O
BA
BAO
a bBA O
O
51Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
HIDDEN: HO(A,B)– B is entirely hidden from A– HO(A,B) a, b: a | b
DETECTED: DO(A,B)– B can be detected from any point of A– DO(A,B) a, b: a–b
GUARDED: GO(A,B)– B can be guarded from some point of A– GO(A,B) a, b: a–b
CLEAR: CO(A,B)– B can be guarded from any point of A– CO(A,B) a, b: a–b
Definitions
a bBA O
BAO
BAO
a bBA O
52Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Properties (and proofs?)
CO(A,B) CO(B,A) and HO(A,B) HO(B,A) CO(A,B) GO(A,B) and GO(B,A) GO(A,B) DO(B,A) proof ?
a bBA O
HO(A,B) a, b: a | b
BAO
DO(A,B) a, b: a–b
BAO
GO(A,B) a, b: a–b
a bBA O
CO(A,B) a, b: a–b
53Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Properties and proofs
CO(A,B) CO(B,A) and HO(A,B) HO(B,A) CO(A,B) GO(A,B) and CO(A,B) GO(B,A) GO(A,B) DO(B,A) proof
GO(A,B) a, b: a–b b, a: b–a DO(B,A)
a bBA O
HO(A,B) a, b: a | b
BAO
DO(A,B) a, b: a–b
BAO
GO(A,B) a, b: a–b
a bBA O
CO(A,B) a, b: a–b
54Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Counter-example?
Draw O such that none of the 8 relations hold
a bBA O
HO(A,B) a, b: a | b
BAO
DO(A,B) a, b: a–b
BAO
GO(A,B) a, b: a–b
a bBA O
CO(A,B) a, b: a–b
BAO?
HO(A,B), GO(A,B), DO(A,B), CO(A,B), HO(B,A), GO(B,A), DO(B,A), CO(B,A) are all false
55Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Counter-example?
Draw O such that none of the 8 relations hold
a bBA O
HO(A,B) a, b: a | b
BAO
DO(A,B) a, b: a–b
BAO
GO(A,B) a, b: a–b
a bBA O
CO(A,B) a, b: a–b
HO(A,B), GO(A,B), DO(A,B), CO(A,B), HO(B,A), GO(B,A), DO(B,A), CO(B,A) are all false
a b BAO
56Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Cell-to-cell visibility (C2CV)
Viewpoint is in cell A Small objects in cell B need not be rendered if cell A is occluded from cell B by some surface S:
HS(A,B)?
57Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Terminology Assume that surface S, cell A, and cell B are disjoint? R = convex hull of AB (contains all rays from A to B) T = tube (boundary of R not on A or B) C connected component of ST
58Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
The Occlusion TheoremThe surface S occludes cell A from cell B, if and only if:
• There exists a connected component, C, of ST that is bounding a portion D of S and has no boundary in the interior of R.
2. Given an arbitrary (non-singular) ray, ab, from aA to bB, ab has an odd number of intersections with DC.
59Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Proof
60Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Various cases
61Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
ShieldTester for triangle meshes
Obtain an edge eAB of T from a vertex of A to a vertex of BIF eAB S = THEN RETURN (“visible”)FOR EACH triangle x of S that is stabbed by eAB DO { Start a WALK that traces a connected component C of ST IF the WALK did not run into a boundary of S THEN {
INVADE the portion of S to the left of the triangles crossed by the WALK along C
IF the invaded portion has no hole THEN IF the number of triangles that were stabbed by eAB
and visited by the WALK and the INVADE is odd THEN RETURN (“occluded”)}
RETURN (“undecided”)
62Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Walking one step
63Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Turning left on S
64Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Invade process
65Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Hot edges
66Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Results
67Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Is the moon hidden by a tree? Can’t grow a patch of edge-connected triangles
– Leaves/branches are small and disjoint Use approximate shadow fusion
– Render tree(s)– Mark area of rendered pixels– Construct big rectangle inside it (how?)– Let M= max(z-buffer inside rectangle)– Push back rectangle to z=M– Use it as occluder for other objects (behind the tree)
Accuracy depends on screen resolution– Can be improved by multiple passes (zoomed 1/4 of image each)
Use bounding spheres around objects to test them– Conservative part– Use a hierarchy of bounding sphere (hierarchical z-buffer)
68Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Occluded volumes
Assume that we have an area light source or a cell containing the viewpoint that is a polyhedron
Assume that all occluders are polyhedra Can we compute the hidden volume (umbra)?
Difficult because it is bounded by curved surfaces
69Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
What you must remember
How to build a rasterizer How to accelerate it
70Georgia Tech, IIC, GVU, 2006MAGIC MAGIC LabLab
http://www.gvu.gatech.edu/~jarekJarek Rossignac
Examples of questions for exams
When is it no-longer useful to simplify the model? What are the 7 acceleration techniques? Which ones reduce per-vertex cost? How much savings should you expect from each technique?