DOC PREVIEW
UVA CS 445 - 3D Rendering and Ray Casting

This preview shows page 1-2-3-4-5-6-7-8-9-62-63-64-65-66-67-68-69-70-125-126-127-128-129-130-131-132-133 out of 133 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 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 133 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 133 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

3D Rendering and Ray CastingJason LawrenceCS445: GraphicsAcknowledgment: slides by Misha Kazhdan, Allison Klein, Tom Funkhouser,Adam Finkelstein and David DobkinRendering• Generate an image from geometric primitivesRenderingGeometric PrimitivesRaster ImageRendering• Generate an image from geometric primitivesRendering3D2D3D Rendering ExampleWhat issues must be addressed by a 3D rendering system?Overview• 3D scene representation• 3D viewer representation• Ray CastingOverview• 3D scene representation• 3D viewer representation• Ray castingHow is the 3D scenedescribed in a computer?3D Scene Representation• Scene is usually approximated by 3D primitivesoPointoLine segmentoPolygonoPolyhedronoCurved surfaceoSolid object oetc.3D Point• Specifies a locationOrigin3D Point• Specifies a locationoRepresented by three coordinatesoInfinitely smalltypedef struct { Coordinate x; Coordinate y; Coordinate z;} Point;(x,y,z)Origin3D Vector• Specifies a direction and a magnitude3D Vector• Specifies a direction and a magnitudeoRepresented by three coordinatesoMagnitude ||V|| = sqrt(dx dx + dy dy + dz dz)oHas no locationtypedef struct { Coordinate dx; Coordinate dy; Coordinate dz;} Vector;(dx,dy,dz)3D Vector• Specifies a direction and a magnitudeoRepresented by three coordinatesoMagnitude ||V|| = sqrt(dx dx + dy dy + dz dz)oHas no location• Dot product of two 3D vectorsoV1·V2 = dx1dx2 + dy1dy2 + dz1dz2oV1·V2 = ||V1 || || V2 || cos(Θ)typedef struct { Coordinate dx; Coordinate dy; Coordinate dz;} Vector;(dx1,dy1,dz1)(dx2,dy2 ,dz2)Θ3D Vector• Specifies a direction and a magnitudeoRepresented by three coordinatesoMagnitude ||V|| = sqrt(dx dx + dy dy + dz dz)oHas no location• Cross product of two 3D vectorsoV1×V2 = Vector normal to plane V1 , V2 o|| V1 × V2 || = ||V1 || || V2 || sin(Θ)typedef struct { Coordinate dx; Coordinate dy; Coordinate dz;} Vector;(dx1,dy1,dz1)(dx2,dy2 ,dz2)ΘCross Product: Review•Let U = V × W:oUx = VyWz - VzWy oUy = VzWx - VxWz oUz = VxWy - VyWx •V × W = - W × V (remember “right-hand” rule)• We can do similar derivations to show:oV1×V2= ||V1 || || V2 || sin(Θ)n, where n is unit vector normal to V1 and V2o|| V1 × V1 || = 0o|| V1 × (-V1) || = 03D Line Segment• Linear path between two pointsOrigin3D Line Segment• Use a linear combination of two pointsoParametric representation:»P = P1 + t (P2 - P1), (0 ≤ t ≤ 1)typedef struct { Point P1; Point P2;} Segment;P1P2Origin3D Ray• Line segment with one endpoint at infinityoParametric representation: »P = P1 + t V, (0 <= t < ∞)typedef struct { Point P1; Vector V;} Ray;P1VOrigin3D Line• Line segment with both endpoints at infinityoParametric representation: »P = P1 + t V, (-∞ < t < ∞)P1typedef struct { Point P1; Vector V;} Line;VOriginOrigin3D Plane• A linear combination of three pointsP1P3P2Origin3D Plane• A linear combination of three pointsoImplicit representation: » P·N + d = 0, or» ax + by + cz + d = 0oN is the plane “normal”» Unit-length vector» Perpendicular to planetypedef struct { Vector N; Distance d;} Plane;P1N = (a,b,c)dP3P23D Polygon• Area “inside” a sequence of coplanar pointsoTriangleoQuadrilateraloConvexoStar-shapedoConcaveoSelf-intersectingoHoles (use > 1 polygon struct)typedef struct { Point *points; int npoints;} Polygon;Points are in counter-clockwise order3D Sphere•All points at distance “r” from point “(cx, cy, cz)”oImplicit representation:»(x - cx)2 + (y - cy)2 + (z - cz)2 = r 2oParametric representation:»x = r cos(φ) cos(Θ) + cx»y = r cos(φ) sin(Θ) + cy»z = r sin(φ) + cztypedef struct { Point center; Distance radius;} Sphere;rOriginOther 3D primitives• Cone• Cylinder• Ellipsoid• Box• Etc.3D Geometric Primitives• More detail on 3D modeling later in course oPointoLine segmentoPolygonoPolyhedronoCurved surfaceoSolid object oetc.Overview• 3D scene representation• 3D viewer representation• Visible surface determination• Lighting simulationHow is the viewing devicedescribed in a computer?Camera Models• The most common model is pin-hole camera oAll captured light rays arrive along paths toward focal point without lens distortion (everything is in focus)Other models consider ...Depth of fieldMotion blurLens distortionView planeEye position(focal point)Camera Parameters• What are the parameters of a camera?Camera Parameters• PositionoEye position (px, py, pz)• OrientationoView direction (dx, dy, dz)oUp direction (ux, uy, uz)• ApertureoField of view (xfov, yfov)• Film plane o“Look at” pointoView plane normalrightbackUp directionEye PositionView directionViewPlane“Look at”PointOther Models: Depth of FieldClose Focused Distance FocusedP. HaeberliOther Models: Motion BlurBrostow & Essa• Mimics effect of open camera shutter• Gives perceptual effect of high-speed motion• Generally involves temporal super-samplingTraditional Pinhole Camera• The film sits behind the pinhole of the camera.Film PlanePinholeTraditional Pinhole Camera• The film sits behind the pinhole of the camera.• Rays come in from the outside, pass through the pinhole, and hit the film plane.Film PlanePinholeTraditional Pinhole Camera• The film sits behind the pinhole of the camera.• Rays come in from the outside, pass through the pinhole, and hit the film plane.Film PlanePinholePhotograph is upside downVirtual Camera• The film sits in front of the pinhole of the camera.Film PlanePinholeVirtual Camera• The film sits in front of the pinhole of the camera.• Rays come in from the outside, pass through the film plane, and hit the pinhole.Film PlanePinholeVirtual Camera• The film sits in front of the pinhole of the camera.• Rays come in from the outside, pass through the film plane, and hit the pinhole.Film PlanePinholePhotograph is right side upOverview• 3D scene representation• 3D viewer representation• Ray CastingoWhat do we see?oHow does it look?Ray Casting• Rendering model• Intersections with geometric primitivesoSphereoTriangle• Acceleration techniquesoBounding volume hierarchiesoSpatial partitions» Uniform grids» Octrees» BSP treesRay Casting• We invert the process of image generation by sending rays out from the pinhole, and then we find the first intersection of the ray with the scene.Film PlanePinholeRay Casting• The color of each pixel on the view planedepends on the radiance emanating from visible surfacesView planeEye positionRays


View Full Document

UVA CS 445 - 3D Rendering and Ray Casting

Documents in this Course
Lighting

Lighting

49 pages

Color

Color

20 pages

Clipping

Clipping

10 pages

Shadows

Shadows

95 pages

Color

Color

37 pages

Radiosity

Radiosity

49 pages

Clipping

Clipping

59 pages

Assign 3

Assign 3

28 pages

Splines

Splines

17 pages

Color

Color

17 pages

Load more
Download 3D Rendering and Ray Casting
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 3D Rendering and Ray Casting 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 3D Rendering and Ray Casting 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?