Realism in Three-dimensional

31
REALISM IN THREE-DIMENSIONAL GRAPHICS Co-ordinate System

Transcript of Realism in Three-dimensional

REALISM IN THREE-DIMENSIONAL GRAPHICS

Coordinate SystemsThe geometric model of a three-dimensional scene must in some way record locations of points in a three-dimensional coordinate system. We shall choose this system, termed the world coordinate system, to be a right-handed three dimensional cartesian coordinate system (Figure -11). Thus the location of a point, or the endpoint of a line, is specified by three numbers (x, y, z). The origin of the world coordinate system, the directions of its axes, and units of measurement may be freely chosen, often for convenience in the application program. REALISM IN THREE-DIMENSIONALGRAPHICSMany computer graphics applications involve the display of three-dimensional objects and scenes.

Computer-aided design. Simulation.

These applications differ from two-dimensional applications not only in the added dimension: they also require concern for realism in the display of objects.Producing a realistic image of a three-dimensional scene on a two dimensional display presents many problems. How is depth, the third dimension, to be displayed on the screen? How are parts of objects that are hidden by other objects to be identified and removed from the image? How can lighting, color, shadows, and texture contribute to the rendering? How is the three-dimensional world to be modeled in a computer so that images can be generated?TECHNIQUES FOR ACHIEVING REALISMOn a graphics display, as on a painter's canvas, it is simply impractical to produce an image that is a perfectly realistic representation of an actual scene.Instead, we need techniques that take into account the different kinds of realism needed by applications, the amount of processing required to generate the image, the capabilities of the display hardware, the amount of detail recorded in the model of the scene, and the perceptual effects of the image on the observer. As applications change, as display hardware improves, or as processing becomes less expensive, we can expect new techniques for visualizing three-dimensional scenes to emerge.

The basic problem addressed by visualization techniques is sometimes called depth cueing. When a three-dimensional scene is projected onto a two dimensional display screen, information about the depth of 'objects in the images tends to be reduced or lost entirely. Techniques that provide depth cues are designed to restore or enhance the communication of depth to the observer.The list below enumerates several popular visualization techniques.1.parallel projection

A simple technique, the parallel projection, is illustrated in Figure -1, where a point on the screen is identified with a point in the three-dimensional scene by a line perpendicular to the screen. An architect often draws three such parallel projections to illustrate a house, a plan view and two elevation views.

Figure -1 Several parallel projections can be used to show the structure of a three-dimensional object.2.Perspective projectionThe perspective projection, illustrated in Figure - 2, is perhaps the most common projection technique, familiar to us because the images formed by the eye and by lenses on photographic film are perspective projections. The perspective projection conveys depth information by making distant objects smaller than near ones. If objects have only limited depth variation, however, the perspective foreshortening may not provide an adequate depth cue and an ambiguity appears. Figure -3a shows a "wire-frame" drawing of a block that is ambiguous: the block could be oriented as in Figure -3b or as in Figure -3c. The ambiguity seems to disappear if the perspective effect is exaggerated as if the image were generated with a wide-angle lens (Figure -3d). The exaggeration has some undesirable side effects in dynamic graphics applications: people are unaccustomed to viewing the world through a wide-angle lens, and the displayed objects may therefore appear distorted as they move about.

Figure -2 A perspective view.Figure 20-3 Ambiguities can arise from wire-frame drawings. The object (a) could be either (b) or (c). Exaggerated perspective (d) suggests the figure resembles object (b).3. Intensity cuesOne depth cue that is not expensive to implement in hardware is a modulation of the intensity of lines with depth; lines far away appear fainter than those near the viewer (Figure-4). On a raster display, a line can be made wider near the observer than it is when far away. These techniques are useful for simple objects. As the complexity of the image increases, the effectiveness of the cue usually decreases. In addition, if the range of depths of nearby lines is small, the intensities or widths may not vary enough to be noticeable.

Figure 20-4 Intensity modulation is used to brighten parts of the image closer to the observer.4.Stereoscopic views.

A dramatic depth cue is provided by generating two stereoscopic images. One image is shown to the left eye and is generated from a view appropriate to the location of that eye, while the other is generated analogously for the right eye (Figure 20-5). Several techniques can be used to permit each eye to see only the image intended for it. Two separate screens can be used, one for each eye . In another method, the two images are alternately flashed on a single screen about 20 times per second, in synchrony with shutters held in front of the eyes. Still another method polarizes the light from the two images in different directions and has the viewer, wear glasses with polarizing material that admits only one image to each eye (Figure -6). Some people can "fuse" two separate stereo images like those in Figure -5 without the aid of any separation mechanism.

Figure -5 A stereo pair. To help fuse the two images. place a piece of paper perpendicular to the page so that the left eye sees only the left image and the right eye only the right image.

Figure -6 Polarizers used to show the image on the bottom half of the CRT to the right eye only and that on the top half to the left eye only. A horizontal half-silvered mirror is used to combine the polarized images. Note that the upper image is displayed upside down.

