12
EUROGRAPHICS ’99 / P. Brunet and R. Scopigno (Guest Editors) Volume 18 (1999), Number 3 Interactive Line Art Rendering of Freeform Surfaces Gershon Elber Computer Science Department Technion Haifa 32000, Israel Email: [email protected] Abstract In recent years,synthetically created line art renderings have reached quality levels that are aesthetically pleasing. Moreover, the sketch based approach was found to be quite capable at conveying geometrical information in an intuitive manner. While a growing interest in this type of rendering method has yielded successful and appealing results, the developed techniques were, for the most part, too slow to be embedded in real time interactive display. This paper presents a line art rendering method for freeform polynomial and rational surfaces that is capable of achieving real time and interactive display. A careful preprocessing stage that combines an a-priori construction of line art strokes with proper classification of these strokes, allows one to significantly alleviate the computational cost, in real time, of the sketch based rendering, and enables interactive line art display. Key Words: Sketches, Illustrations, Line Art Drawings, Freeform Surfaces, NURBS, Surface Coverage, Real Time, Interaction. 1. Introduction In recent years, line art renderings have captured significant attention as a non photo-realistic rendering scheme that is highly aesthetic. Moreover, this rendering scheme is capa- ble of augmenting existing shaded rendering techniques by depicting additional visual information. For example, Fig- ure 1 (a) shows a traditional wireframe drawing that is based on isoparametric curves whereas Figure 1 (b) shows the same light–mill model using a line art drawing whereas Fig- ure 1 (c) combines the traditional wireframe drawing style with the line art style. It is quite clear that two line art draw- ings in Figures 1 (b) and (c) are more pleasing and appear less computer oriented. As such, it is likely to be less intim- idating as a figure in general purpose books. Line rendering as an art goes a long way back. In classic wood carving and art 11 17 18 , one finds that line art rendering played a major role. See, for example, the renaissance artist Albrecht Dürer. Traditionally, line rendering has been mostly seen, in computer graphics, as a simple interactive display method. More recently, line rendering was exploited as a tool to aug- ment synthetic shaded imagery as well as self sustaining aes- thetic and artistic line art drawings. In 34 , steps were made toward the use of different line styles, such as line width or dashed or dotted line styles, to convey different levels of occlusions, for both line and shaded drawings. In 20 , ray tracing and various texture map- ping based techniques are employed to hatch three dimen- sional models, by thresholding the result. In 6 , line art draw- ings were similarly created exploiting haloed lines, intro- duced to computer graphics in 19 , and depth cueing using line width and gray levels. c The Eurographics Association and Blackwell Publishers 1999. Published by Blackwell Publishers, 108 Cowley Road, Oxford OX4 1JF, UK and 350 Main Street, Malden, MA 02148, USA.

Interactive Line Art Rendering of Freeform Surfaces

Embed Size (px)

Citation preview

Page 1: Interactive Line Art Rendering of Freeform Surfaces

EUROGRAPHICS ’99 / P. Brunet and R. Scopigno(Guest Editors)

Volume 18(1999), Number 3

Interactive Line Art Renderingof

Freeform Surfaces

Gershon Elber

Computer Science DepartmentTechnion

Haifa 32000, IsraelEmail: [email protected]

Abstract

In recent years,synthetically created line art renderings have reached quality levels that are aesthetically pleasing.Moreover, the sketch based approach was found to be quite capable at conveying geometrical information in anintuitive manner. While a growing interest in this type of rendering method has yielded successful and appealingresults, the developed techniques were, for the most part, too slow to be embedded in real time interactive display.This paper presents a line art rendering method for freeform polynomial and rational surfaces that is capable ofachieving real time and interactive display. A careful preprocessing stage that combines an a-priori constructionof line art strokes with proper classification of these strokes, allows one to significantly alleviate the computationalcost, in real time, of the sketch based rendering, and enables interactive line art display.Key Words:Sketches, Illustrations, Line Art Drawings, Freeform Surfaces, NURBS, Surface Coverage, Real Time,Interaction.

1. Introduction

In recent years, line art renderings have captured significantattention as a non photo-realistic rendering scheme that ishighly aesthetic. Moreover, this rendering scheme is capa-ble of augmenting existing shaded rendering techniques bydepicting additional visual information. For example, Fig-ure 1 (a) shows a traditional wireframe drawing that is basedon isoparametric curves whereas Figure 1 (b) shows thesame light–mill model using a line art drawing whereas Fig-ure 1 (c) combines the traditional wireframe drawing stylewith the line art style. It is quite clear that two line art draw-ings in Figures 1 (b) and (c) are more pleasing and appearless computer oriented. As such, it is likely to be less intim-idating as a figure in general purpose books.

Line rendering as an art goes a long way back. In classicwood carving and art11; 17; 18, one finds that line art rendering

played a major role. See, for example, the renaissance artistAlbrecht Dürer.

Traditionally, line rendering has been mostly seen, incomputer graphics, as a simple interactive display method.More recently, line rendering was exploited as a tool to aug-ment synthetic shaded imagery as well as self sustaining aes-thetic and artistic line art drawings.

In 3; 4, steps were made toward the use of different linestyles, such as line width or dashed or dotted line styles,to convey different levels of occlusions, for both line andshaded drawings. In20, ray tracing and various texture map-ping based techniques are employed to hatch three dimen-sional models, by thresholding the result. In6, line art draw-ings were similarly created exploiting haloed lines, intro-duced to computer graphics in1; 9, and depth cueing usingline width and gray levels.

