# Computer Graphics … how renderings are done on a computer. Art 321 Dr. J Parker Winter.

## Presentation on theme: "Computer Graphics … how renderings are done on a computer. Art 321 Dr. J Parker Winter."— Presentation transcript:

Computer Graphics … how renderings are done on a computer. Art 321 Dr. J Parker Winter

How are visuals made using a computer? All computers work in much the same way. Computers only manipulate numbers. To get a computer to create a picture, we must device some sort of code that allows pictures and music to be made into numbers. This is an encoding, and computers use many of them

How are visuals made using a computer? A drawing or rendering consists of lines/boundaries, variations in colour or grey, and 3D to 2D transformations that allow a set of objects to be made into an image. Why not use a camera?

How are visuals made using a computer? Why not use a camera? Because a camera captures only one face or position at a time. We need to ultimately have a complete 3D view

How are visuals made using a computer? Representing colour: Color is specified as red, green, and blue components, just as in images. We can specify most colours this way.

How are visuals made using a computer? Coordinates - position In high school we drew graphs using an X and a Y axis. We specified any point as an X and a Y coordinate. x Y 0,0 x, y

How are visuals made using a computer? Coordinates - position On the computer screen, it’s just upside-down from that. The upper-left is 0,0 (origin) and Y coordinates get bigger as we move down the screen x Y 0,0 x, y

How are visuals made using a computer? Drawing We now have ‘paper’. To draw, we give the computer a command like drawLine or drawPoint x Y 0,0 x, y

How are visuals made using a computer? Drawing A point can be just a pixel. The drawPoint command would need to be told where to draw a point (what pixel) drawPoint (x, y); x Y 0,0 x, y

How are visuals made using a computer? Drawing We could also say what colour, or we could set a colour to be used until we changed it. setColor (r, g, b); x Y 0,0

How are visuals made using a computer? Drawing A line (line segment, really) occurs between two points. Thus: drawLine (x0,y0, x1,y1); x Y 0,0 x1, y1 x0, y0

How are visuals made using a computer? We’re getting into turtle graphics territory. A rectangle is 4 lines or 4 points, take your pick: drawRectangle (x0,y0, x1,y1, x2,y2, x3,y3); x Y 0,0 x1, y1 x0, y0 x2, y2 x3, y3

How are visuals made using a computer? We can fill a rectangle with color. drawFilledRectangle (x0,y0, x1,y1, x2,y2, x3,y3); Best to do it when we draw it rather than after. x Y 0,0 x1, y1 x0, y0 x2, y2 x3, y3

How are visuals made using a computer? See a pattern?. Circles – specify centre position and radius. drawCircle (x0,y0, r); drawFilledCircle (x1,y1, r); x Y 0,0 x1, y1 x0, y0

How are 3D visuals made using a computer? We see a projection onto a flat surface from the 3D scene.

How are 3D visuals made using a computer? Using a computer we need to specify the point from where we are looking (viewpoint) and the direction we are looking.

How are 3D visuals made using a computer? 3D lines and triangles, etc. have 3 Coordinates (x,y,z), not just 2.

How are visuals made using a computer?

Polygons are used to construct complex 3D shapes. This is called modeling.

How are visuals made using a computer? These polygonal objects can be made to look more realistic by shading them; that is, by applying color or greys of various intensities as a function of position on each triangle.

How are visuals made using a computer? These polygonal objects can be made to look more realistic by shading them; that is, by applying color or greys of various intensities as a function of position on each triangle.

How are visuals made using a computer? These polygonal objects can be made to look more realistic by shading them; that is, by applying color or greys of various intensities as a function of position on each triangle.

How are visuals made using a computer? These polygonal objects can be made to look more realistic by shading them; that is, by applying color or greys of various intensities as a function of position on each triangle.

How are visuals made using a computer?

Let’s make something interesting. Search the net for building images

Let’s make something interesting. Make a background

Let’s make something interesting. Make a prism (3D rectangle)

Let’s make something interesting. Map the texture

Let’s make something interesting. Make a lot of them

This is how game worlds are made All objects in a 3D computer game are made of polygons, and have textures, bumps, and grunge mapped onto them.

This is how game worlds are made Bumps are achieved by perturbing the surface normals of the object and using the perturbed normal during lighting calculations. The result is an apparently bumpy surface rather than a smooth surface although the surface of the underlying object is not actually changed.

This is how game worlds are made All objects in a 3D computer game are made of polygons, and have textures, bumps, and grunge mapped onto them.

Download ppt "Computer Graphics … how renderings are done on a computer. Art 321 Dr. J Parker Winter."

Similar presentations