One way of rendering complex polygonal 3d scenes is to replace parts of the scene’s geometry by a set of points. This idea is for example used by Rusinkiewicz for the QSplat-technique [RL00] for rendering large meshes. Pfister et al. [PZvBG00] introduce surfels for rendering complex objects (including texturing). Coconu and Hege [CH02] further try to exploit the capabilities of the graphics hardware to support rendering huge scene consisting of many complex objects.
In this paper we present the Progressive Blue Surfels technique, which based on similar ideas, but has the following feature:
Support for huge hierarchical scenes (consisting of billions of polygons, see Figure 1 for an example)
Objects inside the hierarchy can be instances
Almost no popping artifacts even without alpha blending
Simple to implement
The main idea of the method is: Create an array of surfels for each node in the scene graph for which the complexity exceeds some reasonable value. The surfels in an array are ordered in such a way, that each prefix of the array is a good graphical approximation of the subtree (see Figure 2). The goal is, that the minimal distance between any two points is maximized for each prefix (targeting a blue noise distribution of the points). This is done using an adaptive sampling approach (see Section 2.2). At runtime, the scene graph is traversed beginning at the root node (see Section 3). For nodes having a small projected size (and an associated array of surfels), a prefix of the surfel array is rendered to approximate the subtree’s geometry. The number of surfels is chosen relatively to the node’s projected size. Other inner nodes are traversed further and other (large or simple) leaf nodes are rendered using their original geometry.
2 Preprocessing: Generating the Surfels
The input of the preprocessing step is the virtual scene, organized in a hierarchically organized scene graph and few parameters (described later). If the scene itself does not define such a structure, a loose octree can be used to structure the scene’s objects (or triangles) into a suitable structure. Each node in the scene graph is evaluated. If a node’s subtree has a high complexity (more than e.g. 10000 polyogons) surfels are created as described in the next sections. The surfels for a node are stored as one primitive object (e.g. a vertex buffer object (VBO) in OpenGL) and attached to the node as an attribute.
2.1 Create the initial Set of Surfels
The first step to create the surfels for a node is to create the initial set of surfels, that is later reduced and ordered (see Section 2.2). It consist of points described by a positions normal, and a material description (as required for the rendering pipeline: e.g. a single color or ambient, diffuse, specular colors). The points are created by rendering the selected node’s subtree into multiple buffers – using a shader to encode the different properties (color, position, normal, etc.) into the color of one buffer each. For this, we take eight camera positions (the corners of the bounding box enclosing the subtree, looking at the center) under orthographic projection (see Figure 3). The scaling is chosen so that the larger side of the projected bounding box fits a chosen resolution parameter
. (Note: This resolution parameter should be chosen larger than the projected side length for which surfels should be rendered at runtime.) All occupied pixels are extracted from the buffers and combined into the initial set of surfels (a surfel is a tupel of property values). Additionally, an estimator value for the relative covered area of the node is calculated – the number of occupied pixels divided by the projected size of the used bounding boxes.
2.2 Select and sort Surfels by Dart Throwing
In this step, the initial set of surfels is filtered and ordered to represent a progressive LOD of the represented node. Beside the set of surfels, a value for the maximum number of surfels is required as parameter.
The selection algorithm works as follows: The initial surfels are stored in an input set. For the ordered surfels, an output array is reserved – initially containing one randomly chosen surfel from the input set. Until the output array contains the maximal number of surfels or the input set is empty, the following steps are repeated: A constant number (e.g. 200) of random surfels from the input set are chosen as candidates (Note: this is a simplification and must eventually be described in more detail!). For all candidates, the euclidean distance to the closest surfel in the output array is computed. (This can be done efficiently by internally using an octree for storing the positions of the surfels in the output array.) The candidate with the largest distance is extracted from the input set and appended to the output array. The candidate with the smallest distance is extracted and discarded. The other candidates remain in the input set. Then the process restarts.
The result of this sampling algorithm is, that the closest pairwise distances of the chosen points gradually decrease (on average, not strictly) while surfels lying too close to an already chosen surfel are filtered out. The latter speeds up the overall sampling process: Without this filtering, the number of required candidates had to increase during the sampling process in order to still acquire relevant candidates.
The rough overview of the rendering process at runtime is as follows:
The scene graph is traversed from top to bottom. If the projected size of a node’s bounding box is above a given threshold or the node is not attached with an array of surfels, the traversal is continued (or the node is rendered if it contains geometry). For small nodes, a prefix of the surfels are rendered using point rendering. The size of the prefix is chosen by the projected size of the node’s bounding box in pixels, multiplied by the estimator value for the node’s relative covered area (calculated in the preprocessing phase), and multiplied by an overdraw factor. The overdraw factor must be chosen high enough to prevent the occurrence of holes (a value of 4 is typical).
To prevent popping artifacts when switching between original geometry and points or between points in different levels, both are rendered in a transition phase. The size of the prefix of the one level decreases after the maximal prefix of the next level is rendered.
The size of the points can be increased to several pixels in order to allow rendering with fewer points without creating holes. It is then advisable to use a vertex shader for rendering the surfels that adjusts the individuals surfel’s size by the direction of the eye space normal (surfels having an orthogonal normal should have a smaller size). Otherwise, the node’s silhouette can severely be disturbed.
4 Experimental Evaluation
The most important points for an evaluation of the presented technique are:
the analysis of the blue noise property achieved by the sampling approach,
the frame rate in dependency to the scene’s complexity,
and the achieved image quality compared to non approximate rendering.
The experimental evaluation is in progress and will eventually be added to this document.
We presented a point based rendering technique for complex polygonal scenes.
One possibility to improve the distribution of the sample points on a wider range of surfaces is to maximize the geodesic distance of the sample points instead of the euclidean distance (like done by Bowers et al. [BWWM10]).
Besides the rendering of scenes on a single workstation, the principle of the ordered surfels makes it a good candidate for streaming applications. While the surfel arrays are transmitted, the already received prefix can by used as an approximation for the corresponding scene part. Further transmissions then refine the approximation progressively.
- [BWWM10] John Bowers, Rui Wang, Li-Yi Wei, and David Maletz. Parallel poisson disk sampling with spectrum analysis on surfaces. In ACM SIGGRAPH Asia 2010 papers, SIGGRAPH ASIA ’10, pages 166:1–166:10, New York, NY, USA, 2010. ACM.
- [CH02] Liviu Coconu and Hans-Christian Hege. Hardware-accelerated point-based rendering of complex scenes. In P. Debevec and S. Gibson, editors, 13th Eurographics Workshop on Rendering, pages 43–52. Eurographics Association, 2002.
- [PZvBG00] Hanspeter Pfister, Matthias Zwicker, Jeroen van Baar, and Markus Gross. Surfels: surface elements as rendering primitives. In Proceedings of the 27th annual conference on Computer graphics and interactive techniques, SIGGRAPH ’00, pages 335–342, New York, NY, USA, 2000. ACM Press/Addison-Wesley Publishing Co.
- [RL00] Szymon Rusinkiewicz and Marc Levoy. Qsplat: a multiresolution point rendering system for large meshes. In Proceedings of the 27th annual conference on Computer graphics and interactive techniques, SIGGRAPH ’00, pages 343–352, New York, NY, USA, 2000. ACM Press/Addison-Wesley Publishing Co.