このページは http://www.slideshare.net/alexvlachos/curved-pn-triangles の内容を掲載しています。

掲載を希望されないスライド著者の方は、こちらよりご連絡下さい。

- Curved PN Triangles

✁✄✂

☎

Alex Vlachos

J¨org Peters

Chas Boyd

Jason L. Mitchell

☎

✁

ATI Research

Microsoft Corporation

University of Florida

Figure 1: Which rendering would you prefer? (from left to right) (a) Input triangulation, (b) Gouraud shaded input triangulation, (c) geometric

component of the PN triangles (shaded according to surface normal variation) (d) curved PN triangles (shaded with independently constructed

quadratically varying normals).

Abstract

1

Introduction

To improve the visual quality of existing triangle-based art in real-

In interactive 3D entertainment, software design cycles are long

time entertainment, such as computer games, we propose replacing

and hardware product release cycles are short. As a result, new

flat triangles with curved patches and higher-order normal variation.

techniques added to hardware must have a simple migration path if

At the hardware level, based only on the three vertices and three

content already in development is to use the technique; conversely,

vertex normals of a given flat triangle, we substitute the geometry

the less change a new hardware feature imposes on the art pipeline

of a three-sided cubic B´ezier patch for the triangle’s flat geometry,

and API, the more likely it is to be used.

and a quadratically varying normal for Gouraud shading. These

A majority of computer games use triangles as their fundamental

curved point-normal triangles, or PN triangles, require minimal or

modeling primitive, and all use triangles for hardware-accelerated

no change to existing authoring tools and hardware designs while

rendering. This is the result of existing tool support, hardware sup-

providing a smoother, though not necessarily everywhere tangent

port and the artist’s familiarity with triangles. It is increasingly

continuous, silhouette and more organic shapes.

common for applications to pass normals to the hardware to take

CR Categories:

I.3.5 [surface representation, splines]: I.3.6—

advantage of transform-capable video cards.

graphics data structures

In this paper, we introduce curved point-normal triangles, or

short PN triangles, as an inexpensive means of improving visual

Keywords: curved surface, PN Triangle, hardware, real-time, sur-

quality by smoothing out silhouette edges and providing more sam-

face tessellation

ple points for vertex shading operations. Each PN triangle replaces

✆

NSF NYI CCR-9457806, jorg@cise.ufl.edu, chasb@microsoft.com,

one original flat triangle by a curved shape that is retriangulated into

AVlachos@ati.com, JasonM@ati.com

a programmable number of small (flat) subtriangles. We select this

representation for a resource-limited hardware environment: the PN

triangle is to be generated on-chip without any software assistance.

Specifically, PN triangle generation and subtriangulation are to be

inserted between the vertex-and-primitive-assembly stage and the

vertex-shading stage of the graphics pipeline (Figure 2).

The geometry of a PN triangle is defined as one cubic B´ezier

patch. The patch matches the point and normal information at

the vertices of the flat triangle. Its normal is a separate linear or

quadratic B´ezier interpolant of the data. No additional data beyond

the position and normal data are used. Other data attached to the flat

input triangle are forwarded to the subtriangles, mostly by linearly - Figure 3: The coefficients or control points of a triangular B´ezier

patch arranged to form a control net.

Figure 2: Curved PN triangle tessellation in the graphics pipeline

2

Basic form, API-level usage and place-

ment in the graphics pipeline

interpolating the values at the vertices of the flat input triangle.

We want to leverage the existing (flat) triangle-based data structures

such as vertex arrays: a stream of point and normal coordinates fol-

The PN triangle emerged in comparison with more sophisti-

lowed by sets of indices that allow picking the vertices of a triangle

cated surfacing methods to address requirements specific to the

from the stream. That is, for each triangle, only the

coordinates

resource-limited hardware environment, e.g. that no information

✝✟✞✡✠

of the position and normal of the three vertices of the triangles are

about neighboring triangles can be accumulated:

available and there is a unique normal for each vertex.

1. Improved visual appeal.

An interesting aspect of the curved PN triangle that may surprise

the non graphics-immersed reader is that the normal component of

the curved PN triangle is independently specified from the geomet-

2. Compatibility with existing API data structures: vertex arrays

ric component of a curved PN triangle. The geometry of a curved

