07-Visibility

07-Visibility - Visibility Visibility In 'the real world'...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Visibility
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Visibility In 'the real world' (TRL), our vision naturally doesn't handle things outside our view (duh!) Also in TRL, opaque objects naturally obscure things behind them In CG, we'll need to explicitly deal with (compute) these things. .
Background image of page 2
Visibility Clipping Culling Hidden Surface Algorithms Image space algorithms Object space algorithms
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Clipping Objects may lie partially inside and partially outside the view volume We want to “clip” away the parts outside
Background image of page 4
Cohen-Sutherland Clipping Clip line against convex region Clip against each edge Line crosses edge replace outside vertex with intersection Both endpoints outside trivial reject Both endpoints inside trivial accept
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Cohen-Sutherland Clipping
Background image of page 6
Cohen-Sutherland Clipping Store inside/outside bitwise (rcode) for each edge Trivial accept [“inside”] (rcode(v1) || rcode(v2)) == 0 Trivial reject [“outside”] Else, compute intersection (eg. x = a) (a, y1 + (a-x1) * (y2-y1)/(x2-x1)) 0000 0010 0001 0100 1000 1001 1010 0110 0101
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Liang-Barsky Clipping Treat line as parametric: Clipping conditions are: y x u y x y x 1 1 max 1 min max 1 min y y u y y x x u x x xmin,ymin and xmax,ymax are clip region corners
Background image of page 8
Liang-Barsky Clipping Intersection when: and u in [0,1] k k p q u y p y p x p x p 4 3 2 1 1 max 4 min 1 3 1 max 2 min 1 1 y y q y y q x x q x x q Incoming: Outgoing: 0 k p 0 k p
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 32

07-Visibility - Visibility Visibility In 'the real world'...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online