AML710 CAD LECTURE 36 Visualization Concepts Visible Lines and Surfaces
Visibility - Hidden lines / Surfaces Many applications require the visibility determination for lines, points, edges, surfaces or volumes with reference to an observer Applications: Realistic representation of solids Simulations where dynamically the object changes shape Computer animations Wireframe 3D solids
Notes on Visibility Algorithms For real time applications faster algorithms are required which can cope with the determination of visible surfaces. However, transparency, texture, reflections which are commonly used are not part of the visibility algorithms. These form the part of rendering process which is presenting a picture or scene realistically. All visibility algorithms involve sorting. Fundamental Assumption: The farther the object, it is most likely to be obscured by other objects which are nearer to the view point. The efficiency of a visible surface algorithm depends significantly on the efficiency of the sorting algorithm used. Coherence: The tendency for the characteristics of a scene to be locally constant (homogeneous). This property is used to increase the efficiency of the sort.
Classification of Algorithms Simple Visibility Algorithm (contd.) The classification is based on the coordinate system used. a. Object Space algorithms: They are implemented in physical coordinate system in which the object is described. Very precise used in engineering applications The result can be enlarged satisfactorily Computation: Compares every object in a scene with every other object, therefore complexity is like n 2 Eg. Roberts algorithm, Warnock s algorithm b. Image Space algorithms The algorithm is implemented in screen coordinates. Therefore total computions are nn where n is the number of objects in the screne and N is the total number of pixels (eg. 1280x1024 = 10 6 ) More efficient takes advantage of coherence. c. List priority algorithms: These are partially implemented in a and b
Floating Horizon Algorithm Most commonly used for representation of 3D surfaces of the form F( x, y, z) = This category of algorithms are usually implemented in image space. Fundamental Concept: The technique is to convert 3D problem to equivalent 2D problem by intersecting 3D surface with a series of parallel cutting planes at constant values of the coordinate in the view direction. It could be x, y or z. The function F(x,y,z)=0 is reduced to a planar curve in each of these parallel planes y = It is assumed that the curves are single valued functions of independent variables. The result is projected on to the z=0 plane 0 f ( x, z) The algorithm first sorts the z=constant planes in increasing distance form the viewpoint beginning from z=0 (closest to viewpoint)
Floating Horizon Algorithm Upper Horizon: If at any given value of x, the y value of the curve in the current plane is larger than the y value for any previous curve at that z value, then the curve is visible, otherwise hidden Lower Horizon: If at any given value of x, the y value of the curve in the current plane larger than the maximum y value or smaller than the minimum y value for any previous curve at that z plane then the curve is visible, else hidden Functional interpolation: The algorithm assumes the value of y is available at every x location. However, if it is not available (crossing of curves), a linear interpolation of known values is calculated to fill the upper and lower floating horizon arrays. Aliasing: If the function contains very narrow regions (small increments of x) then the algorithm yields incorrect results. The effect is generally caused by computing the function for visibility at a resolution less than that of image space resolution. The problem is overcome by taking more points to evaluate the function in narrow regions.
Roberts Algorithm Roberts (1964) algorithm is the oldest known solution to the visible surface problem. This is implemented in object space and mathematically an elegant algorithm The algorithm eliminates the edges or planes from each volume that are hidden by the volume itself (self hidden). Each remaining edge (plane) of each volume is compared with each of the remaining volumes to determine what portion or portions, if any, are hidden by these volumes. Thus computational requirements for the Roberts algorithm theoretically increase as n 2 where n is total number of objects. The implementation using a preliminary z priority sort and simple boxing or minmax tests exhibits a near linear growth with the number of objects n.
Warnock Algorithm It is based on a hypothesis that tells how the human eye-brain combination processes information contained in a scene. Hypothesis: Very little time or effort is spent on areas of scene that contain little information. The majority of the time and effort is spent on high information content A table top with one object only has less colour texture etc information. Takes minimal time to perceive. This algorithm can be implemented both in image and object space. The algorithm relies on divide and conquer strategy. Warnock and its variants take advantage of homogeneity in the areas of display (scene) which is known as area coherence The algorithm considers a window (area) in image (or object) space and seeks to determine if the window is empty or the contents are simple enough to resolve. If not, it divides the window until either the scene is simple or the preset resolution is reached. If image space results are not satisfactory, the algorithm shifts to object space for better accuracy.
Warnock Algorithm Hidden surface problem of a simple scene A scene with more details
Warnock Algorithm A quadtree data structure used to store the data The subdivision process gives a tree structure for the subwindows.
Appel s Algorithm This algorithm introduces the notion of quantitative invisibility. Appel defines the quantitative invisibility as the number of potentially visible surfaces that lie between the line segment and the eyepoint. A surface is potentially visible if the angle between the outward normal to the surface and the line to the eyepoint is less than 90 deg and invisible otherwise. If the quantitative invisibility is zero, then the segment is visible. The quantitative invisibility changes sign (+1/-1) only at the contour edges.