plus triangle index streams where triangles arrive in unpre-

PN triangle defined by a cubic patch

(c.f. Figure 3)

☛

dictable order. Minimal or no modification of existing APIs.

✏✒✑✓

✔✖✕

✕

✕

✕

3. Backward compatibility of the models with hardware that

for

☛✌☞✎✍

✍

✗✙✘✛✚✒✜✣✢✤✜✦✥

✢

✥

✗✛✧✩★

does not support PN triangles; minimal or no effort to adapt

✯

✲

✴

✕

✕

existing models.

✯

✲✳✴✹✸✡✺

☛✄✪✫✢

✥✡✬✭✘

✮

☛

✻

✢

✥

✗

✯✱✰✡✲✳✰✵✴✷✶

✔

✺

✼✽✺

✾✿✺

✔❄❃

✔❄❃

✔

4. No setup step of the application, API, or hardware driver;

✔❂❁❂❁

❁❂✔❂❁

❁❂❁❂✔

✘❀☛

✗

☛

✢

☛

✥

in particular, hardware should not have to provide intermedi-

✏

✏

✏

❃

❃

❃

✏❆❅❇❁

❅❈✏❉❁

✏❉❁✳❅

ate storage for random access; consequently knowledge about

☛

✗

✢

☛

✗❊✢

☛

✗

✥

✸

✸

✸

❃

✏

❃

✏❄❃

✏

neighboring facets is restricted to the shared vertices and ver-

❁❋✏❆❅

❅❇❁❋✏

❁✳❅❈✏

☛

✢

✥

☛

✗●✥

☛

✢✟✥

tex normals on the common edge.

✸

✸

✸

❃

❅❂❅❂❅✳❍

☛

✗❊✢■✥✟❏

5. Applicability to shapes of arbitrary topology.

We group the ✯ ✲❆✴ together as

☛

6. Fast execution and simple implementation in hardware.

✕

✕

✕

vertex coefficients:

✔❂❁❂❁

❁❂✔❂❁

❁❂❁❂✔

☛

☛

☛

In particular, it is not the purpose of PN triangles to convert trian-

✕

✕

✕

✕

✕

✕

✏❆❅❇❁

❅❈✏❉❁

❁❋✏❆❅

❁✳❅❈✏

❅❇❁❋✏

✏❉❁✳❅

gulations into designer quality, everywhere smooth surfaces, but to

tangent coefficients:

☛

☛

☛

☛

☛

☛

soften triangle creases and improve the visual appeal by generating

center coefficient:

❅❂❅❂❅

☛

❏

smoother silhouettes and better shading.

The following sections will define the API-level usage and place-

ment of the curved PN triangles in the graphics pipeline (Section 2),

give a precise derivation of the PN triangle and its properties (Sec-

Coefficients are also often called control points and are connected

tion 3), and then discuss performance and visual impact to convince

to form a control net or control polyhedron (see Figure 3). The

the reader that the requirements are well addressed by curved PN

normal component of a curved PN triangle is either a linear average

triangles.

of the vertex normals or a quadratic function of the positional and - Figure 5: Input data: points

✯

and normals

✯

.

�

◗

2.1

Why choose cubically varying geometry and

quadratically varying normals?

In opting for cubic geometry and quadratic normals, we balanced

the simplicity needed for hardware realization with a modeling

range that would allow us to improve contours and shading.

Simplicity means that we do not generate and store neighborhood

information, as would be required by generalized subdivision algo-

rithms (e.g. [10, 8]) or surface splines [13]. Simplicity made us

opt for a closed-form, polynomial surface representation that is fast

to evaluate with little memory use. While it is possible to derive

Figure

smoothly joining patches without being able to look at the neighbor

✕

4: Subtriangulation (lod 0 through 5) induced by a uni-

form

grid (top) and the visual effect of two light sources on an

(by deriving a unique normal along the common boundary for each

✢

✥

octahedron (bottom).

of the abutting patches) the corresponding surface representations

are expensive: Nielson’s adaptation of the Coon’s patch [11] for

example (or [7], [1]) yields surface pieces of high rational degree

and with (removable) singularities at the vertices. The exact surface

normal data. The quadratic function

is defined as (c.f. Figure 7)

