DOC PREVIEW
UW-Madison CS 559 - CS 559 Lecture Notes

This preview shows page 1-2-3-25-26-27 out of 27 pages.

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

Unformatted text preview:

Last TimeTodayModeling 101Modeling and OpenGLRenderingGraphics PipelineLocal Coordinate SpaceGlobal Coordinate SystemView Space3D Screen SpaceWindow Space3D Screen to Window TransformSlide 13Slide 14Orthographic ProjectionSimple Orthographic ProjectionRendering the VolumeGeneral Orthographic ProjectionSpecifying a ViewGetting there…Slide 21Slide 22World to ViewAll TogetherOpenGL and TransformationsOpenGL CameraLeft vs Right Handed View Space02/21/02(c) 2001 University of Wisconsin, CS559Last Time•Toolkits•Transformations–Rotation is complex in 3D–Any rotation can be expressed with an axis and angle approach–Points on the axis do not move anywhere, points off the axis rotate around it–The axis passes through the origin02/21/02(c) 2001 University of Wisconsin, CS559Today•Viewing•Orthographic viewing•Homework 302/21/02(c) 2001 University of Wisconsin, CS559Modeling 101•For the moment assume that all geometry consists of points, lines and faces•Line: A segment between two endpoints•Face: A planar area bounded by line segments–Any face can be triangulated (broken into triangles)02/21/02(c) 2001 University of Wisconsin, CS559Modeling and OpenGL•In OpenGL, all geometry is specified by stating which type of object and then giving the vertices that define it•glBegin(…) …glEnd()•glVertex[34][fdv]–Three or four components (regular or homogeneous)–Float, double or vector (eg float[3])•Chapter 2 of the red book02/21/02(c) 2001 University of Wisconsin, CS559Rendering•Generate an image showing the contents of some region of space–The region is called the view volume, and it is defined by the user•Determine where each object should go in the image–Viewing, Projection•Determine which object is in front at each pixel–Hidden surface elimination, Hidden surface removal, Visibility•Determine what color it is–Lighting, Shading02/21/02(c) 2001 University of Wisconsin, CS559Graphics Pipeline•Graphics hardware employs a sequence of coordinate systems–The location of the geometry is expressed in each coordinate system in turn, and modified along the way–The movement of geometry through these spaces is considered a pipelineLocal Coordinate SpaceWorld Coordinate SpaceView Space3D Screen SpaceDisplay Space02/21/02(c) 2001 University of Wisconsin, CS559Local Coordinate Space•It is easiest to define individual objects in a local coordinate system–For instance, a cube is easiest to define with faces parallel to the coordinate axis•Key idea: Object instantiation–Define an object in a local coordinate system–Use it multiple times by copying it and transforming it into the global system–This is the only effective way to have libraries of 3D objects, and such libraries do exist02/21/02(c) 2001 University of Wisconsin, CS559Global Coordinate System•Everything in the world is transformed into one coordinate system - the global coordinate system–Actually, some things, like dashboards, may be defined in a different space, but we’ll ignore that•Lighting is defined in this space–The locations, brightness’ and types of lights•The camera is defined with respect to this space•Some higher level operations, such as advanced visibility computations, can be done here02/21/02(c) 2001 University of Wisconsin, CS559View Space•Associate a set of axes with the image plane–The image plane is the plane in space on which the image should “appear,” like the film plane of a camera–One normal to the image plane–One up in the image plane–One right in the image plane–These three axes define a coordinate system (a rigid body transform of the world system)•Some camera parameters are easiest to define in this space–Focal length, image size•Depth is represented by a single number in this space–The “normal to image plane” coordinate02/21/02(c) 2001 University of Wisconsin, CS5593D Screen Space•Transform view space into a cube: [-1,1]×[-1,1]×[-1,1]–The cube is the canonical view volume–Parallel sides make many operations easier•Tasks to do:–Clipping – decide what you can see–Rasterization - decide which pixels are covered–Hidden surface removal - decide what is in front–Shading - decide what color things are02/21/02(c) 2001 University of Wisconsin, CS559Window Space•Also called screen space (confusing)•Convert the virtual screen into real screen coordinates–Drop the depth coordinates and translate•The windowing system takes care of this02/21/02(c) 2001 University of Wisconsin, CS5593D Screen to Window Transform•Typically, windows are specified by an origin, width and height–Origin is either bottom left or top left corner, expressed as (x,y) on the total visible screen on the monitor or in the framebuffer•This representation can be converted to (xmin,ymin) and (xmax,ymax)•3D Screen Space goes from (-1,-1,-1) to (1,1,1)–Lets say we want to leave z unchanged•What basic transformations will be involved in the total transformation from 3D screen to window coordinates?02/21/02(c) 2001 University of Wisconsin, CS5593D Screen to Window Transform•How much do we translate?•How much do we scale?(-1,-1)(1,1)(xmin,ymin)(xmax,ymax)02/21/02(c) 2001 University of Wisconsin, CS5593D Screen to Window Transform(-1,-1)(1,1)(xmin,ymin)(xmax,ymax)      110000100202020021minmaxminmaxminmaxminmaxscreenscreenscreenpixelpixelpixelzyxyyyyxxxxzyx02/21/02(c) 2001 University of Wisconsin, CS559Orthographic Projection•Orthographic projection projects all the points in the world along parallel lines onto the image plane–Projection lines are perpendicular to the image plane–Like a camera with infinite focal length•The result is that parallel lines in the world project to parallel lines in the image, and ratios of lengths are preserved–This is important in some applications, like medical imaging and some computer aided design tasks02/21/02(c) 2001 University of Wisconsin, CS559Simple Orthographic Projection•Specify the region of space that we wish to render as a view volume•Assume that the viewer is looking in the –z direction, with x to the right and y up–Assuming a right-handed coordinate system•The view volume has:–a near plane at z=n–a far plane at z=f , (f < n)–a left plane at x=l–a right plane at x=r–a top plane at y=t–and a bottom


View Full Document

UW-Madison CS 559 - CS 559 Lecture Notes

Documents in this Course
Filters

Filters

14 pages

Lecture 2

Lecture 2

24 pages

Clipping

Clipping

22 pages

Modeling

Modeling

33 pages

Filters

Filters

26 pages

Dithering

Dithering

33 pages

Lecture 4

Lecture 4

20 pages

Load more
Download CS 559 Lecture Notes
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 CS 559 Lecture Notes 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 CS 559 Lecture Notes 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?