Conference PaperPDF Available

Precise vector textures for real-time 3D rendering

Authors:

Abstract and Figures

Vector graphics representations of images are resolution independent. Direct use of vector images for real-time texture mapping would be desirable to avoid sampling artifacts such as blurring common with raster images. Scalable Vector Graphics (SVG) files are typical of vector graphics image representations. Such representations composite images from layers of paths and strokes defined with lines, elliptical arcs, and quadratic and cubic parametric splines. High-quality texture mapping requires both random access and anisotropic antialiasing. For vector images, these goals can be achieved by computing the distance to the closest primitives from a sample point and then mapping this distance through a soft threshold function. Representing transparency masks in this way is especially useful, since vector mattes can be used to render complex curvilinear geometry as textures on simple geometric primitives. Unfortunately, computing the exact minimum distance to the parametric curves used in vector images is difficult. Previous work has used approximations, but an accurate minimum distance is desirable in order to enable wide strokes and special effects such as embossing. In this paper, a simple algorithm is presented that can efficiently and accurately compute the minimum distance to a parametric curve when the sample point is within its radius of curvature and the curve can be segmented into monotonic regions. This technique can be used in a GPU shader to render antialiased vector images exactly as defined by SVG files.
Content may be subject to copyright.
Precise Vector Textures for Real-Time 3D Rendering
Zheng Qin
University of Waterloo
Michael D. McCool
University of Waterloo and RapidMind, Inc.
Craig Kaplan
University of Waterloo
Figure 1: A scene using several vector textures with some closeups showing embossing and transparency.
Abstract
Vector graphics representations of images are resolution indepen-
dent. Direct use of vector images for real-time texture mapping
would be desirable to avoid sampling artifacts such as blurring
common with raster images. Scalable Vector Graphics (SVG) files
are typical of vector graphics image representations. Such repre-
sentations composite images from layers of paths and strokes de-
fined with lines, elliptical arcs, and quadratic and cubic parametric
splines.
High-quality texture mapping requires both random access and
anisotropic antialiasing. For vector images, these goals can be
achieved by computing the distance to the closest primitives from a
sample point and then mapping this distance through a soft thresh-
old function. Representing transparency masks in this way is es-
pecially useful, since vector mattes can be used to render complex
curvilinear geometry as textures on simple geometric primitives.
Unfortunately, computing the exact minimum distance to the
parametric curves used in vector images is difficult. Previous work
has used approximations, but an accurate minimum distance is de-
sirable in order to enable wide strokes and special effects such as
embossing. In this paper, a simple algorithm is presented that can
efficiently and accurately compute the minimum distance to a para-
metric curve when the sample point is within its radius of curva-
ture and the curve can be segmented into monotonic regions. This
technique can be used in a GPU shader to render antialiased vector
images exactly as defined by SVG files.
CR Categories: I.3.7 [Computer Graphics]: Three-Dimensional
Graphics and Realism—Color, shading, shadowing, and texture
Keywords: vector graphics, antialiasing, texture, distance to cubic
spline curves.
e-mail: zqin@uwaterloo.ca
e-mail: mmccool@uwaterloo.ca or mmccool@rapidmind.com
e-mail: cskaplan@uwaterloo.ca
1 Introduction
The world around us teems with text, ornamentation, and other
symbolic surface patterns with sharp edges. As we move close
to them, these sharp edges remain sharp. Raster texture maps, the
usual means of decorating surfaces in computer-generated imagery,
do not have this property. As we zoom in to a textured surface, the
surface detail starts to appear blurred or pixelated when we run out
of resolution in the underlying texture map. We would like to cre-
ate a representation of a vector image that allows it to be used like
a texture map, but which looks sharp at any resolution.
Recent research has attempted to address the limitations of stan-
dard raster images by providing direct support for some form of
vector data during texture mapping. These approaches, which are
reviewed in detail in the next section, fall into two main categories:
approximate and exact techniques. In either case, in order to sup-
port texture mapping the representation must support efficient ran-
dom access. Anisotropic antialiasing that can tolerate image warp-
ing is also necessary for high quality results.
Approximate techniques limit the generality of the vector im-
ages supported, or accept reduced image quality in exchange for in-
creased performance. Example tradeoffs of approximate techniques
include rounded corners, limited maximum complexity in a region,
limited color support (for example, a restriction to bi-level images),
and finally support for only a limited set of curve primitive types
(for example, only line segments).
In contrast, exact techniques render content exactly as expressed
in a standard vector image format such as SVG. The advantage of
importing images expressed in a standard representation is that ex-
isting vector graphics tools can be used to edit the content, and sup-
porting the full generality of these tools gives the artist maximum
flexibility.
Unfortunately, SVG and related file formats (such as PDF) rep-
resent boundaries with parametric curves and higher-order splines,
which complicate color retrieval and antialiasing. Fast random ac-
cess and high quality antialiasing require an augmented representa-
tion. Such augmented representations typically combine an accel-
erator structure that limits the boundary features to be considered
for every access with a representation of those features that enables
efficient antialiasing.
Our results contribute to this second category of research. We
compute the exact geometry in the vector image as represented in
the SVG file, and render it with high-quality antialiasing.
We use the signed distance to the closest boundary feature as an
implicit representation of that feature [Frisken et al. 2000]. Once
computed, the signed distance function can be mapped through a
smooth step to obtain a blending function for antialiasing, and the
gradient can be used to modulate the width of the transition to ob-
tain anisotropic antialiasing [Qin et al. 2006]. The distance can also
be used to render strokes of a precise width and to implement spe-
cial effects such as embossing.
The boundaries in standard vector graphics file formats such as
SVG may include points, line segments, elliptical arcs, and spline
curves. We refer to these boundary elements as features. Of these
features, cubic spline curves are the most complex. Unfortunately,
computing the distance to higher-order parametric spline curves di-
rectly is expensive.
The main contribution of this paper is a simple, robust, and prac-
tical way to compute the accurate distance to any curved feature
from a sample point within its radius of curvature. In particular,
higher order parametric spline curves do not need to be approxi-
mated by lower order polynomials, so that the original smoothness
of the boundary is retained. One of the main applications of accu-
rate distance field gradients is embossing; as a secondary contribu-
tion we also present a technique for second-order antialiasing of the
ridge lines that can appear during embossing.
2 Background
Modified interpolation rules for hybrid vector/raster images have
been proposed that support up to four linear discontinuities in ev-
ery pixel [Sen et al. 2003; Sen 2004; Tumblin and Choudhury
2004]. These representations were implemented in real time in
GPU shaders and could even be generated on the GPU. However,
in these representations the linear discontinuities had to go through
opposite edges of each cell, so many line drawings could not be
represented exactly. Antialiasing was also not considered.
In cell-based representations only some cells contain edges, en-
abling a sparse representation. An implementation of antialiased bi-
level vector images was demonstrated using perfect spatial hashing
for sparse storage [Lefebvre and Hoppe 2006], using two arbitrarily
oriented linear edges per pixel.
Cell-based storage with clipped parametric primitives has also
been used [Ramanarayanan et al. 2004], again with modified rules
for raster sample interpolation. This work used a spatial data struc-
ture that could represent an arbitrary number of parametric cubic
boundaries in every cell, and so could support general SVG files
with arbitrary complexity. Subdivision into monotonic regions al-
lowed robust numerical evaluation of exact cubic boundaries, but
the data structure was not implemented in real time on the GPU.
Implicit functions have been used to represent curved disconti-
nuities within a cell. These can be combined with Boolean opera-
tions to support more complex combinations of features in a cell, in-
cluding sharp corners [Ray et al. 2005]. This work also introduced
sprite tables for dynamic layout of text. However, low-order im-
plicit functions can only approximate the curved parametric primi-
tives used in SVG files.
One of the limitations of fixed-size cell-based approaches is the
limited complexity that can be supported in any one region. Warp-
ing of the grid can be used to overcome this limitation to some
extent [Tarini and Cignoni 2005].
Analytic evaluation of implicit functions can be used to represent
exactly all the primitives supported by SVG. In particular, exact im-
plicit forms of parametric cubics can be computed [Loop and Blinn
2005]. Dividing these implicit forms by the magnitude of their gra-
dient gives a function that is similar to the distance function close to
the boundary and can be used for antialiasing. However, paramet-
ric curves represent only a segment of a cubic, while implicits give
the entire curve. Therefore it is necessary to limit the domains over
which these implicit forms are evaluated to avoid phantom edges.
Another approach that can render SVG vector images as texture
maps uses a cellular structure, but with an arbitrarily complex “texel
program” per cell [Nehab and Hoppe 2007]. The texel program
can represent all paths affecting that cell and layer them in SVG
drawing order. This system runs in real time on the GPU, but uses
an implicit form that limits it to segments of quadratic parametric
curves. Cubic parametric curves in the input are approximated.
Thresholding of signed distance fields can be used as a gen-
eral implicit representation of bi-level images and volumes [Frisken
et al. 2000]. If adaptive resolution is used, sharp corners can
be represented, and antialiasing can be implemented using simple
smooth-step thresholding. If uniform sampling is used, sharp cor-
ners cannot be exactly reconstructed, but this limitation is accept-
able in some applications, since this representation is nearly as fast
as ordinary texturing [Green 2007]. It is, however, possible to sup-
port adaptive resolution on GPUs [Kraus and Ertl 2002; Lefebvre
and Hoppe 2007]. Also, the distance samples in the texture can be
modified by optimization so the bilinear interpolation supported in
hardware is a better fit to the vector outlines [Loviscach 2005].
Exact computation of the minimum signed distance to line seg-
ments has been used for bi-level images, in particular font tables,
using a cell-based representation based on packing and local search
[Qin et al. 2006]. This work also presented a scheme for supporting
approximate anisotropic antialiasing, which is especially important
for maintaining the readability of text, and used a sprite map for dy-
namic text layout. The use of exact distance computations permits
special effects such as outlining and embossing.
In order to support the cubic parametric curves found in SVG
files together with these special effects, an exact distance compu-
tation is desirable. Unfortunately, computing the exact distance
from a point to a cubic curve is difficult, since it involves find-
ing the roots of a degree 5 equation [Wang et al. 2002; Plass and
Stone 1983; Johnson and Cohen 2005]; even finding distances to
quadratic curves is hard.
Compared to previous work, our representation is the first that
can handle all the curved primitives in SVG files, including cubics
and elliptical arcs, exactly and in real time. We can also render
these paths with special effects such as outlining and embossing.
3 Algorithm
Our approach has two parts: a preprocessed representation that em-
beds the vector image in a set of texture maps, and an algorithm
implemented in a shader for interpreting this information to com-
pute the color of the vector image at any point. The representation
must support fast access to the minimum amount of data at every
point. The basis of the color computation is a fast distance compu-
tation.
In order to build our representation, a uniform grid is first su-
perimposed on the vector image. Each cell is checked against the
boundary features to find the subset of features that intersect it. All
boundary features that intersect a cell are stored in a per-cell list.
This list is then augmented by features within a certain distance of
the cell to support antialiasing; the extension distance is bounded
by using MIP-maps in the far field.
Color retrieval and boundary antialiasing for any point in a cell
need only consider the cell’s feature list. As mentioned above, the
distance to the closest boundary feature is used for antialiasing, and
the gradient of this function is used for anisotropic antialiasing.
We will talk about how to build the representation in Section 3.1
and then how to compute the distance and use it for antialiasing in
Section 3.2.
3.1 Preprocessing
A typical SVG image is composed of closed paths or strokes. Paths
can have borders of various widths and colors, and can be oriented
in either a clockwise or counter-clockwise direction. The region
enclosed by a path can be filled with a solid color or a gradient.
Strokes may also have colors and widths. For now we will only deal
with filled paths without border colors, but will discuss generaliza-
tions in a later section. We also assume the images only contain
closed simple paths oriented in a counter-clockwise fashion, and
that these paths do not cross themselves. If a path crosses itself, it
should be separated into multiple simple paths [Eigenwillig et al.
2006].
To build our representation, we first split curves into monotonic
segments, which will simplify the distance computation later. We
then index these feature segments with an accelerator structure that
allows fast random access lookup of the features needed during ren-
dering.
3.1.1 Splitting Curves
Figure 2: (a) All curves are split into Cand Sshaped features at
every point where the tangents are horizontal or vertical. (b) The
bounding box of a path is the bounding box of its features.
In order to simplify the distance computation, we split each curve
at the points where its tangent is horizontal or vertical. For example,
in Figure 2(a), the given spline is split into four segments at the red
dots. Let the parametric form of the curve be given by P(u) =
[x(u), y(u)]. For cubic splines, the splitting points ucan be found
by solving for the roots of the quadratic parametric splines giving
the components of the tangent ~
T(u) = [x0(u), y0(u)] of P(u):
x0(u) = 0 or y0(u) = 0.
There are at most four split points, as there are at most two solutions
for each of the above equations, so curves are broken into at most
five segments.
Each resulting segment has a simple shape. In fact, after splitting
there are only two categories of shape, as shown in figure 2(a). We
call these categories C-shapes and S-shapes. Note that over each
segment, x0(u)and y0(u)are either completely positive or nega-
tive. We call such functions monotonic. The C-shape represents all
curves with no inflection point. The S-shape represents all curves
with one inflection point. Since the second derivative of a cubic
is a linear function, there can be at most two such points: one for
x00(u) = 0 and one for y00(u) = 0. We could further split the S-
shape into C-shapes at these roots. However, since S-shape curves
still work with our distance algorithm, we keep them as they are.
Finding the splitting points for (rotated) elliptical arcs and
quadratics is similar. Line segments do not have to be split. After
splitting, spline curves and elliptical arcs are still spline curves and
elliptical arcs. The overall continuity and shape of the boundaries
does not change.
3.1.2 Detection of Features Overlapping a Cell
In order to build our accelerator structure, a uniform grid of cells
is superimposed on the vector image. For each cell we would like
to find which paths completely contain the cell and which paths
intersect it.
For every cell this process is done path by path in drawing order.
Rendering order is important in vector images and as part of the
preprocessing we also need to resolve visibility (and exploit it when
possible to remove hidden paths).
To accelerate this procedure, the axis-aligned bounding box of
each path is computed. If a cell does not overlap the bounding box
of a path, the path cannot cover the cell or cross the cell bound-
ary at all. Recall that all curves are split into monotonic segments.
Because all our split features are monotonic, each one’s bounding
box can be constructed from its two end points. The bounding box
for an entire path can be computed from the bounding boxes of its
features, as shown in Figure 2(b).
If a path’s bounding box overlaps a cell, all features of the path
are checked against the cell. Our monotonic features can be in-
tersected with the four boundary lines of the cell using classical
numerical methods. If a feature intersects any boundary or if it is
completely contained by the cell, it is stored in the cell’s list.
If none of the features in a path overlaps a cell, two situations
are possible. The path can be outside the cell or it can completely
contain it. In the latter case, all features that are already listed for
the cell are deleted, and the background color of the cell is set to the
fill color of the current path. All previous features will be covered
by the new path.
We use the winding rule to test if a cell is contained by a
path [Nehab and Hoppe 2007]. Any point in the cell can be chosen
for the test; we choose the lower left corner of the cell.
3.1.3 Cell Extension
When the path is checked against a cell, the cell extent needs to
be expanded to tolerate some level of texture minification. The an-
tialiasing filter will have a certain width in texture space, and we
need to be able to compute distances to at least this width. The
magnitude of the expansion depends on the level of image minifi-
cation to be supported during vector rendering.
At higher minification levels, texture rendering should be im-
plemented with a raster-based MIP-map. This raster image can be
rendered (on the GPU) directly from the vector texture. Under mini-
fication MIP-mapping gives an accurate antialiased representation
of the vector image, and transitions can be managed using the al-
pha channel of the raster texture. The finest resolution raster image
should be stored with α= 0, the other coarser levels should use
α= 1. Then trilinear interpolation of αwill give the correct value
for blending between raster and vector rendering. Vector render-
ing can be disabled using control flow in the shader when α= 1.
If the texture includes transparency, then the shader can compute
the transition function explicitly using the Jacobian of the texture
coordinate to screen space mapping.
However, extending the cell by a fixed amount may not include
all features needed to compute the inside/outside test correctly. The
extension width should be chosen so that if a feature crossing the
cell is included, all features that might be closer for any point in the
cell should also be included.
3.1.4 Acceleration Structure
At this point, have a list of relevant features and the background
color for each cell. This information needs to be stored in an accel-
eration structure. We use three textures to store this information in
an efficient way.
Figure 3: Three textures are used to store the accelerator structure.
At the lowest level we list all features from all paths, including
points, line segments, quadratic splines, cubic splines, ellipses, and
so on in one texture. Each feature is stored only once. The features
are grouped and sorted according to paths. Features belonging to
the same path are put together with a header that stores per-path
information, such as fill color, border color, border width, etc. This
texture is shown in Figure 3(c).
Next, for each cell, the list of features that crosses this cell are
sorted according to the paths they belong to. For example, suppose
there are several features from two paths that overlap the cell. Some
belong to the first path, and some belong to the second path. Then
the features belonging to the first path are grouped together, as are
the features belonging to the second path. Just before the list of
features in each path, an extra storage slot is used to record the
number of features used. This texture stores pointers into the low-
level texture that refer to the features used. Thus only one storage
slot is needed for each feature. This stage is shown in Figure 3(b).
The final texture is a grid texture corresponding to the cells. For
each cell it holds the start location of the list of features in the sec-
ond texture. The corresponding list of features are exactly those that
overlap the cell. It also stores the number of paths that go through
this cell, and the background color for the cell. If two cells have
identical feature lists, they share a single list in the list texture de-
scribed above. Figure 3(a) gives an example, including two cells
that share a feature list.
3.2 Shader Computation
The shader computation accesses the accelerator to determine the
features that need to be considered for each cell. Each path is
considered in sequence and its color composited to create the final
color. First we will consider how inside/outside testing for a path is
computed and how compositing is performed, then will discuss the
details of how the distance to a feature is computed.
3.2.1 Path Compositing
The order of the paths and feature lists in every cell needs to be
consistent with the input order in the SVG file. We start with the
background color and the list of paths and features for the cell. The
signed distance to the closest feature in every path is computed in
sequence. For every path, the sign is used to find if the test point
is inside or outside that path. A point is inside a path if it is on the
right side of the closest feature and in this case we use a negative
distance. The closest distance of each new path may have the same
or a different sign from the previous one, and may also be smaller
or larger in magnitude.
We always keep track of the distance dwith the smallest mag-
nitude, a foreground color F, and background color B. These two
colors are always the colors on each side of the closest boundary.
Suppose Dis the closest signed distance to the next path in the
sequence and Cis its fill color. We update d,F, and Bas follows:
bool q=D < 0or |D|<|d|;
bool p=qand d < 0;
B=p?F:B;
F=q?C:F;
d=q?D:d;
At the end of the process, the distance value with the smallest mag-
nitude and its sign are used to find the antialiasing blend weights
using a smooth step, with the transition width found using the Ja-
cobian of the texture coordinate transformation [Qin et al. 2006].
Some extensions are required to handle strokes, borders, gradients,
and so forth; these are discussed in a later section.
Figure 4: Inside/outside test errors at the corners.
When a signed distance is used to detect if a point is inside or
outside a path, an ambiguity is possible at sharp corners. In Fig-
ure 4, a closed path is represented by the green shape. Lines be and
ea are tangent at the corner e. The directions of these lines are con-
sistent with the direction of the path contour. For any point that falls
inside the gray shaded area, its closest distance to the path boundary
is the distance to the corner. In this figure, the closest distance of
point pto the path is pe. As the two closest distances are the same,
the simple minimum distance rule randomly choses either line be
or line ea for the inside/outside test. The sign is computed by pro-
jecting pe onto a 90 degree rotation of the corresponding tangent.
However, only tangent be gives the correct sign. This problem has
been described in [Qin et al. 2006]; to resolve this issue, they intro-
duce a small gap in the contour. Instead, we compute the distance
from pto the extended tangent lines eb and ea and choose the fea-
ture that has the larger absolute value to these lines in case of a tie
on the minimum distance.
3.2.2 Distance Computation
The core of our algorithm is the computation of the signed distance
to a feature. The distance computation to a line segment is sim-
ple, and has been described elsewhere [Qin et al. 2006]. However,
the distance computation to a quadratic or cubic spline or an el-
liptical arc is not as straightforward. We present an approach to
distance computation based on binary search and can be applied to
any kind of parametric curve. This approach is fast and simple, but
only accurate when the query point is within the curve’s radius of
curvature. However, the correct sign is always achieved and the
result is sufficiently accurate that images with high visual quality
can be achieved. There are a few cases where the lack of accuracy
can cause problems; after describing the algorithm we will discuss
these in detail.
Figure 5: The closest point on a curve to an arbitrary point pcan
be found using a binary search based on normal line tests. In re-
gions where normal lines cross, the binary search algorithm may
fail, but normal lines only intersect each other beyond the smallest
radius of curvature.
We first bound the parametric location of the closest point on
the curve using an interval that contains the entire curve segment.
At each iteration, the interval is split at its parametric midpoint.
We then extend the normal at the the splitting point into a splitting
plane, as shown in figure 5. The point is tested against this plane.
The half curve that is on the same side of the plane as the point
is chosen for the next iteration. Iterations can be repeated until a
certain error tolerance is reached or for a fixed number of iterations.
Figure 6: The normal lines for C-shaped and S-shaped curves do
not intersect the curve itself again.
To understand the properties of this algorithm, first observe for
C-shapes and S-shapes the normal lines always intersect the curve
exactly once; see Figure 6(a),(b). Case (c) does not occur since we
have split the curves. Second, observe that if we draw two normal
lines at any two points on the curve, the normal lines will never
intersect on the convex side of the curve. However, they always in-
tersect on the concave side, but at a distance that is always greater
than the smallest radius of curvature of the curve. Therefore, for all
points on the convex side and for points within the radius of cur-
vature on the concave side, the normal lines impose a sequential
ordering on the space around the curve. Our binary search locates
the query point’s position in this order. However, beyond the ra-
dius of curvature on the concave side the normal lines fold over and
the ordering is lost, so the algorithm may fail. Failures return an-
other point on the curve and a distance that may be larger than the
minimum, but never smaller.
In all the examples used in this paper, despite the possibility for
failure, no obvious visual errors were observed. This is because for
antialiasing, the query points where the distance matters are very
close to the boundary features, well within the radius of curvature
in all features in our sample images.
Figure 7: Distance computation errors occur for points whose dis-
tance to the curve is larger than the curvature radius. In the worst
case this can lead to errors in inside/outside classification.
In embossing, errors will only be visible if the embossing width
is relatively large. To demonstrate the visual appearance of these
errors, we increased the embossing width in an example until an er-
ror was visible. This is shown in Figure 7(a). Since some points do
not compute the correct shortest distance, there are some disconti-
nuities along the embossed edge.
We considered using other iterative methods to improve the con-
vergence of the distance computation. The Newton-Raphson algo-
rithm converges quadratically, but it is not guaranteed to converge,
and can fail catastrophically. The regula falsi algorithm is guaran-
teed to converge given a monotonic region. However, it is hard to
split general curves into monotonic regions for the distance function
for all points in a cell. In particular, for a general non-linear curve
we can always find two points on the curve with normal lines that
intersect at some point. This intersection point has two local ex-
tremal distances, so at least for this intersection point, the distance
function is not monotonic, and the regula falsi algorithm cannot be
applied. Basically, this approach would have the same problems as
the binary search algorithm. Furthermore, the evaluation of binary
search is simpler, since it only involves averaging and not division
as in regula falsi (or Newton-Raphson).
When the distance of point to the curve is larger than the em-
bossing width, it does not matter if the distance is correct or not,
since it is not involved in antialiasing or embossing. The sign of
its distance however is always correct, so the inside/outside test, in
general, should have no problem. However, some errors may hap-
pen at corners. In Figure 4, when a point pis in the gray shaded
region it has equal distances to both curve features. Recall that we
use the distance to the extended tangent line to break a tie. But
if the distance is wrong, and the two distances are not equal, the
feature with the shorter distance will always be chosen. This fea-
ture could be the wrong feature, thus generating an inside-outside
classification error.
Fortunately, this problem is easy to fix. Observe that the errors
only happen for the points that are in the gray shaded areas. The
real closest distance should be the distance to the end points. The
distance to the two end points of any feature are therefore always
computed, and the shortest of the these two and the value computed
by binary search is chosen as the final distance.
A problem can also occur if a shape is very thin, and two bound-
ary features are very close, and when the test point is far away rel-
ative to the curvature radius, and the query point is on the concave
side of the curve. In this specific circumstance, the closest distances
to these two features are not guaranteed to be accurate, and if the
distance to the closer feature is computed incorrectly to be larger
than the distance to the farther feature, the inside/outside test may
be incorrect. This error can however be avoided if the grid spacing
is less than the minimum curvature radius. In our examples, we
used a relatively large grid spacing, and yet did not have this error,
so it may happen only rarely in real images. However, to demon-
strate this issue we designed the test case shown in Figure 7(b). A
small classification error is visible in the lower left of this image;
we have circled it in red.
3.2.3 Ridge Antialiasing
Figure 8: (a) Two close edges can cause aliasing along a ridge. (b)
Computing the two closest features for each point, and blending the
two normals will remove this alias.
If two features from the same embossed path are so close that
the distance between them is smaller than the embossing width, the
interaction of the two embossed regions will cause aliasing along a
ridge as shown in Figure 8(a). This is because the closest distance
to the two features have different directions, and therefore, differ-
ent normals for shading. When they meet, the normals will switch
direction suddenly, causing an aliasing artifact. To solve this prob-
lem, for each point, the two closest distances and their correspond-
ing shading normals are computed. These two normals are then
blended smoothly at the places where the two distances are nearly
equal. The result is shown in Figure 8(b), where this form of mag-
nification aliasing has been resolved. Embossing itself, like other
forms of bump and normal mapping, can still suffer from highlight
aliasing under minification. This is visible in some of our test im-
ages and needs to be addressed separately, using modification of the
embossing depth and shading model with distance.
4 Extensions and Applications
Until now, we have discussed vector images containing only closed
paths, solid fill colors, and with no borders. Our algorithm can be
easily extended to support other rendering styles. We describe a
few of these extensions here.
To support closed paths with boundaries, extra space is needed
to store boundary widths and colors in the texture. Then, for each
point, after the closest distance dis obtained, it is shifted by half of
the boundary width Wtowards the outside of the path, for instance,
d0=dW/2as in Figure 9(a). After shifting, the fill color and
the boundary color can be blended smoothly at d0=W. The
modified distance value and the blended color can also be used to
update the closest feature and blending colors between paths.
To support strokes with specific stroke colors and widths, the
Figure 9: The distances are modified to support borders(a) and
strokes(b)
closest distance also needs to be modified using d0= (|d|<
W/2)? − |d|:|d| − W/2, as shown in Figure 9(b). This treats
the strokes as closed paths, and the stroke color as the fill color.
This modified distance and stroke color are used during layer com-
positing.
The modified distance is only used in color testing. For em-
bossing, the embossing valley should be located where the original
distance is zero.
We did not implement gradient fills in our test system, but they
are a straightforward modification of the fill color computation. As
before, extra space to record the gradient coefficients would be
needed. Then instead of using a solid color directly for the fill,
the color for any point inside a path would be computed from the
gradient coefficients and used in place of the solid color for the re-
gion.
Finally, some more interesting extensions are possible. The bi-
nary search computes not only the signed distance to each feature,
but also the position along each feature which is closest to the query
point. This defines a 2D coordinate system in the neighbourhood
of the edge. The distance and the parametric value could be used
together as texture coordinates to render textured strokes, where
the texture could either be a raster texture or another vector tex-
ture. This could also be used to implement dashed and dotted lines
procedurally. It would also be possible to permit the specification
of programmable functions for the embossing profile, and use the
distance for other purposes, such as drop shadows.
5 Results
Various examples rendered from standard SVG files are shown in
Table 1. Some of these examples, such as the tiger, also render
thick border outlines using distance offsetting as in Section 4. The
results of performance tests using an NVIDIA GeForce 8800 GTX
are shown in Table 2 for a window size of 1024 ×1024 and the
full-screen views shown in Table 1. For each image, we tested the
performance with and without embossing, although anisotropic an-
tialiasing was always enabled. We also tested the performance us-
ing grid sizes of 64 ×64,128 ×128, and 256 ×256. The storage
used for each test and for every grid size is indicated in Table 2 as
well.
The lion test case uses line segments only. To evaluate the per-
formance of our cubic spline distance computation, we rendered the
lion test case with cubic splines instead, using five iterations of our
binary search algorithm. The results are shown in Table 3. Note
that the speed was only three times slower when using lines.
features flat emboss
vase
6904
tiger
3847
door
3147
rug
1921
wall
325
lion
1974
fox
292
Table 1: Screen shots of performance tests.
Using the acceleration structure for the tiger, which contains cu-
bic curves mostly, we replaced the cubic curve distance computa-
tion with a line segment distance computation. When the grid size
is 64, the speed was also three times faster. However, with an in-
crease of the grid size to 256, the speed increase dropped to 2.45.
When the grid is coarse, the performance appears to be compute
bound; however, when the grid is subdivided more finely, the per-
formance starts to become memory bound. However, on the whole,
we think the performance is still memory bound, because the shader
contains two levels of dependent texture reads.
We also did experiments on how the number of iterations in the
binary search affects the speed. We used the tiger for a complicated
example and the fox for a simple example. For both images, we
tested with grids of 64,128 and 256. Recall that the baseline test
case used five iterations; when we decreased the number of itera-
tions down to 0(no search at all), we increased the rendering rate by
3to 9fps in all cases (interestingly, this was independent of image
complexity). Note that we rendered the same polygon repeatedly
(with depth testing disabled) to reduce the overhead of shader load-
ing. As for quality, niterations corresponds to approximating the
curves with 2nline segments. In our test cases n= 6 resulted in
renderings that were indistinguishable from any higher setting.
It is worthwhile comparing our results to [Nehab and Hoppe
2007]. They have demonstrated higher performance, although only
with quadratic splines and without embossing. One significant dif-
ference is that their data structure uses differential encoding of the
control points of paths, which results in lower bandwidth require-
ments. It would be useful to combine this approach to the storage
of paths with our approach for computing distance, since we often
appear to be memory bound.
These images are all used in the scene in Figure 1. The cabinet
door is made transparent according to the opacity of the vector im-
age. The closeup on the right in Figure 1 is primarily composed of
only three rectangular polygons. The foot of the cabinet was gen-
erated using transparency (the base geometry is a rectangle), and
the edge is actually antialiased better than the edge of the standard
geometry at the edge of the cabinet. Vector graphics offer not just
unlimited resolution, but also the ability to generate complex an-
tialiased geometry from simple 3D primitives.
In general, not all forms of aliasing can be addressed by our tech-
nique. In addition to aliasing at geometry and silhouette edges (see
for example the edge of the vase), highlight aliasing is also present
on embossed regions. If a vector region is too thin (for example,
stripes on the wallpaper or rug) it can also alias. Our antialiasing
strategy works for color boundaries between two vector regions, but
needs to be combined with other strategies to combat these other
forms of aliasing.
For window size 1024 ×1024, a bitmap texture requires 1024
1024 4 = 4MB. In the most complicated case we tested, the stor-
age was 1.5MB. In the simplest case, the storage was only 0.05MB,
about 1.25% of the size of the raster image generated. Often a vec-
tor image can be stored more efficiently than a raster approxima-
tion.
6 Conclusions
In this paper, we present a method to compute distances to arbi-
trary parametric curves, as long as their curvature is finite and the
curve has a defined tangent at every point. We apply our approach
to cubic parametric splines but in fact it could be applied to any
differentiable parametric curve. This distance computation is sim-
ple and fast. It can be used to support vector texture mapping for
3D real-time rendering. The distance computation gives accurate
distance for points that are close to the curve, so it can be used for
special effects, such as embossing and stroke texturing.
Using vector textures and transparency, we can generate compli-
cated geometry effects with antialiased edges. This can simplify the
64 128 256
flat emboss storage flat emboss storage flat emboss storage
(fps) (fps) (MB) (fps) (fps) (MB) (fps) (fps) (MB)
vase 18 17 0.50 24 22 0.75 29 27 1.50
tiger 20 18 0.31 29 26 0.52 37 33 1.31
door 27 25 0.27 39 35 0.45 47 42 0.97
rug 54 50 0.15 72 67 0.27 83 77 0.67
lion 83 67 0.18 114 91 0.34 127 103 0.85
wall 91 84 0.06 110 102 0.15 123 113 0.49
fox 101 95 0.05 130 128 0.15 149 149 0.50
Table 2: Performance results. Window size is 1024 ×1024.
64 128 256
flat emboss flat emboss flat emboss
(fps) (fps) (fps) (fps) (fps) (fps)
lion with lines 83 67 114 91 127 103
lion with cubics 24 23 35 33 41 38
Table 3: The performance difference between using distance to line segments and distance to cubics on the lion test case. The lion is actually
modelled with line segments, so to test the latter these were replaced with equivalent degenerate cubics.
geometry of objects in a scene.
The distance computation used in this paper does not provide
accurate distance for points that are far from boundary features.
Errors may occur if the accurate distances are needed for distant
points. In the future, we would like to improve the accuracy of our
distance computation in such cases.
Acknowledgements
The vase and rug were licensed from http://vectorstock.com (2652
and 2197); the wallpaper is from http://www.vecteezy.com (vf/221,
by T. Scott Stromberg); the lion and tiger are examples from
http://www.croczilla.com; and the fox is from http://www.kde-
look.org. The cabinet door was traced from a traditional Chinese
paper cut design. This research was funded by the National Sci-
ence and Engineering Research Council of Canada and the Ontario
Centres of Excellence.
References
BLI NN , J . 2006. How to solve a cubic equation, part 2: The 11
case. In IEEE CG&A, 26(4), 90–100.
EIGENWILLIG, A., KE TT NE R, L., SCHOMER, E., AN D
WOL PE RT, N. 2006. Exact, efficient and complete arrangement
computation for cubic curves. In Computational Geometry 35,
36–73.
FRI SK EN , S. F., P ER RY, R. N., ROCKWOOD, A. P., A ND JO NE S,
T. R. 2000. Adaptively sampled distance fields: a general rep-
resentation of shape for computer graphics. SIGGRAPH (July),
249–254.
GRE EN , C. 2007. Improved alpha-tested magnification for vector
textures and special effects. In ACM SIGGRAPH 2007 courses,
SECTION: Course 28: Advanced real-time rendering in 3D
graphics and games, 9–18.
JOH NS ON , D. E ., AN D COH EN , E. 2005. Distance extrama for
spline models using tangent cones. In Proceedings of Graphics
Interface 2005, 169–175.
KRAU S, M., A ND ERT L, T. 2002. Adaptive Texture Maps. In
Proc. Graphics Hardware, 7–15.
LEFEBVRE, S., AN D HOP PE , H . 2006. Perfect spatial hashing.
ACM Trans. on Graphics (Proc. SIGGRAPH), 579–588.
LEFEBVRE, S., AN D HOP PE , H. 2007. Compressed random-
access trees for spatially coherent data. In Eurographics Sym-
posium on Rendering.
LOO P, C., A ND BL IN N, J. 2005. Resolution independent curve
rendering using programmable graphics hardware. In Proceed-
ings of ACM SIGGRAPH 2005, 1000–1010.
LOVI SC ACH , J. 2005. Efficient magnification of bi-level textures.
In ACM SIGGRAPH Sketches.
NEH AB , D., AN D HOP PE , H. 2007. Texel programs for random-
access antialiased vector graphics. In Microsoft Research Tech-
nical Report MSR-TR-2007-95, July, 1–9.
PLA SS , M., AN D STONE, M. 1983. Curve-fitting with piecewise
parametric cubics. In Proceedings of the 10th annual conference
on Computer Graphics and Interactive Techniques, 229–239.
QIN , Z., MCCO OL , M. D., A ND KA PL AN , C. S . 2006. Real-time
texture-mapped vector glyphs. In ACM SIGGRAPH Symposium
on Interactive 3D Graphics and Games, ACM SIGGRAPH,
C. S´
equin and M. Olano, Eds., 125–132.
RAM ANA RAYANA N, G., BALA, K., AND WALTE R, B. 2004.
Feature-based textures. In Eurographics Symposium on Render-
ing.
RAY, N., N EIGER, T., CAVIN, X ., AND LEVY, B. 2005. Vector
texture maps on the GPU. In Technical Report ALICE-TR-05-
003.
SEN , P., CAMMARANO, M., A ND HANRAHAN, P. 2003. Shadow
silhouette maps. ACM Trans. on Graphics (Proc. SIGGRAPH)
22, 3 (July), 521–526.
SEN , P. 2004. Silhouette maps for improved texture magnification.
In Proc. Graphics Hardware, 65–74,147.
TARINI, M., A ND CIGNONI, P. 2005. Pinchmaps: Textures with
customizable discountnuities. In Eurographics, 557–568.
TUMBLIN, J., AN D CHO UD HU RY, P. 2004. Bixels: Picture sam-
ples with sharp embedded boundaries. In Eurographics Sympo-
sium on Rendering.
WANG, H., KE AR NE Y, J., AN D ATKINSON, K. 2002. Robust and
efficient computation of the closest point on a spline curve. In
Curve and Surface Design: Saint-Malo, 397–405.
... Rockwood et al. use monotone curve parts to split trimmed NURBS surface regions into smaller, monotone regions [99]. Qin et al. perform it to accelerate distance queries in the context of texture rendering [95]. Schollmeyer and Fröhlich pre-process NURBS trim bounds into monotone parts to speed up point classification queries that arise during ray-tracing of trimmed NURBS surfaces [104]. ...
Thesis
Full-text available
Even today, the treatment of industrial-grade geometries is a huge challenge in the field of numerical simulations. The geometries that are created by computer aided design (CAD) are often very complex and contain many flaws. Hence the discretization by mesh-based methods like the finite element method (FEM) is very time consuming and can take several months when human interaction is required. Therefore, a growing interest in so-called meshfree methods arose in the scientific community over the last few decades. One such meshfree method is the partition of unity method (PUM), which is very promising because of its flexibility due to its very abstract formulations. But even though the PUM is meshfree in its core, the treatment of complex geometries is still lacking. In this thesis we develop methods to close that gap. First we propose a post-processing step to the original cover construction algorithm employed in the PUM, that guarantees that stable approximation spaces can be constructed for arbitrary geometries in two and three space-dimensions. Then, we tackle the problem of efficient and robust integration in 2D, by proposing a monotone decomposition of the input geometry. By exploiting properties of the resulting decomposition, we can prove that all required intersection operations can be implemented reliably. By adding all inflection points of the domain's boundary when constructing local decompositions of the integration domains, we can prove that the resulting curved triangles always form a valid decomposition. In 3D, we propose to create a linear approximation of the input geometry. The linear representation allows all subsequent operations to be performed reliably and fast. Then, we develop a method to estimate the domain approximation error and relate that error to the approximation error of the PUM discretization. Refinement controlled by those error estimates then yields a method that can overall converge with optimal rates. All methods proposed throughout that thesis are validated by numerical experiments. Thereby, we demonstrate the robustness on real-world industrial use cases. In 2D, we present results for a shell problem on the door of a car. In 3D, results for mechanical parts of the landing-gear of an Airbus A380 are presented.
... They extended the work to handle curves with general vector textures. [QMK08] These distance-based approaches to antialiasing break down when sharp or thin features with multiple edges are present, resulting in over-rounding at corners and artifacts on thin features [RE18]. These effects can be reduced (but are not eliminated) by using multiple channels [Chl15]. ...
Article
Full-text available
Text is a crucial component of 3‐D environments and virtual worlds for user interfaces and wayfinding. Implementing text using standard antialiased texture mapping leads to blurry and illegible writing which hinders usability and navigation. While super‐sampling removes some of these artifacts, distracting artifacts can still impede legibility, especially for recent high‐resolution head‐mounted displays. We propose an analytic antialiasing technique that efficiently computes the coverage of text glyphs, over pixel footprints, designed to run at real‐time rates. It decomposes glyphs into piecewise‐biquadratics and trapezoids that can be quickly area‐integrated over a pixel footprint to provide crisp legible antialiased text, even when mapped onto an arbitrary surface in a 3‐D virtual environment.
... Feature curves [PZ08] encode distances to quadratic Bezier curves and can thus render a limited number of sharp curves intersecting at one location. Precise vector textures [QMK08] encode the distances to monotonic curve segments in the texture. As long as the distance to the evaluated curves is not larger than the curve's curvature, the method delivers error-free results. ...
Article
Full-text available
In this paper, we introduce the CPatch, a curved primitive that can be used to construct arbitrary vector graphics. A CPatch is a generalization of a 2D polygon: Any number of curves up to a cubic degree bound a primitive. We show that a CPatch can be rasterized efficiently in a hierarchical manner on the GPU, locally discarding irrelevant portions of the curves. Our rasterizer is fast and scalable, works on all patches in parallel, and does not require any approximations. We show a parallel implementation of our rasterizer, which naturally supports all kinds of color spaces, blending and super‐sampling. Additionally, we show how vector graphics input can efficiently be converted to a CPatch representation, solving challenges like patch self intersections and false inside‐outside classification. Results indicate that our approach is faster than the state‐of‐the‐art, more flexible and could potentially be implemented in hardware.
... Rendering polygons is an issue found when rendering general vector graphics [Ganacim et al. 2014;Nehab and Hoppe 2008;Qin et al. 2008]. However, their benchmarked datasets are limited up to 190k elements, while we target millions of primitives and thus need more efficient subdivision solutions. ...
Conference Paper
[Full text available at https://doi.org/10.1145/3190834.3190851] Rendering vector data on virtual terrains is a relevant issue as its applications range from virtual simulation to public administration. The expected level of visual quality and extents of virtual terrains demand efficient solutions. We propose a screen-space approach to render high-quality line and polygon vector data in real-time. A novel polygon rendering algorithm is proposed to address the limitations of current techniques. We present a flexible acceleration structure to accommodate the vector features and to enable efficient culling, user editing, and styling at runtime. The vector data is processed and provided for random access in the GPU, where the elements are adequately rendered in a deferred rendering pipeline using a modern temporal antialiasing. Results show that our approach provides increased visual quality and real-time performance for massive datasets.
... A separate-but very important-area of curve rendering research pertains to the 2D domain, with applications in text, decals, vector graphics, and texture rendering. It is anchored by the seminal work of Loop and Blinn [2005] and thoroughly explored by other researchers [Batra et al. 2015;Ganacim et al. 2014;Kilgard and Bolz 2012;Liao et al. 2012;Hoppe 2008, 2012;Qin et al. 2008;Ray et al. 2005;Reshetov and Luebke 2016;Sen 2004;Sun et al. 2012;Tarini and Cignoni 2005]. Such methods are not directly transferable to 3D, and generally aim at evaluating a distance from a given point sample to a curve-but not the parameter of the curve that corresponds to the minimum distance. ...
Conference Paper
Full-text available
We present a new approach to finding ray-cubic Bézier curve intersections by leveraging recent achievements in polynomial studies. Compared with the state-of-the-art adaptive linearization, it increases performance by 5--50 times, while also improving the accuracy by 1000X. Our algorithm quickly eliminates parts of the curve for which the distance to the given ray is guaranteed to be bigger than a model-specific threshold (maximum curve's half-width). We then reduce the interval with the isolated distance minimum even further and apply a single iteration of a non-linear root-finding technique (Ridders' method).
Article
We present a new Laplacian solver for minimal surfaces—surfaces having a mean curvature of zero everywhere except at some fixed (Dirichlet) boundary conditions. Our solution has two main contributions: First, we provide a robust rasterization technique to transform continuous boundary values (diffusion curves) to a discrete domain. Second, we define a variable stencil size diffusion solver that solves the minimal surface problem. We prove that the solver converges to the right solution, and demonstrate that it is at least as fast as commonly proposed multigrid solvers, but much simpler to implement. It also works for arbitrary image resolutions, as well as 8 bit data. We show examples of robust diffusion curve rendering where our curve rasterization and diffusion solver eliminate the strobing artifacts present in previous methods. We also show results for real-time seamless cloning and stitching of large image panoramas.
Article
We demonstrate an efficient data-parallel algorithm for building large hash tables of millions of elements in real-time. We consider two parallel algorithms for the construction: a classical sparse perfect hashing approach, and cuckoo hashing, which packs elements densely by allowing an element to be stored in one of multiple possible locations. Our construction is a hybrid approach that uses both algorithms. We measure the construction time, access time, and memory usage of our implementations and demonstrate real-time performance on large datasets: for 5 million key-value pairs, we construct a hash table in 35.7 ms using 1.42 times as much memory as the input data itself, and we can access all the elements in that hash table in 15.3 ms. For comparison, sorting the same data requires 36.6 ms, but accessing all the elements via binary search requires 79.5 ms. Furthermore, we show how our hashing methods can be applied to two graphics applications: 3D surface intersection for moving data and geometric hashing for image matching.
Article
Diffusion curve images (DCI) provide a powerful tool for efficient 2D image generation, storage and manipulation. A DCI consist of curves with colors defined on either side. By diffusing these colors over the image, the final result includes sharp boundaries along the curves with smoothly shaded regions between them. This paper extends the application of diffusion curves to render high quality surface details on 3D objects. The first extension is a view dependent warping technique that dynamically reallocates texture space so that object parts that appear large on screen get more texture for increased detail. The second extension is a dynamic feature embedding technique that retains crisp, anti-aliased curve details even in extreme closeups. The third extension is the application of dynamic feature embedding to displacement mapping and geometry images. Our results show high quality renderings of diffusion curve textures, displacements, and geometry images, all rendered interactively.
Article
We introduce a novel GPU path rendering method based on scan-line rasterization, which is highly work-efficient but traditionally considered as GPU hostile. Our method is parallelized over boundary fragments, i.e., pixels directly intersecting the path boundary. Non-boundary pixels are processed in bulk as horizontal spans like in CPU scanline rasterizers, which saves a significant amount of winding number computation workload. The distinction also allows the majority of our algorithmic steps to focus on boundary fragments only, which leads to highly balanced workload among the GPU threads. In addition, we develop a ray shooting pattern that minimizes the global data dependency when computing winding numbers at anti-aliasing samples. This allows us to shift the majority of winding-number-related workload to the same kernel that consumes its result, which saves a significant amount of GPU memory bandwidth. Experiments show that our method gives a consistent 2.5X speedup over state-of-the-art alternatives for high-quality rendering at Ultra HD resolution, which can increase to more than 30X in extreme cases. We can also get a consistent 10X speedup on animated input.
Article
Full-text available
This paper presents VTMs (Vector Texture Maps), a novel repre- sentation of vector images that can be used as a texture by the GPU for real-time rendering. A VTM decomposes texture space into dif- ferent regions, represented in an analytic way, by a set of implicit degree 3 polynomials. Each region can be rendered by a different fragment shading function. Accurate anti-aliasing is performed in real-time, based on an estimate of fragment coverage. As a con- sequence, infinite zooming can be applied without any pixel dis- cretization artifact. Based on a hierarchical data structure, our rep- resentation has low memory requirements. Its versatility is demon- strated in various settings, including a font engine completely im- plemented in the GPU.
Article
Full-text available
Parametric cubic spline curves are commonly used to model the geometry of road surfaces in real-time driving simulators. Roads are represented by space curves that define a curvilinear frame of reference in which three-dimensional points are expressed in coordi-nates of distance along the curve, offset from the central axis, and loft from the road surface. Simulators must map from global Cartesian coordinates to local road coordinates at very high frequencies. A key component in this mapping is the computation of the closest point on the central axis of the road to a three-dimensional point expressed in Cartesian coordinates. The paper investigates a two-step method that exploits the complementary strengths of two optimization techniques: Newton's method and quadratic minimization.
Article
A simple and efficient method is presented which allows improved rendering of glyphs composed of curved and linear elements. A distance field is generated from a high resolution image, and then stored into a channel of a lower-resolution texture. In the simplest case, this texture can then be rendered simply by using the alpha-testing and alpha-thresholding feature of modern GPUs, without a custom shader. This allows the technique to be used on even the lowest-end 3D graphics hardware. With the use of programmable shading, the technique is extended to perform various special effect renderings, including soft edges, outlining, drop shadows, multi-colored images, and sharp corners.
Article
We encode a broad class of vector graphics in a randomly accessible format. Our approach is to create a coarse image in which each image cell contains a texel program — a locally specialized description of the graphics primitives overlapping the cell. These texel programs are interpreted at runtime within a programmable pixel shader. Advantages include coherent low-bandwidth memory access, efficient inter-primitive antialiasing, and the ability to map general vector graphics (including strokes) onto arbitrary surfaces. We present a fast construction algorithm, and demonstrate the space and time efficiency of the representation on many practical examples.
Conference Paper
We introduce several new variants of hardware-based adaptive texture maps and present applications in two, three, and four dimensions. In particular, we discuss representations of images and volumes with locally adaptive resolution, lossless compression of light fields, and vector quantization of volume data. All corresponding texture decoders were successfully integrated into the programmable texturing pipeline of commercial off-the-shelf graphics hardware.
Conference Paper
An abstract is not available.
Article
The Bentley–Ottmann sweep-line method can compute the arrangement of planar curves, provided a number of geometric primitives operating on the curves are available. We discuss the reduction of the primitives to the analysis of curves and curve pairs, and describe efficient realizations of these analyses for planar algebraic curves of degree three or less. We obtain a complete, exact, and efficient algorithm for computing arrangements of cubic curves. Special cases of cubic curves are conics as well as implicitized cubic splines and Bézier curves.The algorithm is complete in that it handles all possible degeneracies such as tangential intersections and singularities. It is exact in that it provides the mathematically correct result. It is efficient in that it can handle hundreds of curves with a quarter million of segments in the final arrangement. The algorithm has been implemented in C++ as an Exacus library called CubiX.
Conference Paper
We present a robust search for distance extrema from a point to a curve or a surface. The robustness comes from using geometric operations rather than numerical methods to find all local extrema. Tangent cones are used to search for regions where distance extrema conditions are satisfied and patch refinement hierarchically improves the search. Instead of preprocessing and storing a large hierarchy, elements are computed as needed and retained only if useful. However, for spatially coherent queries, this provides a significant speedup.
Conference Paper
Texture mapping is a simple way of increasing visual realism without adding geometrical complexity. Because it is a discrete process, it is important to properly filter samples when the sampling rate of the texture differs from that of the final image. This is particularly problematic when the texture is magnified or minified. While reasonable approaches exist to tackle the minified case, few options exist for improving the quality of magnified textures in real-time applications. Most simply bilinearly interpolate between samples, yielding exceedingly blurry textures. In this paper, we address the real-time magnification problem by extending the silhouette map algorithm to general texturing. In particular, we discuss the creation of these silmap textures as well as a simple filtering scheme that allows for viewing at all levels of magnification. The technique was implemented on current graphics hardware and our results show that we can achieve a level of visual quality comparable to that of a much larger texture.