❑

normals are a challenge to compute. Polynomial tangent continu-

ous constructions require several pieces per triangle, e.g. a Clough-

✏▲✑✓

✔✖✕

✕

✕

✕

for

Tocher-like split [2], [16],[15] since the tangents of one edge must

❑✦☞✎✍

✍

✗❀✘✛✚▲✜✣✢✤✜✦✥

✢

✥

✗▼✧✩★

✯

✲

✴

✕

✕

not take information from the neighboring edge into account. (Both

✯

✲❆✴

❑✭✪✫✢

✥✡✬✭✘

✮

❑

✢

✥

✗

the original Powell-Sabin [14] and Clough-Tocher constructions do

✯◆✰✡✲✳✰✵✴✷✶

✏

not apply in the setting of free-form surfaces.) Since tangent conti-

✏❄❃

✏✭❃

✏

✏❉❁❂❁

❁❋✏❉❁

❁❂❁❋✏

nuity does not imply overall better visual impression (smooth inter-

✘❖❑

✗

❑

✢

❑

✥

❃

❃

❃

polating schemes often generate extraneous creases, see Figure 12),

❅❂❅❇❁

❁✳❅❂❅

❅❇❁✳❅

❑

✗●✢

❑

✢✟✥

❑

✗❊✥✟❏

we settled for a least cost surface with one polynomial piece per tri-

angle. Its geometric shape is not necessarily normal-continuous,

but we improve the shading monotonicity by prescribing a sepa-

We call

❅❂❅❇❁

,

❁✳❅❂❅

and

❅❇❁✳❅

mid-edge coefficients. The values of

❑

❑

❑

rate, continuous normal. In [17] a more complex construction with

are normalized before they are passed on to the vertex shading

❑

quadratic pieces is used.

stage of the pipeline.

The modeling range of our surface representation should, for

Section 3 describes in detail how to choose the coefficients ✯ ✲✳✴ ,

example, capture inflections implied by the triangle positional and

☛

respectively ✯ ✲❆✴ so that the patches match the position and normal

normal data. This requires at least cubic geometry (quadratics do

❑

at each of the three corners of the original flat triangle. The PN

not have strict inflections) and quadratic normals. The choice of the

triangle is a special three-sided, or “triangular B´ezier” patch. Three-

center coefficient ❅❂❅❂❅ , in particular, allows us to bulge the PN trian-

☛

sided patches were invented by de Casteljau [3]. Farin [6] gives a

gle. There is no additional data to suggest the use of higher degree

thorough treatment of de Casteljau’s patch and its applications.

patches and so we settled on the form of

and

given above. Of

☛

❑

Given the simple, closed form of the patches it is straightforward

course there are many possible choices for the coefficients. The par-

to evaluate and tesselate

and

. In particular, we can efficiently

ticular choice described in the next section has the merit of keeping

☛

❑

subtriangulate both patches over the same uniform ,

grid by pre-

the curved patch provably close to the flat triangle while interpolat-

✢

✥

scribing just one number, the level of detail lod, defined as the

ing its corner position and normals.

number of evaluation points on one edge minus two (c.f. Figure 4).

If lod=0 then the patch is just evaluated at the corners and this is

equivalent to sending the original flat triangle down the graphics

3

PN triangles

pipeline. An application developer enables PN triangles by a call

that specifies lod and a flag that indicates whether

or the linearly

This section specifies and discusses the properties of the choice of

❑

varying normal is to be evaluated (c.f. reffig:oct).

PN triangle geometry and normals respectively. The geometry com- - ❃

Figure 6: Construction of a tangent coefficient: project

❅

✪❇❘❙�

✏

into the tangent plane at

❅

.

�

✬❂❚

�

✸

Figure 7: Coefficients of the normal component of a curved PN

triangle.

ponent will influence, in particular, the object silhouette and the

normal component influences the lighting calculation (vertex shad-

ing). The algorithm assumes an input in the form of vertex arrays,

❃

✕

i.e. there is a unique normal for each vertex; however, there are sit-

❅❇❁❋✏

✔

❅

✔✳❅

✔

☛

✘❴✪❇❘✖�

�

✜❦✗

◗

✬❂❚

✸

❃

✕

uations when two triangulations are to be connected across sharp