c The Eurographics Association and Blackwell Publishers 1999. Published by BlackwellPublishers, 108 Cowley Road, Oxford OX4 1JF, UK and 350 Main Street, Malden, MA02148, USA.

Page 2: Interactive Line Art Rendering of Freeform Surfaces

Elber / Interactive Line Art Rendering

(a) (b) (c)

Figure 1: A model of a light–mill. In (a), the model is displayed using traditional wireframe drawings that is based on isopara-metric curves, giving the drawing a computer oriented look. In (b), the same geometric model is rendered using line art draw-ings, resulting in a potentially less intimidating drawing for novice readers that better fits the drawing style in general purposebooks. (c) is a combination of the first two.

The derivation of a line art illustration directly from a twodimensional image was also explored in the image process-ing as well as the computer graphics communities. In23,a system inspired by Dürer’s drawings, denoted DigiDürer,has been developed to create an appealing surface coverageusing line art strokes by processing a given regular imageof the same scene. Beautiful results using a semi-automaticapproach that honors user’s prescriptions of strokes’ styleswere created in25; 26. In 19; 24, systems that capture and ex-ploit depth information from the three dimensional modelas a z-map are presented, allowing the user to select certainregions in the scene and paint them with prescribed surfacenormals and material types and to enhance special featuressuch as discontinuities and silhouette lines. The quest forline art renderings is closely related to the problem of cov-ering or filling the area of freeform surfaces. In27, spacefilling curves are used in the image plane to produce the dig-ital half-toning. The classical space filling curves of Peano,Hilbert, and Sierpinsky are considered.

The ability to employ three dimensional scenes towardline art illustrations is potentially more powerful than fromtwo dimensional images. With the three dimensional model,one can, for example, employ arbitrary shaders, exploit

depth information and recover casted shadows. In7; 28; 29,three dimensional freeform models are employed towardline art renderings. Line art strokes are developed along,mostly, isoparametric curves. The spacing and/or the widthof the strokes are forced to obey different shaders, shadowareas, texture maps, and obviously hidden surface regions.

In 30, uniform point distribution on implicit freeform sur-faces is used to depict the surface’s shape. In22, the uniformpoint distribution is derived from a polygonal approximationof the freeform surface toward painterly style pictures. In15,improved image understanding is achieved for iso-surfacesof medical data by growing strokes along lines of curva-ture from a uniform distribution of points and displaying thestrokes along with the shaded iso-surface. In8, a uniformpoint distribution allows the creation of line art renderingsof freeform implicit and parametric surfaces using arbitrarystyle strokes, that do not necessarily follow isoparametric di-rections.

The line art rendering is closely associated with the hid-den line removal problem. Numerous methods were devel-oped to remove hidden lines from polyhedra and freeformmodels. Clearly, the direct solution for freeform models,

c The Eurographics Association and Blackwell Publishers 1999.

Page 3: Interactive Line Art Rendering of Freeform Surfaces

Elber / Interactive Line Art Rendering

with no polygonal approximation, is more difficult. In5; 13,approaches to addressing this problem are reported. Never-theless, the computations involved suggest that this directsolution is too complex for real time applications. In21, realtime hidden surface removal and silhouette extraction is pro-posed for polyhedral models toward sketching style line artillustrations.

In this work, we draw from8; 15; 21; 22; 30 and exploit auniform point distribution to provide real time interactionwith line art illustrations of freeform geometric models. Thestroked line art image obeys shaders that can take into ac-count both regions of great interest such as silhouette areasas well as the illumination’s intensity.

This paper is organized as follows. In Section 2, themain stages of the real time line art rendering algorithm offreeforms are presented. In Section 3, examples are consid-ered and discussed, while we conclude in Section 4.

All the examples presented in this work, on all platforms,were created using an implementation that is based on theIRIT 16 solid modeling system that is developed at the com-puter science department, Technion, Israel.

2. Algorithm

The rendering techniques known as line art or sketch basedrendering methods require the ability to generate line strokeson the surfaces of the given geometry, make the strokes obeysome shading model and line styles, and obviously honorthe visibility relations between the different portions of thescene, all while the scene is presented from a prescribedviewing direction.

Any attempt to handle this non photo-realistic renderingmethod in interactive speeds must provide answers in realtime toall these stages. In this section, we examine possiblesolutions to the different stages, that together make real timeline art rendering in interactive environments a feasible op-tion. In Section 2.1, the question of an a-priori constructionof line art strokes is dealt with. Not all strokes are visible atall times and in Section 2.2, these strokes are carefully clas-sified so that during the interaction stage, one can access thevisible portions of the strokes in a highly efficient way. Fi-nally, in Section 2.3, we consider the hidden surface removaland surface shading problems in the context of real time lineart rendering, bringing together all the different pieces of thealgorithm.

2.1. Constructing the Strokes

Traditional wireframe display of a polynomial or a ratio-nal surface typically exploits an a-priori computed set ofisoparametric curves. Similarly, a real time shaded display

of the same surface would necessitate an a-priori computa-tion of a piecewise linear polygonal approximation of thesurface. A line art sketch might render a single surface us-ing thousands of line strokes, with each stroke formed outof dozens of sampled points on the freeform polynomial orrational surface. Considering that a typical model consists oftens of surfaces, and realizing that real time display requiresseveral scene updates per second, one can immediately con-clude that real time line art rendering, using contemporarycomputational capabilities, might be feasible only if theseline strokes are a-priori computed and cached, as in wire-frame and shaded displays.

