DOC PREVIEW
USF CS 686 - The photorealism quest

This preview shows page 1-2-3-4-5 out of 16 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 16 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 16 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 16 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 16 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 16 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 16 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

The photorealism questThe basic ideaExample: a spherical objectDescribing the sphereDescribing a rayComputing the ‘hit’ timeThe algebra detailsApply Quadratic FormulaInterpretationsSecond example: A planar surfaceWhen does ray ‘hit’ plane?Slide 12Achromatic lightIlluminationSome terminologyGeometric ingredientsThe photorealism questAn introduction to ray-tracingThe basic ideaview-planeobjecteye of viewerCast a ray from the viewer’s eyethrough each pixel on the screento see where it hits some object Apply illumination principles from physicsto determine the intensity of the light thatis reflected from that spot toward the eyeExample: a spherical object•Mathematics problem: How can we find the spot where a ray hits a sphere?•We apply our knowledge of vector-algebra•Describe sphere’s surface by an equation•Describe ray’s trajectory by an equation•Then ‘solve’ this system of two equations•There could be 0, 1, or 2 distinct solutionsDescribing the sphere•A sphere consists of points in space which lie at a fixed distance from a given center•Let r denote this fixed distance (radius)•Let c = ( cx, cy, cz ) be the sphere’s center•If w = ( wx, wy, wz ) be any point in space, then distance( w, c ) is written ║w – c║•Formula: ║w – c║= sqrt( (w - c)•(w - c) )•Sphere is a set: { w ε R3 | (w-c)•(w-c) = r }Describing a ray•A ray is a geometrical half-line in space•It has a beginning point: b = ( bx, by, bz )•It has a direction-vector: d = ( dx, dy, dz )•It can be described with a parameter t ≥ 0•If w = ( wx, wy, wz ) is any point in space, then w will be on the half-line just in case w = b + td for some choice of the parameter t ≥ 0 .Computing the ‘hit’ time•To find WHERE a ray hits a sphere, we think of w as a point traveling in space, and we ask: WHEN will w hit the shere?•We can ‘substitute’ the formula for a point on the half-line into our formula for points that belong to the sphere’s surface, getting an equation that has t as its only variable•It’s easy to ‘solve’ such an equation for t to find when w ‘hits’ the sphere’s surfaceThe algebra details•Sphere: ║ w – c ║ = r•Half-line: w = b + td, t ≥ 0•Substitution: ║ b + td – c ║ = r•Replacement: Let q = c – b•Simplification: ║ td – q ║ = r•Square: (td – q)•(td – q) = r2•Expand: t2 d•d -2td•q + q•q = r2•Transpose: t2 d•d -2td•q + (q•q - r2) = 0Apply Quadratic Formula•To solve: t2 d•d -2td•q + (q•q - r2) = 0•Format: At2 + Bt + C = 0•Formula: t = -B/2A ± sqrt( B2 – 4AC )/2A•Notice: there could be 0, 1, or 2 hit times •OK to use a simplifying assumption: d•d = 1•Equation becomes: t2 – 2td•q + (q•q – r2) = 0•Application: We want the ‘earliest’ hit-time: t = (d•q) - sqrt( (d•q)2 – (q•q – r2) )Interpretationshalf-linebcw1w2half-lineA half-line that begins inside the spherewill only ‘hit’ the spgere’s surface onceSecond example: A planar surface•Mathematical problem: How can we find the spot where a ray hits a plane?•Again we can employ vector-algebra•Any plane is determined by a two entities: –a point (chosen arbitrarily) that lies in it, and–a vector that is perpendicular (normal) to it•Let p be the point and n be the vector•Plane is the set: { w ε R3 | (w-p)•n = 0 }When does ray ‘hit’ plane?•Plane: (w – p)•n = 0•Half-line: w = b + td, t ≥ 0•Substitution: (b + td – p)•n = 0•Replacement: Let q = p – b•Simplification: (td – q)•n = 0•Expand: td•n - q•n = 0•Solution: t = (q•n)/(d•n)Interpretationspwhalf-linehalf-lineIf a half-line begins from a point outside a givenplane, then it can only hit that plane once (and it might possibly not even hit that plane at allndAchromatic light•Achromatic light: brightness, but no color•Light can come from point-sources, and light can come from ambient sources•Incident light shining on the surface of an object can react in three discernable ways: –By being absorbed–By being reflected–By being transmitted (into the interior)Illumination•Besides knowing where a ray of light will hit a surface, we will also need to know whether that ray is reflected or absorbed•If the ray of light is reflected by a surface, does it travel mainly in one direction? Or does it scatter off in several directions?•Various surface materials react differentlySome terminology•Scattering of light (“diffuse reradiation’)–color may be affected by the surface•Reflection of light (“specular reflection”)–mirror-like shininess, color isn’t affectedGeometric ingredients•Normal vector to the surface at a point•Direction vector from point to viewer’s eye•Direction vector from point to


View Full Document

USF CS 686 - The photorealism quest

Documents in this Course
Load more
Download The photorealism quest
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view The photorealism quest and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view The photorealism quest 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?