✏❉❁✳❅

❅

✔

❅❇✔

❅

☛

✘❴✪❇❘✖�

�

✜❦✗

◗

✬❂❚

✸

edges. The last subsection discusses this case.

❃

❃

❃

❃

❃

❧

✏❆❅❇❁

❅❈✏❉❁

❁❋✏❆❅

❁✳❅❈✏

❅❇❁❋✏

✏❉❁✳❅

❍

✘❴✪✫☛

☛

☛

☛

☛

☛

✬❂❚

❃

❃

✕

❅

✏

✔

❞▼✘❴✪❵�

�

�

✬❂❚

✸

❃

3.1

Geometry coefficients of the PN triangle

❧

❧

❅❂❅❂❅

☛

✘

✪

✜❣❞♠✬❂❚✖❘♥❏

✕

✕

✔

We✕ are✕ given the positions

❅

✏

✔❱❯❳❲

and normals

�

�

�

✔

❅

✏

✔

❯❨❲

of the triangle corners as shown in Figure 5.

◗

◗

◗

Our choice of coefficients (control points)

3.2

Properties of the PN triangle geometry

✯

✲✳✴

is as follows.

☛

While smoothing out contours, the curved PN triangle should not

0 Spread the ✯ ✲✳✴ out uniformly over the❃ flat triangle,

❃

i.e. place

☛

deviate too much from the original triangle to preserve the shape

✻

❅

✏

✔

✯

✲✳✴

in the intermediate position

.

☛

✪

�

�

�

✬❂❚

and avoid interference with other curved triangles. Evidently, the

✼

✾

✸

final geometry interpolates the vertices of the original flat triangles.

1 Leave the vertex coefficients in place so they match the corner

Let

be the length of the longest triangle edge. The lemma be-

♦

positions.

low shows that each cubic boundary curve stays close to its edge,

because its B´ezier coefficients stay within a radius of

❍

of the

♦♣❚

2 For each corner, project the two tangent coefficients closest

❧

edge. Therefore

is within a distance

❍

from the flat triangle

♦❄❚

to the corner into the tangent plane defined by the normal at

and, since

lies on the triangle, ❅❂❅❂❅ ’s distance to the triangle is

❞

☛

the corner. Here projection means: find the closest point on

at most

. An improved estimate, since the coefficients are only

♦♣❚❡q

the plane to the point. This is illustrated by Figure 6. Recall

approximate, yields

❍

the for the center and

for the bound-

♦♣❚

♦♣❚❙r

that the projection of a point

onto a plane with normal

ary.

❩

◗

attached to a point

is

where

�

❩❭❬✟✘❀❩❪✜❊✗❫◗

✗✙✘❴✪❵❩❛✜✌�❭✬✷❜❝◗

and denotes a the dot product.

Lemma 3.1 The❃ coefficient ✏❆❅❇❁ lies on a circle of radius

❅

❜

☛

s✳�

✜

❅

✏

❍

about

❅

✏

❅

.

t

�

s✳❚

�

✪❵�

✜✣�

✬

3 Move the center coefficient from its intermediate position ❞

to the average of all six tangent points and continue its motion

Proof

[Thales of Milet, 500 B.C.] The locus of all right triangle

in the same direction for

the distance already traveled.

✚❡❚✖❘

corners above a line of length

is a semicircle of radius

❍

.

♦❄❚

♦❄❚

✸

✉✫✈

In formulas for implementation, coefficients or control points of the

curved PN triangle are defined as follows:

❃

❧

✕

Symmetry suggests a formula of the type ❅❂❅❂❅

☛

✘❴✪❉✚✽✜❭✇✭✬

✇①❞

✔❂❁❂❁

❅

☛

✘✙�

✕

for the central coefficient. ❃ The specific choice

❃

which

✇✛✘②✜③✚✐❚✄❘

❁❂✔❂❁

✏

❧

❧

❧

❧

☛

✘✙�

results in ❅❂❅❂❅

☛

✘❴✪❉✚✿✜♠✇✭✬

✇✭❞④✘

❚✄❘⑤✜⑥❞♠❘✌✘

✪

✜✤❞✌✬❂❚✖❘

✕

✸

❁❂❁❂✔

✔

