GPU-Based Ray-Casting of Quadratic Surfaces

Christian Sigg, Tim Weyrich, Mario Botsch, Markus H. GrossPbg@siggraph 2006 · DOI

TL;DR

This paper introduces a novel GPU-accelerated ray-casting technique for rendering quadratic surfaces (like spheres, ellipsoids, and cylinders) with high visual quality and perspective correctness, achieving interactive frame rates. By leveraging per-pixel ray-casting and homogeneous coordinates, it overcomes the limitations of traditional tessellation-based methods for complex geometric models.

What Problem Does This Paper Address?

Rendering complex geometric models, particularly those defined by quadratic surfaces (like molecules in scientific visualization or CAD models), often involves a trade-off between visual quality and rendering speed. Traditional methods either tessellate these surfaces into many triangles, overwhelming the graphics pipeline, or use approximations like depth sprites, which can sacrifice perspective correctness and visual fidelity. While hardware graphics APIs support quadrics, they are typically tessellated for forward mapping, leading to inefficiencies. This paper aims to bridge this gap by enabling high-quality, perspectively correct rendering of quadratic surfaces at interactive speeds using modern GPUs.

Methods

The core of the paper's contribution lies in its GPU-based ray-casting approach for quadratic surfaces. Instead of tessellating, each quadric primitive is represented by a single vertex. A vertex shader computes a tight screen-space bounding box for the quadric. Then, for each pixel within this bounding box, a pixel shader performs per-pixel ray-quadric intersection tests.

Key to their method is the use of homogeneous coordinates to represent the implicit definition of quadratic surfaces as a bilinear form. This allows for elegant and robust transformations of the quadric's definition into screen space. This transformation enables:

  • Perspectively Correct Bounding Box Computation: Unlike previous heuristic methods, their approach ensures accurate bounding boxes that don't erroneously clip or miss parts of the quadric, crucial for perspective views.
  • Per-Pixel Ray-Quadric Intersection: The ray intersection is computed directly in the pixel shader, ensuring high accuracy.
  • Efficient Transformation: The use of homogeneous coordinates simplifies the transformation of the quadric's definition and intersection calculations across different coordinate systems (object, parameter, clip, screen).
  • Deferred Shading: To further optimize rendering, especially with advanced effects, they employ a deferred shading pipeline. This involves rendering scene geometry (depth, color, normal) into offscreen buffers in a first pass, and then evaluating the shading equation once per pixel in a second pass.

Datasets

The paper evaluates its method using molecular models. Specific examples mentioned include:

  • A plant seed protein and human insulin (Figure 1).
  • Various molecules of different complexities, quantified by the number of spheres and cylinders (Table 1).
  • A ball-and-stick model with 99k spheres and 198k cylinders (Figure 7).
  • A complex molecular structure with 52k atoms (Figure 8).

The paper does not introduce new benchmark datasets but rather uses existing complex scenes to demonstrate the performance and quality of their rendering technique.

Key Insights and Ideas

  • Homogeneous Coordinates are Key: Representing quadratic surfaces as bilinear forms in homogeneous coordinates is the central insight. This mathematical formulation elegantly handles perspective transformations and simplifies the derivation of bounding box and ray intersection tests.
  • Per-Pixel Ray-Casting for Quadrics: Moving away from tessellation and towards per-pixel ray-casting on the GPU for quadrics unlocks higher visual quality and perspective correctness without the performance penalty of excessive geometry.
  • Deferred Shading for Advanced Effects: The integration of deferred shading is crucial for achieving interactive frame rates while incorporating computationally expensive effects like soft shadows and silhouette outlines. This separation of geometry and shading passes is a powerful optimization.
  • Visual Effects Enhance Perception: The paper demonstrates that adding effects like soft shadows and silhouette outlines significantly improves the spatial perception of complex 3D structures like molecules, making them easier to understand.

Key Results

  • High Visual Quality: The method produces perspectively correct and visually superior renderings compared to traditional methods, especially for complex shapes.
  • Interactive Frame Rates: The technique achieves interactive frame rates (e.g., 13 fps for a scene with 99k spheres and 198k cylinders at 1024x768 resolution, including soft shadows and silhouette lines).
  • Efficiency: Rendering each quadric primitive with a single vertex call, combined with per-pixel ray-casting and deferred shading, leads to significant performance gains over tessellation-heavy approaches, especially when advanced shading is applied.
  • Deferred Shading Advantage: While direct shading is faster for simple Phong shading, deferred shading becomes superior when soft shadows and silhouette lines are added, demonstrating its scalability for complex visual effects.

Limitations and Future Work

Limitations: * The paper acknowledges that for certain quadrics like cylinders, clipping against a unit cube in parameter space is necessary, adding a slight complexity. * While efficient, the rendering of complex scenes with many advanced effects still requires careful optimization.

Future Work: * The authors suggest that their homogeneous formulation is generalizable to point-based splatting in the future, potentially extending their approach to a wider range of primitives and rendering techniques.

Summary updated

BibTeX
@inproceedings{sigg2006gpu,
  author = {Christian Sigg and Tim Weyrich and Mario Botsch and Markus H. Gross},
  title = {{GPU-Based Ray-Casting of Quadratic Surfaces}},
  booktitle = {Pbg@siggraph},
  year = {2006},
  doi = {10.2312/spbg/spbg06/059-065},
}
Figure