Hardware Support for Non-photorealistic Rendering

Ramesh RaskarWorkshop on Graphics Hardware 2001

TL;DR

This paper introduces a novel hardware-accelerated approach to render non-photorealistic rendering (NPR) features like silhouettes, ridges, and valleys directly within the graphics pipeline. By procedurally generating new geometric primitives on-the-fly, it achieves these visually rich effects without requiring explicit edge identification or complex pre-processing, making NPR more accessible and efficient.

What Problem Does This Paper Address?

Traditional non-photorealistic rendering (NPR) techniques often rely on explicitly identifying and rendering "edges" (like silhouettes, creases, and intersections) to convey shape and detail in 3D models. This process is computationally expensive, typically requiring extensive pre-processing of the 3D model to build connectivity information (e.g., adjacency lists of polygons). This pre-processing step is cumbersome, increases memory requirements, and makes it difficult to apply these NPR techniques to dynamic scenes or "triangle soups" (unstructured collections of triangles) where connectivity is not readily available or changes frequently. Existing hardware pipelines are optimized for processing individual primitives (like triangles) and lack built-in support for these edge-based NPR operations, leaving them to be handled by software applications, which can be a bottleneck.

Methods

The core innovation of this paper is the introduction of a "primitive shader" stage within the graphics pipeline. This stage operates on individual polygons and procedurally generates additional geometric primitives to represent special features.

  • Silhouettes: For back-facing polygons, the paper proposes enlarging their geometry. This enlarged portion, when rendered, appears as a silhouette around the visible front-facing polygons. The normal of the back-facing polygon is flipped to ensure it's not culled. The enlargement is controlled by view-dependent parameters.
  • Ridges: For front-facing polygons, the paper adds new black quadrilaterals along each edge. These quads are positioned such that they are only visible when the dihedral angle between the current polygon and its neighbor is below a user-defined threshold, effectively highlighting sharp ridges.
  • Valleys: Similar to ridges, black quadrilaterals are added to the edges of front-facing polygons. However, for valleys, these quads are designed to be visible when the dihedral angle is above a threshold. This requires a more complex visibility test, utilizing two depth buffers (z1 and z2) and a "between-test" to correctly trap these features.
  • Intersections: This technique is similar to valley rendering, using two depth buffers to identify and render fragments that lie within the intersection of two visible front-facing polygons.

Crucially, for silhouettes and ridges, only the primitive shader stage is modified. For valleys and intersections, the pixel shader stage is also affected, requiring an additional depth buffer. The generated geometry is processed without additional lighting or texture mapping, allowing it to be treated similarly to original primitives.

Datasets

Not discussed in the paper. The paper focuses on a procedural generation technique applied to arbitrary polygonal models.

Key Insights and Ideas

  • Procedural Geometry Generation in the Primitive Shader: The most significant insight is the realization that special features can be generated procedurally within the graphics pipeline, specifically at the primitive shader stage. This bypasses the need for explicit edge detection and pre-processing.
  • Local Information Suffices: The techniques rely solely on local information available for a single polygon (vertices, normals, view direction) and its immediate neighbors (for dihedral angle calculations). This makes the approach highly scalable and suitable for dynamic scenes.
  • Hardware-Friendly Approach: By integrating these techniques into the graphics pipeline, the method leverages existing hardware capabilities and avoids the overhead of software-based NPR. This aligns with the trend of programmable shaders.
  • Reversing the Logic for Valleys: The paper cleverly notes that valley rendering is the "reverse" of ridge rendering in terms of visibility, leading to the innovative use of dual depth buffers and the "between-test" to correctly capture these features.

Key Results

The paper demonstrates the ability to render silhouettes, ridges, and valleys with uniform width directly in hardware. The proposed methods are shown to work on arbitrary polygonal models without requiring connectivity information or pre-processing. The authors provide visual examples (Figure 1) showcasing the effectiveness of their techniques. While quantitative performance metrics are not detailed, the paper argues that the approach is efficient because it operates on a per-polygon basis and leverages hardware acceleration. They note that the number of vertex transformations can increase by a factor of 2-5, but the overall performance is often limited by bandwidth, which is not negatively impacted by on-chip generation.

Limitations and Future Work

  • "Z-fighting" and Coplanarity: When ridges and valleys are rendered with very close dihedral angles to the threshold, "z-fighting" (visual artifacts due to depth buffer precision issues) can occur due to near-coplanarity.
  • Cracks with Wide Features: Rendering very wide special features can sometimes lead to visible "cracks" or gaps, though this is less apparent with thinner rendering.
  • Ridge/Silhouette Overlap: When a ridge edge is also a silhouette edge, the rendering of the silhouette feature can occlude the ridge feature if they are rendered in the same color. The authors suggest rendering them in the same color can avoid artifacts.
  • Future Work: The authors suggest extensions such as using lighting and texturing for the generated quads to add more shape cues or for non-photorealistic rendering. They also envision using this primitive shader stage for advanced geometry modification, dynamic tessellation, and smooth LOD transitions. They also propose a software fallback for systems lacking dual depth buffers.

Summary updated

BibTeX
@inproceedings{raskar2001hardware,
  author = {Ramesh Raskar},
  title = {{Hardware Support for Non-photorealistic Rendering}},
  booktitle = {Workshop on Graphics Hardware},
  year = {2001},
  doi = {10.2312/eggh/eggh01/041-046},
}

Loading related content...

Figure