reproduces quadratic polynomials exactly as shown by Farin[5]. In

☛

✘✙�

✕

other words, if the other nine coefficients were already chosen to

✯

✲

✲

✯

✯

❯❥❲

here ‘ ’ is the scalar product

✗

✘❢✪❵�

✜❣�

✬❤❜✐◗

❜

❃

✕

represent a quadratic polynomial patch, then

makes the

✇❣✘❴✜③✚❡❚✖❘

✏❆❅❇❁

❅

✏

❅❈✏

❅

☛

✘❢✪❇❘❙�

�

✜✦✗

◗

✬❂❚

PN triangle equal to the quadratic polynomial. Alternatively, ❅❂❅❂❅

✸

❃

✕

☛

❅❈✏❉❁

✏

❅

✏❆❅

✏

is the average of the three choices that each make one transversal

☛

✘❢✪❇❘❙�

�

✜✦✗

◗

✬❂❚

✸

❃

✕

❁❋✏❆❅

✏

✔

✏❉✔

✏

tangent function linear.

☛

✘❢✪❇❘❙�

�

✜✦✗

◗

✬❂❚

✸

❃

✕

If we assume that the triangles stem from a triangulation that has

❁✳❅❈✏

✔

✏

✔❋✏

✔

☛

✘❢✪❇❘❙�

�

✜✦✗

◗

✬❂❚

✸

one normal associated with each vertex, then the boundary curves

of abutting PN triangles are generated by the same algorithm, and - Figure 9: Construction of the mid-edge normal coefficient

❅❂❅❇❁

for

❑

quadratically varying normals: the average of the end-normals is

reflected across the plane perpendicular to the edge.

Figure 8: Linear interpolation of the normals at the endpoints (top)

ignores inflections in the curve while the quadratic normal construc-

lows for

✯

(c.f. Figure 7):

tion of curved PN triangles (bottom) picks up such shape variations.

s❆◗

s✒✘✛✚

✕

✏❉❁❂❁

❅

❑

✘❀◗

✕

❁❋✏❉❁

✏

❑

✘❀◗

✕

the surface is continuous, i.e without cracks. PN triangles do not

❁❂❁❋✏

✔

❑

✘❀◗

usually join with tangent continuity except at the corners. If they al-

❃

✲

✯

✯

✲

✪❵�

✜❣�

✬❤❜❻✪❵◗

◗

✬

ways did, we would have solved an open problem of approximation

✯

✲

❯❼❲

✥

✘✙❘

✲

✯

✲

✯

theory: whether the vertices of a triangulation can be interpolated

✪❵�

✜✣�

✬①❜✄✪❵�

✜❣�

✬

⑩

⑩

✕❽⑩

❃

✕

❅

by a

function with one cubic piece per triangle.

❅❂❅❇❁

❅❂❅❇❁

❅❂❅❇❁

❅❂❅❇❁

❅

✏

❅❈✏

✏

❅

❑

✘

❚✽s

s

✘❀◗

◗

✜✦✥

✪❵�

✜✣�

✬

⑦

⑩

⑩

✕❽⑩

❃

✕

❁✳❅❂❅

❁✳❅❂❅

❁✳❅❂❅

❁✳❅❂❅

✏

✔

✏❉✔

✔

✏

❑

✘

❚✽s

s

✘❀◗

◗

✜✦✥

✪❵�

✜✣�

✬

⑩

⑩

✕❽⑩

❃

❅❇❁✳❅

❅❇❁✳❅

❅❇❁✳❅

❅❇❁✳❅

✔

❅

✔✳❅

❅

✔

❑

✘

❚✽s

s

✘❀◗

◗

✜✦✥

✪❵�

✜✣�

✬❆❏

3.3

Normal coefficients of the PN triangle

The values of

are normalized before they are passed on to the

❑

The normal to the geometry component of the PN triangles does not

vertex shading stage of the pipeline.

generally vary continuously from triangle to triangle (c.f. Figure 1

(c)). Therefore we define an independent linear or quadratic

3.4

Curved Sharp Edges

✕

normal

variation. The value of the normal at a parameter point

under

✢

✥

linear normal variation is the normalized average of the values at

So far we assumed that the data originated from a triangulation

the vertices:

