Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 27

Circular Arcs as Primitives for Vector

Textures

Zheng Qin
with Craig S. Kaplan and Michael D. McCool

University of Waterloo
Vector textures: Motivation

Resolution independent texture maps

Use SVG content created with standard tools
Vector texture: challenges

For texturing, need random access


Antialiased boundaries essential


Layered paths and occlusions


Support for embossing, halos, etc.


High performance for 3D real-time rendering
Applications

Legible text on 3D surfaces
 Labels, signs, documents, maps

Symbolic information
 Icons, graphics, line drawings, strokes on maps

Artistic content
 Wallpaper, carpets, tiles, other surface detail

Model complex shapes
 Transparency, embossing, halo
Related work: Summary

Extensions of interpolation
 Avoid interpolating through discontinuities

Distance-based methods for bilevel images
 Exact and sampled distance fields
 Implicit functions to approximate distance
 Applications to text rendering

Full vector graphics support
 General vector texture was not supported by previous work
Extensions of interpolation

Feature-based textures
 Ramanarayanan et al 2004

Silhouette maps for improved texture magnification
 Sen et al 2004

Bixels: Picture samples with sharp embedded boundaries
 Tumblin et al 2004

Pinchmap: textures with customizable discontinuities
 Tarini et al 2005
Methods for bilevel images
 Adaptively sampled distance fields
 Frisken et al 2000
 Efficient magnification of bi-level textures
 Loviscach 2005
 Vector texture maps on the GPU
 Ray et al 2005
 Resolution independent curve rendering using programmable graphics hardware
 Loop and Blinn 2006
 Real-time texture-mapped vector glyphs
 Qin et al 2006
 Improved alpha-tested magnification for vector textures and special effects
 Green 2007
Full vector graphics support

Texel programs for random-access antialiased vector
graphics
 Nehab and Hoppe 2007

Precise Vector Textures for Real-Time 3D Rendering
 Qin et al 2008

ALSO GOAL OF THIS RESEARCH
Our assumptions

Paths are closed


Paths do not self-intersect


All boundaries are clockwise oriented
Our solution

Use grid data structure to limit the computation

 Random access and high performance


Compute accurate distance to closest boundary

 Inside/outside test, antialiasing, special effects


Flatten image to produce planar arrangement

 Occlusion is resolved after flattening


Our contributions

Approximate curves with circular arcs
 C1 (G1) continuity boundary (improvement over our previous work)
 Distance computation is comparable with distance to line segment
 Arc splines closed under offset operations

Developed the first system that fully supports main SVG
features in real-time vector textures
Steps in our solution

Preprocessing:
 Flatten layers into a planar arrangement
 Approximate paths with arc splines
 Build accelerator data structure

Shading computation:
 Compute distance to two closest boundaries
 Blend the two colors smoothly
Preprocessing: flattening
Preprocessing

Approximate paths with arc splines using biarcs
 Yang 2002: Efficient Circular Arc Interpolation Based on Active
Tolerance Control

Superimpose grid on paths

Dilate every grid cell by maximum distance

In every cell, store list of all segments that influence it

Use Voronoi diagram to find out which boundary influences the
points in a cell
Arc representation

Each arc represented with 5
parameters: two endpoints
and height


For line segments, height h
is 0


Tangent continuity
Interval analysis to list features

Discrete Voronoi diagram can miss small details


Use interval extension of distance to arc computation
Interval analysis results
Pack with simulated annealing

Each point has
same amount of
computation


Avoid control flow
on GPU
Distance to arc

Compute the arc origin
 If we store origin, this
computation can be saved
Distance to arc
Antialiasing

Find two closest
distances
Results
Results

Line segment image for
performance testing


Also shows that only need
one primitive: “flat” arcs can
represent line segments


Avoids control flow
Performance

NVIDIA 7800GT

Screen size 512 x 512

Performance 30 ~ 60 fps

Distance to arc is 70%~78% of the speed of distance to
line segment
Analysis of results

Flattening doubles the complexity of the image
 Used half-edge rather than winged-edge structure due to
limitation of our flattening software

Uniform grid causes either a large storage size or reduces
performance; better accelerator desirable

Constant number of distance computations affect
performance; control flow would help
Conclusions

Possible to approximate curves with arc splines
 Gives better continuity than line segments

Distance to arc is easy and fast

Distance can be used for special effects

Used flattening to solve the multiple layer feature

Support main features of SVG format
Future work

Better data structure and usage of control flow in GPUs
 Smaller storage size and high performance

Use another approach to solve multi-layer problem
 Want to avoid doubling the complexity of image

Support more SVG features

Compute distance to higher order curves directly
 Actually did this in later work using iterative approach

You might also like