In 8, a sketching scheme has been proposed for freeformsurfaces. The strokes are uniformly spread across thefreeform surfaces, using a two steps algorithm. Given sur-faceS, the first stage builds a uniform point distribution ofr points,P = fPig

ri=1 ; Pi 2 S, computed so that it covers

the entire surface area. This distribution is randomly com-puted for parametric surfaces by taking into account andcompensating for the local change in the area-differential

of the surface,������ ∂S

∂u �∂S∂v

������. For surfaces with a polygonal

approximation,P may be derived by randomly spreadingpoints on each polygon in quantities that are proportional tothe area of the polygon. The probability of placing the pointson some polygon is directly proportional to the area of thepolygon, allowing fractional placement of points as well. Inthe second step of the construction of the line art, a stroke,Si , is grown from each point in the distribution,Pi , with theaid of local numerical marching on the freeform shape. Thestrokes are now completely independent of the surface’s pa-rameterization and may be grown not only along isopara-metric curves of the surface, but also along the directions ofthe principal curvatures2, silhouette directions, or even ar-bitrary prescribed directions. Figure 2 shows a freeform lineart rendering of a freeform surface that was generated us-ing this approach. The uniform point distribution is shownin Figure 2 (a) while strokes that were developed from thispoint set are presented along isoparametric directions in Fig-ure 2 (b) and along Isophotes14 in Figure 2 (c).

Strokes along isoparametric directions can be representedin exact rational form. Nevertheless and as would be shortlyrevealed, the length of the stroke, a non rational function ingeneral, plays a major role in this line art rendering method.Therefore and because, in general, non isoparametric strokesare non rational, all strokes are approximated as piecewiselinear curves. Strokes are allowed to follow one major flowof direction on the surface, or vector field, such as theuisoparametric direction or two major flows of directions, forexample the two principal directions, along lines of curva-ture2. See8 for the exact numerical marching procedures ofthe different strokes’ styles.

c The Eurographics Association and Blackwell Publishers 1999.

Page 4: Interactive Line Art Rendering of Freeform Surfaces

Elber / Interactive Line Art Rendering

(a) (b) (c)

Figure 2: Line art rendering using a point coverage, following8. In (a), a uniform distribution of points on the surface isconstructed. (b) presents the line art strokes along isoparametric directions that were developed from the point set of (a). (c)employs strokes that emphasize silhouette areas, along Isophotes.

Each stroke can be rendered when the need comes byplotting the polyline that represents the stroke. A decisionwhether or not to plot strokeSi depends on some evaluationfunction such as the illumination ofS at the surface neigh-borhood ofPi . In order to be able to evaluate this illumina-tion in our shader in Section 2.3, the unit normal of the sur-face atPi , denotedNi , is computed for each developed strokeand is kept along withSi . The illumination is evaluated onlyat Pi , and hence it is crucial to limit the strokeSi to a localneighborhood of the pointPi from whichSi was numericallygrown and developed.

With the completion of the construction of the line art’sstrokes, one must attempt to sort the strokes into a data struc-ture that would ease and speed up the access of the relevantand visible strokes, once the light sources’ positions anda viewing direction are determined. Optimal access of thefraction of the visible rendered strokes, given the viewingand light sources’ directions, is a crucial optimization com-ponent toward interactive line art rendering. In Section 2.2,we propose a data structure that is capable of such a strokeclassification.

2.2. The Classification of the Strokes

Every time the scene is rendered, only a fraction of thestrokes and a portion of each stroke are drawn. This ob-servation suggests that given a viewing direction and light

sources’ positions, one should seek a representation thatwould enable efficient extraction of the visible strokes outof the entire stroke set.

When the geometry is displayed, areas of special interestshould be enhanced. The silhouette area, or the area near thehorizon of the object, is one example of an area of special in-terest. Let the viewing direction beV, a unit size vector. Ev-ery stroke,Si , for whichNi is almost orthogonal toV shouldbe sought and classified as a silhouette area. The intensity ofthe illumination at some surface pointPi should also affectthe display of its associated strokeSi . Any attempt to esti-mate the light intensity atPi using a shader model is expectedto depend on the normal of the surface at that location,Ni .

It is therefore plausible to attempt to join the strokes intogroups of similar directions of normals. Given the viewingdirection and the light sources’ positions, a representativefrom each group could then be tested in order to determinethe feasibility of having strokes in that group contribute tothe display.

In 10, uniform distributions ofm unit vectors, m =

4; :::;130, on the unit sphere,S2, toward an optimal coverageof S2 are presented. The problem of uniform distribution onS2 has simple regular solutions only form= 4;6;8;12;20,in close relation to the number of vertices of the platonic orregular polyhedra, and exploiting the positions of these ver-

c The Eurographics Association and Blackwell Publishers 1999.

Page 5: Interactive Line Art Rendering of Freeform Surfaces

Elber / Interactive Line Art Rendering

tices. Associate an infinite cone,C(Vl ;α), of opening angleα with each such unit vectorVl (See Figure 3):

Definition 1 A set ofmconesC = fC(Vl ;α)gml=1 is

considered acoveragefor the unit sphere,S2, if forevery pointP2 S2, there exists a coneC(Vl ;α) 2C, such thatP2C(Vl ;α).

Given a uniform point distribution, one can define the op-timal coverage as

Definition 2Given m unit vectorsfVlg