with one normal associated with each vertex. This implies that we

smooth out all edges. To model sharp or crease edges, say a hemi-

sphere capped by a disc, we would like to connect two triangula-

✕

✕

❃

❃

tions by identifying vertices on their global boundary to form the

❅

✏

✔

◗✣✪✫✢

✥✡✬⑧✘

⑨

✘❴✪❉✚✒✜✦✢❛✜✦✥✡✬❉◗

✢✿◗

✥♥◗

❏

⑨

s

s

crease. Evidently, the vertices on the crease now have two distinct

⑨

normals and this must lead to cracks in the surface if only infor-

Since the shading stage

mation based on one of the two flat triangles is available. Spline

✕

✕

of the pipeline

❃✛⑩✵✕

✕

recei

✕

ves

❃▼⑩

subtriangles with

normals,

and generalized subdivision surfaces solve the problem by tagging

⑩

say

for some step-

◗✣✪✫✢

✥✡✬

◗✣✪✫✢

✥✡✬

◗✣✪✫✢

✥

✬

length , linear variation of the normal approximates Phong shad-

the vertices, respectively searching the neighborhood and recogniz-

ing.

ing global boundary status. The argument below shows that with

entirely local information, cracks can not be avoided.

Linearly varying normals ignore inflections in the geometry as

illustrated in Figure 8 (top). We therefore provide the option of

Observation 3.1 (curved sharp creases) If two patches share a

quadratic normal variation. To capture inflections as in Figure 8

vertex but not the corresponding normal, there is no strategy based

(bottom) a mid-edge coefficient for the quadratic map

is con-

only on the vertex and normal information (and respecting the ver-

❑

structed following e.g. [12]: the average of the end-normals is re-

tex and normal information) local to one patch at a time to generate

flected across the plane perpendicular to the edge as illustrated in

the same curve tangent for either patch independent of the normal

Figure 9. Recall that the reflection

of a vector

across a plane

information of the other.

❶

❶

❬

with (unnormalized) normal direction

is

where

❷

❶

✘❢❶✙✜❸❘❙✥♥❷

❬

and denotes a the dot product. Figure 1 (d)

✥❹✘❺✪❵❷▼❜❡❶❫✬❂❚✡✪❵❷▼❜✷❷❹✬

❜

Proof

The tangent of the curve is defined as the intersection of

illustrates this choice of normal.

two planes, each defined by the vertex and one of the two normals.

In formulas for implementation, coefficients or control points of

Since only one plane is known when constructing each patch a con-

the normal component of a curved PN triangle are defined as fol-

sistent choice is only possible by chance.

✉✫✈ - Figure 10: Sharpening a blunt axe (left two) by adding a seam of

small triangles (right). Small triangles at the bottom also isolate the

shaft from its end to keep it more cylindrical.

The observation implies that curved sharp creases with different

normals associated with each side of the (logical) edge between two

triangles will in general result in gaps in the surface.

Figure 11: Mask of PN triangles with linearly varying normal (left)

An exception is the PN construction when the normals at two

and quadratically varying normal (right).

endpoints consistently imply a straight line segment as common

boundary, e.g. when both normals are perpendicular to the edge.

We are considering several options to also support curved sharp

creases, e.g. increasing the number of indices in the input stream

To get a more detailed estimate of the impact, we need to con-

from three to (at most) nine for triangles with up to six crease half-

sider fill rate and vertex shading. Fill rate is not a bottleneck since

edges. The additional indices point to the point-normal pair of the

the screen area in pixels is unchanged. Vertex shading (transfor-

abutting triangle in the neighboring triangulation. This setup sup-

mation and lighting) and triangle set up, on the other hand, have to

ports darts, i.e. edges that are sharp at one end and smooth at the

cope with a larger number of vertices. The overall rendering perfor-

other, as well as generic crease edges.

mance, in many applications, is, however, limited by the bandwidth

The algorithm for determining the PN triangle geometry is un-

needed to feed vertices to the graphics processor rather than the

changed except that we now project onto a tangent line to obtain the

graphics processor cycles available for the geometry. Therefore,

❅

✏

tangent coefficient of an edge: let

and

be the two normals

if the processor is sufficiently fast and the bus is busy, curved PN

◗

◗

associated with the crease