5.Kinetic depth effectDepth relationships can be understood by watching an object move. A very revealing motion is rotation about a vertical axis. Lines near the viewer move more rapidly than those far away; lines on opposite sides of the rotation axis appear to move in opposite directions, like a merry-go-round. Figure -7 illustrates the effect: flip the pages of the book and watch the image rotate. If you stop flipping, the relative depths can no longer be determined. On a display, the effect requires fairly rapid generation of a sequence of rotated images and may require special hardware to perform the calculations.

Fig-8 Hidden-line elimination gives a line-drawing a more realistic appearance.

6. Hidden-line elimination

The relative depth of objects in a scene is readily apparent if the lines that are hidden from view by opaque objects are removed from the image (Figure -8). Most of the ambiguities of wireframe images disappear if hidden lines are removed. This technique requires considerable computation but is nevertheless useful for producing finished pictures of a scene.7.Shading with hidden surfaces removed.

On a raster-scan display showing the color and intensity of surfaces helps to convey the depth and shape of an object. The frontispiece illustrates images in which the colors of surfaces, the direction of incident light and the orientation of the surface with respect to the viewer are used to calculate a realistic intensity.

8.Three-dimensional images.Someday it may be possible to generate synthetically a three-dimensional image of a scene directly from a computer model-an automatic model shop! Two existing methods. Although limited illustrate the potential of such models. A milling machine controlled by a computer can be used to carve complex shapes in wood or foam (Figure -9) . Such a model conveys subtle shape information far better than a display image can.

Another example is the vibrating varifocal mirror together with a display it generates a true three dimensional virtual image . The viewer can move around the image observing it from different distances and directions positioning himself to explore spatial relationships that interest him (Figure -10).

Figure -9 Physical models of objects constructed from computer models with a numerically controlled milling machine. Courtesy Cambridge University.

Figure 20-10 A three-dimensional virtual image is formed by a mirror that vibrates and changes focal length.

None of the visualization techniques listed above can be recommended as the "best" one. Each application will require a trade-off of realism ,computation time ,hardware suitability and perceptual effectiveness. Many applications involving three-dimensional models may not require realism at all and are better served by special visualization' techniques.

MODELING THREE DIMENSIONAL SCENESThe techniques used to generate different kinds of images of three-dimensional scenes all start from a model of the scene. The model is needed for two purposes. First, it is used by viewing algorithms together with information about the location of the viewer to synthesize images of the scene. Second, it is used to modify and analyze the objects in the scene, activities. The information in a model of a three-dimensional scene can be divided into two important classes, geometry and topology. Geometry is concerned with measurements, such as the location of a point or the dimensions of an object .Topological information records the structure of a scene: how points are aggregated to form polygons, how polygons form objects, and how objects form scenes. Auxiliary information such as colors of surfaces may also be recorded in the model if the viewing techniques require it.A model of buildings in downtown Salt Lake City, for example, might place the origin at the Mormon Temple, the x axis pointing east, the y axis north, and the z axis up. This choice simplifies the modeling of common features: streets are parallel to axes and surfaces of many buildings are perpendicular to axes.

Figure -11Three kinds of viewing parameters describe the view of a scene: the viewpoint, the viewing direction, and the aperture.

When a view of a three-dimensional scene is generated, a viewpoint, viewing direction, and aperture must be specified. These parameters are analogous to the adjutsments made by a photographer when taking a picture of a real scene:he selects a location for the camera, a direction in which to point it, and a lens that determines how much of the scene will be included in the picture. By altering the viewing parameters, the photographer and the viewer of a graphics display can change the image to suit their requirements.Modeling ObjectsA convenient primitive to use as the basis for modelling objects is the polyhedron: This permits the modeling of familiar objects such as cubes, parallelepipeds, wedges, and polygonal prisms. By increasing the number of faces, a polyhedron can be constructed that will approximate any solid object; this completeness property makes the polyhedron particularly attractive as a primitive representation.An arbitrary polyhedron can be modelled by defining its faces; each face is a planar polygon that can in turn be modelled by an ordered listing of the vertices of the polygon or by a similar list of its edges. For generating wire-frame displays, the edges of the polyhedron assume primary importance. For generating hidden-line or hidden-surface displays, the most important aspect of the polyhedron is the face: it is the face that is opaque and causes other objects to be hidden; it is also the face that models a reflective surface and must be shaded properly.A face has two "sides" that must be distinguished: one side cannot be seen because it faces the interior of the polyhedron; the other faces outward and is visible. To make this important distinction, several conventions can be used in the representation of faces. One method requires that the vertices of the face be listed in counter clockwise order when the face is viewed from outside the polyhedron. Equivalently, we can record a description of the face normal, a vector perpendicular to the plane of the face, directed outward from the polyhedron . The face normal is closely related to another important attribute, the plane equation of the face. A plane is represented by four numbers [a b c d], chosen so that ax + by + Cz + d = 0 is true if and only if the point (x, y, z) lies in the plane. If a point does not lie in the plane, the sign of the nonzero expression ax + by + Cz + d will determine on which side of the plane the point lies. This property allows us to establish the convention that points "outside" the face will have positive values of ax + by + Cz + d . It turns out that the components of the normal vector can be determined from the plane equation; the vector is [a b c]. Calculations using the plane equation and the normal vector will play an important role in algorithms for hidden-line elimination and for shading