ml=1, the minimal angle

α for which the setC = fC(Vl ;α)gml=1 covers the

unit sphere,S2, is denotedthe covering angleofthe distribution. We call this optimal angleαm.

There is an obvious inverse relation betweenm andαm;the largerm is, the smallerαm can be.

Considerm unit vectors,fVlgml=1, definingm cones that

coverS2 with a covering angle ofαm. Denote the cones ofthis coverage byCm = fC(Vl ;αm)g

ml=1. Given a freeform

surface,S, its normal or Gauss map,G 2, is a map fromS to the unit sphereS2. The set of normals,fNig � G,that is associated with the set of strokesfSig of S, can begrouped into buckets in the form of a set of covering conesfC(Vl ;αm)g

ml=1 as follows,

Ni 2C(Vl ;αm) , hNi ;Vl i > cos(αm): (1)

In other words, we are subdividingS2, and therefore sub-dividing G of S, into (overlapping) regions of similar nor-mal orientations. Because the conescover S2, Ni must beplaced in at least one cone. Nonetheless, few normals mightfind themselves in two or more cones, a case one must prop-erly handle in order to avoid drawing the same stroke sev-eral times. The amount of the introduced redundancy, havingnormals in more than one cone, can be easily computed.

Following 10 and givenm, one can compute the uniformpoint distribution onS2 and deriveαm. Table 1 presents somevalues ofαm for differentmvalues. Givenαm, the area,Am,of the spherical cap that is the intersection of the unit sphereand the cone,S2TC(Vl ;αm), equals,

Am= 2π(1�cos(αm)): (2)

Then, the relative redundancy,R, equals the accumulatedareas of allm caps divided by the area of a unit sphere, 4π,

R=mAm

4π=

m(1�cos(αm))

2; (3)

with a limit of one for the case of no redundancy at all. Asm becomes larger,R approaches the ratio between the areaof a circle and an equal sided hexagon circumscribed in it,which is a little over twenty percent.

Table 1 presents the expected relative redundancy,R,

m αm R

(degrees)

4 70.5287794 1.3333333320 29.6230958 1.3070424850 18.3000226 1.26436616100 12.9360973 1.26898253130 11.3165625 1.26373104

Table 1: Given a uniform distribution of unit vectors on theunit sphere,S2, αm is the optimal angular span (following10)of the cones defined over the the unit vectors so that theycover S2. R presents the relative amount of redundancy inthis coverage.

for various values ofm. The empirical experience that wasgained throughout this work completely agrees with thissomewhat surprising result of almost constant amount of re-dundancy for variousmvalues. In all the examples presentedthroughout this work, this relative redundancy was found tobe very persistent between 125% to 130%.

Starting withr strokes, typically in the thousands, one po-tentially needs to handle onlym cones or buckets. For ex-ample, assume that the shader seeks silhouette edges. GivenconeC(Vl ;αm), if jhVl ;Vij > sin(αm), no line stroke inCcontributes to the silhouette edges. Given a bucket, its cone’sdirection,Vl , should be evaluated by the shader of the line artrenderer. Having a minimal overlap of 25%–30% betweenthe different covering cones and assuming a uniform distri-bution of normals onS2, each cone contains approximatelyrm strokes. Further, assume that only a fraction 0�F � 1 ofthe strokes is to be displayed in each iteration. The likelihoodof displaying one stroke in some cone, knowing that anotherstroke in the same cone is indeed displayed, is high. This lo-cality suggests that one needs to evaluate the shader on themvectors of the cone,fVlg

mi=1, finding that approximatelymF

of the cones contain strokes that must be displayed, furtherprocessing themF r

m = rF strokes inmF cones.

While the above approach is plausible for rigid motiontransformations, scaling and/or zooming operations couldclearly affect the spacing between the strokes and thereforethe shading. Typical wireframe drawings of freeform geom-etry employs isoparametric curves (See again Figure 1 (a)).Adaptive insertion of isoparametric curves, in an effort topreserve this spacing during a scaling or a zooming oper-ation, is inherently discontinuous and will result in tempo-ral interference. Here, one can a-priori build a set of pointsthat densely covers the geometry, only to employ a subset ofthese points that is proportional to the area of the model atthis time. As we zoom in, more points from this dense cov-

c The Eurographics Association and Blackwell Publishers 1999.

Page 6: Interactive Line Art Rendering of Freeform Surfaces

Elber / Interactive Line Art Rendering

(a) (b) (c)

αm

Figure 3: A uniform distribution offVlgml=1 unit vectors (here m= 130) on the unit sphere, S2, in (a) can be used to cover

a surface by associating a cone C(Vl ;α) with each such vector (b). The smallest angleα for which 8P 2 S2, 9l such thatP 2 C(Vl ;α) is denoted a covering angleαm. (c) shows the coverage of a sphere using 130 cones withαm = 11:3165625degrees (see10).

ering set will be employed, in addition to the possibility ofcreating longer strokes. Both options, of more strokes andlonger strokes, would result in more continuous and smoothtemporal transitions, compared to the traditional wireframedrawing of isoparametric curves.