triangles render at the same speed as flat triangles.

❃✤❾

point

❅

along the edge

❅

✏

. Then ✏❆❅❇❁

�

�

�

☛

❅✵❿

✏

❿

has to lie on the line

Allowing a higher-order surface primitive, such as curved PN

❅

❃

where

is the cross product

�

✪❵◗

◗

✬

and

triangles, to be passed directly to hardware is a form of geometry

✏❆❅❇❁

is the projection of

❅

✏

onto that line:

☛

✪❇❘✖�

�

✬❂❚

✸

compression that reduces bus traffic into the graphics chip. PN tri-

angles, like other curved surface primitives, can act as a level of

✏

❅

❅

✏

❃

✕

❿

✪❵�

✜❣�

✬①❜✳➀

✏❆❅❇❁

❅

detail mechanism. Since the input to the PN triangle stage is the

☛

✘✙�

➀

➀❀✘❀◗

◗

❏

✸

lowest level of detail, a flat triangle, its storage costs and bandwidth

Currently, as illustrated in Figure 10, a software preprocessing

usage are minimal; and we can obtain higher levels of detail on

step adds a rim of small triangles along edges intended to be sharp.

the fly. If, instead, a developer were to store models for lod 0-4

(Figure 4) she would need approximately 70 times the amount of

memory.

Key-frame interpolation is another instance where PN triangles

4

Hardware Performance

substantially enhance performance. Given two models with iden-

tical topology, either the CPU or the graphics processor must gen-

As Figure 2 illustrates, curved PN triangles are generated and

erate interpolated values between the vertex positions of the two

tesselated in the pipeline stage inserted between the vertex-and-

models. An application can reduce the number of vertices it has to

primitive-assembly stage and the vertex-shading stage. The vertex-

store by applying the PN triangle algorithm after key-frame inter-

and-primitive-assembly stage combines multiple streams of data

polation.

such as 3-space position, 3-space normal, 3-space tangent vectors,

In summary, PN triangles can be viewed as a method for com-

texture coordinates and colors. Of these, the PN triangle construc-

pressing geometry. Both bus bandwidth and memory usage can be

tion only uses position and normal data. The other data are for-

substantially reduced by employing coarser input and PN triangles.

warded to the subtriangles typically by linearly interpolating the

values at the vertices of the flat input triangle. Vector-valued at-

tributes can also use quadratic interpolation. Because the input and

5

Visual Results

output triangles of the curved PN triangle stage are of the same

format, the impact on the design on adjacent pipeline stages is min-

Figure 11 highlights the difference in visual appearance between

imal.

curved PN triangles with linear and with quadratic normal. At

To get an initial estimate of the impact of inserting the triangle-

times, the PN surface rendering is even preferable to the exact ren-

spawning PN triangle stage, we determined the number of vector

dering of higher quality surfaces. Figure 12 places next to each

operations for each output subtriangle vertex. The vector opera-

other a 20-triangle cone refined with Butterfly interpolating subdi-

✏

tions are dot products, additions of two vectors, scaling and per-

vision [4] (which converges to an almost everywhere

surface)

⑦

component multiply of two vectors. The current implementation

and the geometrically non-smooth surface of curved PN triangles.

uses between 6.8 and 11.6 vector operations per generated vertex

Surfaces generated with modified Butterfly [18] and interpolatory

➁

depending on the number of evaluations. lod 2 and 3 (see Figure

subdivision ([9], Figure 10) exhibit the same extraneous oscil-

✸

4) have the highest ratio of vector operations per vertex.

lations as Butterfly interpolating subdivision. Our experiments with - [3] P. de Casteljau. Outillages m´ethodes calcul. Technical report,

A. Citroen, Paris, 1959.

[4] Nira Dyn, David Levin, and John A. Gregory. A butterfly sub-

division scheme for surface interpolation with tension control.

ACM Transactions on Graphics, 9(2):160–169, April 1990.

[5] Gerald Farin. Smooth interpolation to scattered 3D data. In

Robert E. Barnhill and Wolfgang Boehm, editors, Surfaces

in Computer-Aided Geometric Design, pages 43–63. North-

Holland, 1983.

[6] Gerald Farin. Triangular Bernstein–B´ezier patches. Computer

