GPU-Driven Real-Time
Mesh Contour Vectorization

Wangziwei Jiang,
Guiqing Li, Yongwei Nie, Chuhua Xian

Abstract

Rendering contours of 3D meshes has a wide range of applications.

Previous CPU-based contour rendering algorithms support advanced stylized effects but cannot achieve realtime performance.
On the other hand, real-time algorithms based on GPU have to sacrifice some advanced stylization effects due to the difficulty of linking contour elements into stroke curves.

This paper proposes a GPU-based mesh contour rendering method which includes the following steps: (1) before rendering, a preprocessing step analyzes the adjacency and geometric information from the 3d mesh model; (2) at runtime, an extraction stage firstly selects contour edges from the 3D mesh model, then the parallelized Bresenham algorithm rasterizes the contour edges into a set of oriented contour pixels; (3) next, Potrace is parallelized to extract (pixel) edge loops from the contour pixels; (4) subsequently, a novel segmentation procedure is designed to partition the edge loops into strokes; (5) finally, these strokes are then converted into 2D strip meshes in order to support rendering with controllable styles.

Except the preprocessing step, all other procedures are implemented in parallel on a GPU. This enables our framework to achieve real-time performance for high-resolution rendering of dense mesh models. 

Extracted curves from 3D mesh.
Curves are rendered with different colors.

Time per frame. Our method achieves superior performance. 

Two simple examples of contour stylization

Resources

Images

Paper(PDF)

Presentation(14 min)

Uinty project on Github

"Stamping" style, similar to Photoshop brush. "Textured Path" style,
similar to Illustrator brush.