The above assumptions can be imprecise. Most notice-ably, a uniform distribution of samples in the Euclideanspace, as it is constructed, would yield a uniform distribu-tion of normals on the unit sphere,S2, only if S� γS2, forsome non zero scaling factorγ 2 IR. In fact, this distribu-tion can be highly non uniform, with the extreme case ofSbeing a planar surface for which all its normals concentratein a single point inG. Further, a single cone can simultane-ously contain strokes that must be displayed as well as hid-den strokes. Nevertheless, we seek a rough approximationon the number of cones,m, to employ, and while imprecise,these assumptions can serve us quite well toward this deci-sion. Because each iteration requires one to test allm axesof all the m cones, a large number of cones would clearlyoutweigh the number of strokes we have,r . The expectationis that rF strokes are going to be displayed and hence weshould employ the largest number of cones possible with-out outweighing the expected drawing cost ofrF strokes.Therefore, one should selectm to be not more thanrF . As-sumingF � 0:1, if r is in the thousands,m should be in theorder of several hundreds.

In summary, if the shader expects that an angular devia-tion of up toαm from the axis of the cone,Vl , would yield

strokes that should be displayed, the shader must evaluatethe entire content of the cone’s bucket. Otherwise, the entireset of strokes in the bucket could be skipped. This coverageof the Gauss map allows one to efficiently concentrate on thestrokes of interest, given the viewing direction and the lightsources’ positions, as is discussed in Section 2.3.

2.3. The Surface Shading and the Hidden SurfaceRemoval Problems

Let L j ; j = 1; :::;n denote the unit vectors ofn directionallight sources in the scene. Unlike the traditional shader mod-els in rendering applications that have global illuminationsupport, herein we potentially need to restrict the effect ofthe shader to a small range of normal deviations. Simply put,strokes enhancing the silhouette areas must be confined tosilhouette areas!

Consider the intensity of the illumination at pointPi 2

S using a very simple cosine shader that assumes a diffuselighting of the model,IDi f

i , from n light sources:

IDi fi = max

1n

n

∑j=1

���Ni ;L j����c�T Di f

;0

!(4)

wherec is the decay factor of the diffuse lighting as we moveaway from the normal direction, andT Di f is the truncationlevel. For simplicity, we selectc andT Di f to be the same forall surfaces in the scene.

The silhouette areas of the model from a given viewing

c The Eurographics Association and Blackwell Publishers 1999.

Page 7: Interactive Line Art Rendering of Freeform Surfaces

Elber / Interactive Line Art Rendering

direction,V, are areas that one is typically interested in en-hancing. We define thesilhouette intensityin and near pointPi 2 Sas,

ISili = max

�(1�jhNi ;Vij)

d�T

Sil;0�: (5)

whered is the decay factor of the silhouette enhancementsas we move away from the silhouette edges, andT

Sil is thetruncation level. For simplicity, we selectd andT Sil to bethe same for all surfaces in the scene.

The shader employed as part of this work weighs atPi thetwo factors that were introduced in Equations (4) and (5),while providing interactive and continuous control on thetwo truncation factors,T Di f andT Sil,

Ii =I

Di fi +I

Sili

2: (6)

Both IDi fi andISil

i are bounded between zero and oneand so isIi . Assume one thresholds the end result ofIi tozero if Ii <

12 and to one otherwise. Then, for a result of

one, the stroke will be drawn while a truncation into a zerowould cause the stroke to be skipped. Such a binary decisionwhether to draw or to skip a stroke could yield uncomfort-able discontinuous appearanceand disappearance of strokes,in real time animations. Nevertheless,I

Di fi andISil

i are typ-ically fractional and continuous. Therefore, one could em-ploy the continuity ofIi , and construct a smooth transitionof the line art rendering from a completely visible stroke toone that is entirely hidden. A-priori compute the arc-length,si , of each stroke,Si , and keepsi as part of the stroke. Givena fractional intensity, 0� Ii � 1, a relative portion ofSi

would be displayed, with the arc-length ofsi Ii . Moreover,similar smooth transitions in the length of the strokes couldbe exploited during scaling or zooming operations.

Given a viewing direction,V, the process of rendering thestrokes of the line art involves the evaluation of the possiblecontribution of each of the cones’ buckets holding the nor-mals of the strokes and skipping the buckets with no contri-bution. The content of the buckets that are found to possiblyhold contributing strokes are further processed. The illumi-nation,Ii , at each surface point,Pi , that generated strokeSi

is computed andSi is drawn with a length that is propor-tional to the intensity that is computed by the shader. Algo-rithm 1 summarizes this sequence of operations.

Recall that a stroke might appear in more than a singlebucket due to the redundancy in the coverage ofS2 usingcones. In order to avoid the rendering of the same strokemore than once at the same display cycle, we employ amagic numberthat is different for each display cycle. Themagic number of the current display cycle is initialized inline (1) of Algorithm 1 and the magic numbers of all the

strokes are initialized in line (2). Ineach display cycle, themagic number is incremented by one (in line (3)). In line (4)of Algorithm 1, the two numbers are compared and only ifthey differ, meaning this stroke has not been processed yetin this iteration, is the stroke displayed. In the latter case,the stroke’s magic number is updated (line (5)), preventing asecond display of the stroke during this cycle. An alternativesolution to eliminate this redundancy that is more efficient,yet introduces an uneven construction of the strokes’ distri-bution, simply forces the placement of every stroke, duringthe preprocessing stages, into the bucket of exactly one cone.