Aided Geometric Design, 3(2):83–127, 1986.

[7] J. A. Gregory. Smooth interpolation without twist constraints,

pages 71–88. Academic Press, 1974.

➁

Figure 12: Input ‘diamond model’ (top), Butterfly interpolatory

[8] L. Kobbelt.

subdivision. SIGGRAPH 2000 Conference

✸

subdivision [4], (left), and the curved PN triangle surface (right).

Proceedings, pages 103–112, 2000. New Orleans.

➁

(Compare also with modified Butterfly and interpolatory

subdi-

[9] U. Labsik and G. Greiner. Interpolatory sqrt(3)-subdivision.

✸

vision shown in Figure 10 of [9]).

In M. Gross and F. R. A. Hopgood, editors, Computer Graph-

ics Forum (Eurographics 2000), volume 19(3), 2000.

characters from existing games demonstrate an appreciable increase

[10] Charles T. Loop. Smooth subdivision surfaces based on tri-

in visual quality already for lod 1 or 2; the models rendered on the

angles, 1987. Master’s Thesis, Department of Mathematics,

right in Figure 13 use lod=6.

University of Utah.

[11] G. Nielson. A transfinite, visually continuous, triangular in-

6

Conclusions and Future Work

terpolant, pages 235–246. SIAM, 1987.

[12] C. W. A. M. Van Overveld and B. Wyvill. Phong normal inter-

Curved PN triangles aim at providing a smoother silhouette and

polation revisited. ACM Trans. on Graphics, 16(4):397–419,

more organic shape for triangle-based models at a minimal cost for

October 1997.

model preparation, application program modification, and render-

ing performance. Curved PN triangles can be viewed as a triangle

[13] J. Peters. Smoothing polyhedra made easy. ACM Transactions

multiplier in that each PN triangle takes on input a flat triangle and

on Graphics, 14(2):161–169, April 1995.

outputs many subtriangles in the same format. Sending a coarser

triangulation to be rendered can therefore be viewed as a form of

[14] M. J. D. Powell and M. A. Sabin. Piecewise quadratic approx-

geometry compression that reduces bandwidth requirements and al-

imations on triangles. ACM Transactions on Mathematical

lows more geometry to be delivered to graphics memory, because

Software, 3(4):316–325, December 1977.

the subtriangles ultimately rendered exist only on the chip. The

[15] L. A. Shirman and C. H. S´equin. Local surface interpola-

underlying architecture is a first step towards supporting much ne-

tion with B´ezier patches: Errata and improvements. Computer

glected triangle-based surfaces at the hardware level.

Aided Geometric Design, 8(3):217–222, August 1991.

[16] Leon A. Shirman and Carlo H. Sequin. Local surface inter-

Acknowledgments

polation with bezier patches. Computer Aided Geometric De-

sign, 4(4):279–295, December 1987.

We would like to thank our colleages at ATI Research, especially

Steve Morein, Clay Taylor, Vineet Goel and Andy Gruber, as well

[17] K van Overveld and B. Wyvill.

An algorithm for

as Charles Loop from Microsoft Research and Xiaobin Wu at the

polygon subdivision based on vertex normals.

1997.

University of Florida for their input. The conference committee,

http://www.win.tue.nl/cs/tt/kees/graphics.references.

especially Carlo Sequin, provided a variety of useful suggestions

to help make this a stronger paper. We would also like to thank id

[18] Denis Zorin, Peter Schroeder, and Wim Sweldens. Interpolat-

Software for the models used in Figure 13, and Sam Howell of ATI

ing subdivision for meshes with arbitrary topology. In SIG-

Research provided some of the other models and illustrations.

GRAPH 96 Conference Proceedings, pages 189–192, 1996.

References

[1] H. Chiyokura and F. Kimura. Design of solids with free-form

surfaces. In SIGGRAPH 83 Conference Proceedings, volume

17(3), pages 289–298, July 1983.

[2] R. Clough and J. Tocher. Finite element stiffness matrices for

analysis of plates in blending. In Proceedings of Conference

on Matrix Methods in Structural Analysis, 1965. - Figure 13: A family of game characters (left) and their PN triangle counterparts (right). The models were provided by id Software. None of

these characters were authored with PN triangles in mind.