The ability to remove the invisible portions of the scene iscrucial for depicting useful and appealing information. Realtime hidden surface removal is readily available in hardware,even in low end workstations. In this work, we have ex-ploited these capabilities to render the line art scene, in realtime. In order to achieve real time hidden surface removal,the freeform surfaces are a-priori approximated using piece-wise linear polygons. These polygons are then rendered intothe hardware Z-buffer in abackground coloraffecting onlythe Z depth in the Z-buffer. Then, strokes are rendered intothe Z-buffer in the object’s original color, leaving the finalrendering with the set of visible line art strokes only. Theline art strokes are translated a small amount in Z toward theviewer to prevent from Zfightingor collision with the pre-viously rendered polygons of the same objects and thereforeat the same Z depths.

If the graphics hardware supports back face culling ortransparency, these capabilities may be exploited in the realtime line art rendering scheme we are presenting. Further,assume the object is closed and that the normals are point-ing out of the object. Then, ifhNi ;Vi > 0, pointPi is in theback portion of the object and is clearly invisible. Further-more, given a cone’s axis,Vl , if hVl ;Vi > sin(αm), then allthe strokes contained in coneC(Vl ;αm) are invisible as well.In other words, the cones’ buckets onS2 of the normals ofScan also aid in the efficient back face culling of the invisi-ble strokes. If transparency is supported, hidden portions ofthe object might be seen as well. Moreover, transparency ofsurfaceScan be emulated by drawing strokes onSwhile ig-noring S in the hidden surface removal stage, as was done,for example, in Figure 1 (b).

With a data structure that classifies the normals ofSusingcones that cover the Gauss map ofSand with the aid of thehardware Z-buffer in resolving the hidden surface removalquestion, we are able to provide real time line art renderingof freeform shapes. Section 3 provides several examples.

c The Eurographics Association and Blackwell Publishers 1999.

Page 8: Interactive Line Art Rendering of Freeform Surfaces

Elber / Interactive Line Art Rendering

Algorithm 1

Input:S, a freeform surface.Cm = fC(Vl ;αm)g

ml=1, a coverage ofS2 usingmcones of opening angleαm.�

L jn

j=1, unit vectors ofn directional light sources in the scene.

V, Viewing direction.

RealTimeLineArt(S, Cm,L j , V )begin

(1) m( 1;fPig

ri=1 ( A uniform point set distribution ofr points, coveringS;

fSigri=1 ( A set ofr strokes grown fromfPig

ri=1;

for i from 1 tor doNi ( Normal ofSat Pi ;si ( Arc-length ofSi ;

(2) mi ( 1;for l from 1 tomdo

if ( hVl ;Ni i> cos(αm) )C(Vl ;αm)( Si ;

endfor;

doV ( Updated viewing direction;

(3) m( m+1;for l from 1 tomdo

if ( coneC(Vl ;αm) can contribute visible strokes ) thenfor all ( Si 2C(Vl ;αm) ) do

(4) if ( mi 6=m ) thenIi ( Evaluated shader for normalNi ;if ( Ii > 0 ) then

Display the relative portionsiIi out of strokeSi(5) mi ( m;

endif;endfor;

endif;endfor;

while ( Display Line Art );end;

3. Examples

In this section, we present snapshots from interactive ses-sions that employ the real time line art sketching presentedin this work. All the figures in this section were down loadedfrom the displays of the different hardware platforms onwhich the presented algorithm was implemented with theaid of the IRIT16 modeling environment. Strokes using thedeveloped tools can follow, in our implementation, isopara-metric curves as can be seen in Figure 4 (a), follow linesof curvature2 (Figure 4 (b)) or lines of constant angle ofthe surface normal with respect to some (viewing) direction,lines we denote silhouette lines (Figure 4 (c)). These gener-

alized silhouette lines are closely related with Isophotes14

or line of constant illumination.

The strokes are drawn to follow the intensity that is pre-scribed by the shaders of Section 2.3. In Figure 5 (a), thestrokes are drawn employing only diffuse lighting,I

Di f , fol-lowing Equation (4). In Figure 5 (b), the strokes are drawnby taking into account only silhouette areas,I

Sil, follow-ing Equation (5). Finally, in Figure 5 (c), the two effectsare combined following Equation (6). In all the sequencesof Figure 5, five snapshots from different viewing directionsout of a similar animation sequence are presented. Note that

c The Eurographics Association and Blackwell Publishers 1999.

Page 9: Interactive Line Art Rendering of Freeform Surfaces

Elber / Interactive Line Art Rendering

(a) (b) (c)

Figure 4: a wavy torus. Strokes can be drawn in different styles. Here, strokes are drawn on top of a wavy torus along isopara-metric curves (a), along lines of curvature (b), and along silhouette lines (c). Recorded off a 150MHz R5000/GR3-XZ graphicsboard SGI Indy system.

(a)

(b)

(c)

Figure 5: Samples out of an interactive display of the Utah teapot on a 150MHz R5000/GR3-XZ graphics board SGI Indysystem. In (a), the strokes are developed to follow shaderI

Di fi in Equation (4). In (b), the strokes are developed to follow

shaderISili in Equation (5). (c) shows the two shaders combined, following Equation (6).

the more the surface is illuminated, the denser are the strokesof the line art.

The time that is necessary to generate the strokes of allthe examples in this section is typically measured in sec-onds and in complex cases, in a minute or two. The render-ing itself took a fraction of a second in all cases, satisfyingthe real time constraint of several frames per second. Thepreprocessing stage is clearly more intensive for complexstrokes’ styles. Yet, generating strokes along isoparametriccurves was found to be about twice as fast than the genera-tion of strokes along silhouette lines and about three times

faster than the generation of strokes along lines of curva-ture. Interestingly enough, in many instances the visual dif-ferences between the different strokes’ styles were found tobe minor. The simplest strokes’ style of isoparametric curvesserved well and was surprisingly satisfactory.

The memory requirements that are imposed on the dis-play hardware are comparable to the load that is placed bya polygonal approximation of the freeform surfaces that istypically used for shaded display of these surfaces. Simplescenes like in Figures 4 and 5 can be interacted with on lowend graphics machines such as SGI Indys or even Windows

c The Eurographics Association and Blackwell Publishers 1999.

Page 10: Interactive Line Art Rendering of Freeform Surfaces

Elber / Interactive Line Art Rendering

NT, Pentium based systems. One can expect that complexscenes, such as the one in Figure 6, would require a highend system to provide a shaded display, in real time. Simi-larly, this scene of a chess set requires a high end machine toprovide real time line art rendering.

Going to very low end systems with software based ren-dering, the line art renderings of Figure 7 was created usingan implementation of the proposed algorithm on a WindowsNT Pentium based system. The strokes of the object maypreserve the original object’s color, and in Figure 7, threeinterlocked rings are presented, each one with strokes in adifferent color.

One can combine the real time line art illustrations gener-ated in this work with a shaded display of the same model,as is done for example in3; 4. Furthermore, one can exploittransparency emulation capabilities in the graphics hardwareand display transparent objects along with line art illustra-tions. Nevertheless, the simulation oftransparencyhas asimple alternative in the context of this work. One could em-ploy the transparent surfaces during the strokes’ generationstage while completely ignoring these same surfaces dur-ing the hidden surface removal stage. Figure 8 shows threeinstances of such an approach to the generation of trans-parency effects, for a model of a light bulb which is mostlytransparent.

4. Conclusion

The meaning of real time algorithms in computer graphicsis quite vague. An algorithm that several years ago wentminutes to completion takes seconds today and hence ap-proaches real time interaction levels. This inconsistency sug-gests that one should seek a different measure for real timecomputer graphics algorithms. An algorithm might be con-sidered a real time interactive algorithm provided it has thecapability to respond with several frames a second on awhole range of computing platforms, automatically tradingbetween quality and speed. In other words, the algorithmshould adapt to the computation power available and gen-erate its output (images) at a fixed, real time rate, at the pos-sible cost of the output’s quality. Such an algorithm shouldalso be capable ofautomaticallyexploiting the computa-tional capabilities that will be introduced by faster machine,in the future. For example, herein, the number of line artstrokes could be adjusted according to the available compu-tational resources, making the presented algorithm feasiblefor use on low end Pentium based machines with softwarebased rendering capabilities as well as high end graphicsworkstations.

In this work, we have presented tools that make interactiveline art rendering of freeform surfaces a reality. This intro-

duced capability may exploit many other techniques com-mon in computer graphics. Because the strokes’ generationphase is not part of the interaction stage, one can invest moreeffort into this phase. In8, strokes were also developed tofollow the gradients of given parametric texture maps, or tofollow a prescribed fixed univariate pattern. These two typesof strokes’ styles can clearly be incorporated into this work,as well as any other style of strokes, for example, strokes thatfollow some prescribed texture functions. In8; 15, strokes aredeveloped for implicit surfaces of medical data sets, alonglines of curvature. These line strokes can now be classifiedinto buckets based on their normals as is done in this workfor parametric surfaces, providing real time display of lineart rendering of implicit surfaces

In a similar way, the shader can be arbitrary. One can fore-see shaders that emphasize geometric properties of the sur-face such as curvature, convex regions vs. concave regions,or lines of discontinuities. Alternatively, the shader can bemodified to consider specular lighting.

This work proposed to subdivide the unit sphere usingcones into spherical cap regions that form a coverage ofS2.If the number of strokes necessitates that, one can form a hi-erarchy of such subdivisions, forming a crude coverage ofS2

with few cones that leads to several layers of finer and finercoverages ofS2 that finally ends up at the smallest cones thatcontain the normals of the strokes. The potential benefits, incomplex geometric scenes,of forming such a hierarchy com-pared to the single layer of cones that was employed in thiswork is yet to be revealed.

References

1. A. Appel, F. J. Rohlf, and A. J. Stein. The Haloed LineEffect for Hidden Line Elimination. Computer Graph-ics, Vol. 13, No. 2, pp. 151-157, Siggraph 1979.

2. M. D. Carmo. Differential Geometry of Curves andSurfaces. Prentice-Hall 1976.

3. D. Dooley and M. F. Cohen. Automatic illustration of3D geometric models: Lines. Computer Graphics, Vol.24, No. 2, pp 77-82, March 1990.

4. D. Dooley and M. F. Cohen. Automatic illustration of3D geometric models: Surfaces. Proceedings of Visu-alization ’90, pp 307-314, October 1990.

5. G. Elber and E. Cohen. Hidden Curve Removal for FreeForm Surfaces. Computer Graphics, Vol. 24, No. 4, pp.95-104, Siggraph 1990.

6. G. Elber. Line Illustrations2 Computer Graphics. TheVisual Computer, Vol 11, No 6, pp 290-296, 1995.

c The Eurographics Association and Blackwell Publishers 1999.

Page 11: Interactive Line Art Rendering of Freeform Surfaces

Elber / Interactive Line Art Rendering

(a) (b)

Figure 6: A Chess set. Highly complex scenes can also be displayed in real time on high end machines. In (a), the silhouettesare emphasized while in (b) anillumination from the left is beingadded. Recorded off a 180MHz R10000/Reality GraphicsBoard Onyx2 SGI system.

(a) (b)

Figure 7: Borromean Rings. Strokes can be drawn in the original colors of the objects, resulting in a betterunderstanding ofthe model, as in this case of three interlocking rings. These two views were recorded off a Pentium PC running Windows NT.

7. G. Elber. Line Art Rendering via a Coverage of Isopara-metric Curves. IEEE Transactions on Visualization andComputer Graphics, Vol 1, No 3, pp 231-239, Septem-ber 1995.

8. G. Elber. Line Art Illustrations of Parametric and Im-plicit Forms. IEEE Transactions on Visualization andComputer Graphics, Vol 4, No 1, pp 71-81, March1998.

9. W. R. Franklin and V. Akman A simple and EfficientHaloed Line Algorithm for Hidden Line Elimination.Computer Graphics Forum, Vol. 6, No. 2, pp. 103-110,

1987

10. R. H. Hardin, N. J. A. Sloane and W. D. Smith.Spherical Coverings. http://www.research.att.com/�njas/coverings/index.html.

11. P. N. Hasluck Manual of Traditional Wood Carving.Dover Publications, Inc., NewYork, 1977.

12. D. Hilbert and S. Cohn-Vossen. Geometry and theImagination. Chelsea Publishing Company, New York,Second edition1990.

13. C. Hornung, W. Lellek, P. Pehwald, and W. Strasser. An

c The Eurographics Association and Blackwell Publishers 1999.

Page 12: Interactive Line Art Rendering of Freeform Surfaces

Elber / Interactive Line Art Rendering

(a) (b) (c)

Figure 8: A light bulb. The transparency effect in real time line art drawings is achieved by exploiting the transparent objectonly during the strokes’ generation stage. In (a), strokes are emphasizing the silhouette areas. In (b), light sources to the left andto the right of the light bulb are placed while the silhouettes emphasis is set to the bare minimum. In (c), strokes are followinga constant layered wood style effect throughout the model. Recorded off a 150MHz R5000/GR3-XZ graphics board SGI Indysystem.

Area-Oriented Analytical Visibility Method for Dis-playing Parametrically Defined Tensor-Product Sur-faces. Computer Aided Geometric Design, Vol 2, pp.197-205, 1985.

14. J. Hoschek and D. Lasser. Fundamentals of ComputerAided geometric Design. A K Peters, Wellesley, Mas-sachusetts, 1993.

15. V. L. Interrante. Illustrating Surface Shape in VolumeData via Principal Direction-Driven 3D Line IntegralConvolution. Computer Graphics, pp. 109-116, Sig-graph Aug. 1997.

16. IRIT 7.0 User’s Manual, February 1997, Technion.http://www.cs.technion.ac.il/�irit.

17. W. M. Ivins. How Prints Look, Photographs with Com-mentary. Beacon Press, Boston, Revised edition 1987.

18. W. M. Ivins. Prints and Visual Communication. TheMIT Press, Eighth printing, 1992.

19. J. Lansdown and S. Schofield. Expressive Rendering: AReview of Non-Photorealistic Techniques. IEEE Com-puter Graphics and Applications, Vol. 15, No. 3, pp 29-37, May 1995.

20. W. Leister. Computer Generated Copper Plates. Com-puter Graphics Forum, Vol. 13, No. 1, pp 69-77, March1994.

21. L. Markosian, M. A. Kowalski, S. Trychin, L. Bour-dev, D. Goldstein, J. F. Hughes. Real-Time Non-Photorealistic Rendering. Computer Graphics, pp. 415-420, Siggraph Aug. 1997.

22. B. Meier. Painterly Rendering for Animation. Com-puter Graphics, pp. 477-484, Siggraph Aug. 1996.

23. Y. B. Pnueli and A. M. Bruckstein. DigiDürer - A Dig-ital Engraving System. The Visual Computer, Vol 10,pp 277-292, 1994. Also CIS report No. 9210, ComputerScience Department, Technion, IIT, June 1992.

24. T. Saito and T. Takahashi. Comprehensible Renderingof 3-D Shapes. Computer Graphics, Vol. 24, No. 4, pp.197-206, Siggraph Aug. 1990.

25. M. P. Salisbury, S. E. Anderson, R. Barzel, andD. H. Salesin. Interactive Pen-and-Ink Illustration.Computer Graphics, pp. 101-108, Siggraph Aug. 1997.

26. M. P. Salisbury, M. T. Wong, J. F. Hughes, andD. H. Salesin. Orientable textures for Image-Based Penand Ink Illustration. Computer Graphics, pp. 401-406,Siggraph Aug. 1997.

27. L. Velho and J. M. Gomes. Digital Halftoning withSpace Filling Curves. Computer Graphics, Vol 25, No.4, pp. 81-90, Siggraph Jul. 1991.

28. G. Winkenbach and D. H. Salesin. Computer-Generated Pen-and-Ink Illustration. Computer Graph-ics, pp. 91-98, Siggraph Jul. 1994.

29. G. Winkenbach and D. H. Salesin. Rendering Paramet-ric Surfaces in Pen and Ink. Computer Graphics, pp.469-476, Siggraph Aug. 1996.

30. A. P. Witkin and P. S.Heckbert. Using Particles to Sam-ple and Control Implicit Surfaces. Computer Graphics,pp. 269-277, Siggraph Jul. 1994.

c The Eurographics Association and Blackwell Publishers 1999.