scispace - formally typeset
Open AccessJournal ArticleDOI

Volumetric cell-and-portal generation

TLDR
An algorithm to generate a cell‐and‐portal decomposition of general indoor scenes, an adaptation of the 3D watershed transform, computed on a distance‐to‐geometry sampled field and able to deal with classical architectural models, as well as cave‐like environments and large mixed indoor/outdoor scenes.
Abstract
We present an algorithm to generate a cell-and-portal decomposition of general indoor scenes. The method is an adaptation of the 3D watershed transform, computed on a distance-to-geometry sampled field. The watershed is processed using a flooding analogy in the distance field space. Flooding originates from local minima, each minimum producing a region. Portals are built as needed to avoid the merging of regions during their growth. As a result, the cell-and-portal decomposition is closely linked to the structure of the models. In a building, the algorithm finds all the rooms, doors and windows. To restrict the memory load, a hierarchical implementation of the algorithm is presented. We also explain how to handle possible model degeneracies -such as cracks, holes and interpenetrating geometries- using a pre-voxelisation step. The hierarchical algorithm, preceded when necessary by the pre-voxelisation, was tested on a large range of models. We show that it is able to deal with classical architectural models, as well as cave-like environments and large mixed indoor/outdoor scenes. Thanks to the intermediate distance field representation, the algorithm can be used regardless of the way the model is represented: it deals with parametric curves, implicit surfaces, volumetric data and polygon soups in a unified way.

read more

Content maybe subject to copyright    Report

HAL Id: inria-00510188
https://hal.inria.fr/inria-00510188
Submitted on 14 Oct 2010
HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entic research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diusion de documents
scientiques de niveau recherche, publiés ou non,
émanant des établissements d’enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.
Volumetric Cell-and-Portal Generation
Denis Haumont, Olivier Debeir, François X. Sillion
To cite this version:
Denis Haumont, Olivier Debeir, François X. Sillion. Volumetric Cell-and-Portal Generation. Com-
puter Graphics Forum, 2003, Grenade, Spain. pp.303 312. �inria-00510188�

EUROGRAPHICS 2003 / P. Brunet and D. Fellner
(Guest Editors)
Volume 22 (2003), Number 3
Volumetric cell-and-portal generation
D. Haumont
1
, O. Debeir
1
and F. Sillion
2
1
SLN, Université Libre de Bruxelles
2
Artis, INRIA
Abstract
We present an algorithm to generate a cell-and-portal decomposition of general indoor scenes. The method is
an adaptation of the 3D watershed transform, computed on a distance-to-geometry sampled field. The watershed
is processed using a flooding analogy in the distance field space. Flooding originates from local minima, each
minimum producing a region. Portals are built as needed to avoid the merging of regions during their growth.
As a result, the cell-and-portal decomposition is closely linked to the structure of the models. In a building, the
algorithm finds all the rooms, doors and windows. To restrict the memory load, a hierarchical implementation of
the algorithm is presented. We also explain how to handle possible model degeneracies -such as cracks, holes and
interpenetrating geometries- using a pre-voxelisation step. The hierarchical algorithm, preceded when necessary
by the pre-voxelisation, was tested on a large range of models. We show that it is able to deal with classical
architectural models, as well as cave-like environments and large mixed indoor/outdoor scenes. Thanks to the in-
termediate distance field representation, the algorithm can be used regardless of the way the model is represented:
it deals with parametric curves, implicit surfaces, volumetric data and polygon soups in a unified way.
1. Introduction
The visibility determination problem (i.e. the process of
finding the geometry that is visible from the viewer location)
is central in many computer graphics algorithms. Visibility
has been studied for a long time and many solutions have
been proposed in the literature. Most visibility culling algo-
rithms make use of particular scene characteristics to speed
up the determination process. An important class of models
is indoor scenes where algorithms can benefit from dense oc-
clusion and structural coherence of visibility. In this kind of
environment, the cell-and-portal graph (CPG) is commonly
used to solve the visibility queries. A CPG is a graph that en-
codes the visibility structure of the scene. The nodes of this
graph are cells, which correspond to the rooms of a building.
They are connected by portals that correspond to openings
(e.g. the doors and windows). A cell can only see other cells
through portals.
CPGs are often constructed by hand, with some helper tools
Artis is a research team of the GRAVIR/IMAG Laboratory, a
joint effort of CNRS, INRIA, INPG and Université Joseph Fourier-
Grenoble I
implemented in the modeling application. Therefore this
task remains difficult and the results non satisfying: being
able to create automatically a cell-portal subdivision for ar-
bitrary models would result in substantial savings of time
and money in the game industry
4
. Furthermore, it would
free the non specialist from the tedious portal placement and
cell creation process. Unfortunately, it is difficult to com-
pute automatically an optimal decomposition, since a scene
can be partitioned into an unlimited number of different cell-
and-portal graphs. Some solutions have been proposed for
very particular scenes: architectural BSP
23 5
and tubular-
like models
16
. To the best of our knowledge, no previous
published method is usable in all situations.
In this paper, we propose to restate the problem of the CPG
generation algorithm in terms of 3D image segmentation (in
image processing, segmentation is the process of separating
the different objects in an image). The image we use is an
intermediate volumetric representation of the scene, the ob-
jects to separate being the cells and the separators being the
portals. This formulation enables us to adapt a powerful tool
from the image segmentation literature, the watershed trans-
form (WST)
18
. Contrary to other approaches, the resulting
algorithm is able to compute automatically the CPG of any
c
The Eurographics Association and Blackwell Publishers 2003. Published by Blackwell
Publishers, 108 Cowley Road, Oxford OX4 1JF, UK and 350 Main Street, Malden, MA
02148, USA.

Haumont and Debeir and Sillion / Cell and Portal
indoor scene without imposing any modeling constraint.
The remainder of the paper is organized as follows: after re-
viewing some relevant work, we present the CPG generation
algorithm in section 3, followed by its implementation (sec-
tion 4). To limit the memory cost, we present a hierarchi-
cal version of the algorithm in section 5. Potential problems
and their solutions are investigated in section 6. Finally, we
discuss the results and present avenues for future work in
section 7.
2. Related Work
2.1. Visibility
Many visibility algorithms were proposed to speed up ren-
dering in interactive walkthrough applications, and the inter-
ested reader will find exhaustive surveys
10 8
. The ultimate
goal of visibility determination is to detect efficiently the
part of the scene that is visible from the camera. Before the
z-buffer algorithm became a de facto standard, exact visi-
bility determination (i.e hidden face removal) was the cen-
tral issue. Nowadays, the research has shifted to occlusion
culling, which concentrates in eliminating invisible geome-
try as early as possible in the rendering pipeline. Occlusion
culling gives a rough conservative estimation of the visible
geometry: the PVS (Potentially Visible Set), that may still
contain invisible parts of the model which are later removed
by an exact visibility algorithm.
Schaufler at al. made the important observation that visibil-
ity could be solved efficiently by using a volumetric data
structure instead of the original scene description
21
. For this
reason, they use a binary volumetric representation of the
scene for occlusion culling: the inside voxels and the hidden
voxels act as blockers to eliminate the invisible geometry.
In indoor scenes, cell-and-portal graphs have been widely
used for visibility determination
17 23 5 9 4
. Previous work
on CPGs mainly focused on the use of the graph rather than
its generation, since it was often created manually by the
user
9 4
. However, some automatic generation algorithms
have been proposed. The most common are the decompo-
sition of the scene into BSP, which are CPGs themselves
23
5
. The resulting portals are aligned with the features of the
scenes, constraining the method to a restricted set of geome-
tries. Furthermore, these approaches are limited to polygonal
datasets and lead to unusable CPG when the number of poly-
gons increases, because each triangle creates a cut plane and
adds a portal to the decomposition. An exception to the BSP
decomposition is the algorithm proposed by Lichan et al. in
the context of virtual colonosopy
16
. They make use of the
particular structure of their scene, the human colon, to cre-
ate the CPG. On the basis of a distance field, the center-line
(i.e. the skeleton) of the colon is extracted. The colon is then
partitioned with regulary spaced cross-sections, placed per-
pendicular to the skeleton.
As in
21
, our method is based on a volumetric description of
the scene. Because this representation is a distance field, our
work can be seen as an extension of the algorithm presented
in
16
. The main difference is that our technique was designed
to deal with arbitrary scenes, in place of the very particular
human colon geometry.
2.2. Distance field
A sampled distance field is a discrete scalar field, each sam-
ple point storing the distance to the closest scene geometry.
It has proven to be useful in a wide range of applications
in computer graphics: rendering , virtual sculpting, collision
detection, path planning, morphing between objects, surface
reconstruction, etc. Distance fields have been widely used
in image analysis too, for example for image segmentation.
Several methods, such as the distance transform
20
, were in-
troduced to cope with the high computational cost implied
by the distance field computation. To reduce the memory
needs, hierarchical representations
13
were proposed. Our
implementation uses both of these improvements.
2.3. Watershed transform
The watershed transform (WST)
18
is a powerful image seg-
mentation technique initially designed for 2D gray level im-
ages. One can find in
19
an introduction to the WST and
its several algorithmic implementations. Although the wa-
tershed transform can be extended from 2D to more dimen-
sions, one has to face increasing memory and computation
costs when using voxel data, therefore applications of the
3D WST remain rare
24
. However, an optimized implemen-
tation, minimizing the memory consumption to treat large
3D medical datasets, has been proposed recently
11
.
3. Volumetric CPG computation
In this section, we present the general principle of our ap-
proach.
3.1. Cell and portal Graph (CPG)
A scene can be decomposed into an unlimited number of
cell-and-portal graphs: defining what the ideal decomposi-
tion should be is still an open issue. In terms of culling per-
formance, a good partition is a trade-off between the number
of portals and the computational cost of using them. Ideally,
one wants to minimize the number of portals while trying to
place them where they will help to cull the scene’s geome-
try. In architectural scenes, this tradeoff is usually achieved
by using the ’classical decomposition’, where the cells are
the rooms and the portals are the openings.
When using a pre-calculated CPG to speed up rendering,
the visibility determination consists first in finding the cell
in which the viewer is located, called the view cell. All the
objects of the view cell are classified as potentially visible.
Then the algorithm recursively checks the cells that are con-
nected to the view cell by portals. The objects of these cells
are also classified as potentially visible. A more exact visi-
bility test with respect to a given viewpoint will classify the
objects as visible through a portal if they belong to the pyra-
mid supported by the portal’s silhouette and whose apex is
the view point. The set of all the visible objects is found by
c
The Eurographics Association and Blackwell Publishers 2003.

Haumont and Debeir and Sillion / Cell and Portal
testing the visibility through all the visible portals.
We propose to automatically create an approximation to the
classical CPG decomposition using the segmentation of a
volumetric representation of the scene. As will be shown in
this section, the watershed transform is well adapted for this
task.
3.2. Watershed transform
Let us begin with a 2D explanation of the watershed trans-
form. The transformation extends easily to supplementary
dimension, and the 3D watershed transform is a straightfor-
ward adaptation of the 2D process.
The watershed transform isa morphological tool thatconsid-
ers a function D as a topographic surface S and defines the
catchment basins and the watershed lines of D by means of a
flooding process: a hole is pierced at each local minimum of
the surface S, afterwards the surface is plunged into a lake at
a constant vertical speed. The valleys of S are flooded by the
water entering through its holes (see figure 1(a)), creating
basins (i.e. the catchment basins). During this process, the
water coming from different minima may merge. To avoid
this, we build a dam on the point where these floods would
merge (see figure 1(b)). A difficulty arises when the location
of the fusion occurs on a plateau. Suppose that two regions,
noted A and B present a the iteration t-1, merge during the
iteration t into a single region C. The merge is detected and
a dam is built to separate A and B. In the classical watershed
transform, the dam is placed on the SKIZ (Geodesic Skele-
ton by Zones of Influence, defined in the appendix) of A and
B into C. At the end of the process, all the surface is under
water: only the dams emerge 1(c)). The watershed of D is
defined by the set of dams, separating the catchment basins.
Each of these basins contains a single minimum of D.
(a) (b) (c)
Figure 1: Different steps of the watershed algorithm.
The watershed transform is widely used for image seg-
mentation. For example, if the watershed transform is ap-
plied to the gradient of a greyscale image, the watershed
lines correspond directly to the contours and each catchment
basin corresponds to an object of the image.
3.3. CPG generation algorithm
When applied to the distance map representation of the
scene (see figure 2), the classical watershed algorithm
can be adapted for the generation of a CPG. To remain
compatible with a flooding metaphor, the field D is inverted
before the algorithm takes place (i.e. each distance is given
a negative sign).
Figure 2: Distance field representation of an architecural
model (after inversion).
The height field representation of D shows that the saddle
points of the surface correspond to the portals locations (cf.
figure 3). In 3D, these locations correspond to the pinches of
the distance field.
Figure 3: Distance field used as topographic surface. A sad-
dle point, corresponding to one of the portal, is highlighted.
The progression of the watershed algorithm applied to D
is depicted in Figure 4.
Figure 4: Different steps of the watershed algorithm. Two
catchment basins getting in contact during an iteration re-
veal the presence of an opening: a portal is built to separate
them.
The result of this segmentation is close to the intuitive
classical CPG decomposition described above (see last im-
age of figure 4):
c
The Eurographics Association and Blackwell Publishers 2003.

Haumont and Debeir and Sillion / Cell and Portal
the cells correspond to the catchment basins of D. They
are the volumetric space enclosed by the geometry of the
scene, and separated by the portals. One can see that they
correspond to the rooms of the architectural scene.
the dams separate the catchment basins: they directly cor-
respond to the portals. They are placed at the pinch-points
of the free space in the volumetric representation of the
scene. In terms of visibility, they correspond to areas
where the scene’s longest visibility lines (e.g. the set of
segments traced between all the mutually visible points
of the scene) are concentrated. This means that the portal
are placed where they are supposed to be helpful for vis-
ibility culling. Moreover, in architectural models, pinches
effectively encompass the doors, windows and corridors.
Note that portals are added on all pinches and that each local
minima generates a cell. Due to this fact, some of the cells
and portals may be unsuitable. This problem principally oc-
curs when the initial geometry is intricate, leading to a very
perturbed distance field. This is an illustration of the classi-
cal over-segmentation problem that occurs when segmenting
images by watershed. We will detail in section 6 some solu-
tions to this problem in our case.
4. Implementation
We propose an implementation organized in successive
stages explained in detail below. First, the distance field from
the scene representation is computed and sampled in a grid.
The distance map is then used by the watershed process to
find the contacts between catchment basins, where portals
are to be placed. When necessary, the portals are built on the
basis of the scene geometry. The cell-and-portal graph itself
is computed as the watershed takes place. At the end of the
algorithm, the scene geometry is assigned to the different
cells.
4.1. Distance Map Construction
The distance field evaluation requires a function that com-
putes the distance between a 3D point and its closest ge-
ometry. From the CPG algorithm point of view, the only
difference between all the modeling techniques (parametric
surface, volumetric representation, implicit surface, polygon
soup,...) is the way this distance function is computed. For a
set of independent triangles for example, the distance is the
minimum distance to all the triangles in the model. For an
implicit surface, the distance can directly correspond to the
implicit function.
A naive brute force algorithm evaluates the distance field for
every point of the distance map. Unfortunately, such a query
is very costly in the case of a polygonal model representa-
tion, even if the triangles are organized in a hierarchical data
structure (such as an octree, a BSP or a bounding volume hi-
erarchy). The total distance field computation time become
the limiting process.
More sophisticated algorithms make use of particular prop-
erties (continuity, bounded growth) of the distance function
to speed up the computation. The distance transform
20
gives
an approximation of the distance field that is very fast to
compute but relatively inaccurate. This algorithm applies a
local distance matrix in two successive passes over the voxel
grid. Each pass propagates the local distance computed by
the addition of known neighborhood value to the values ob-
tained from the local distance matrix. The forward pass cal-
culates the distance from the surfaces in an arbitrary top-
down direction, starting from the top corner of the grid and
moving away to its bottom. The backward pass calculates the
remaining distances, from the bottom corner of the grid to
its top. The algorithm’s speed results from the simple com-
putations involved. In our algorithm, distance transform is
used because it does not compromise watershed: in practice,
the distance transform only deforms the distance fieldlocally
without adding any local minima.The number of regions and
their global shape are conserved. When an exact distance is
required, for example in the case of portal placement (see
section 4.3.2), it is computed on the fly from the initial ge-
ometry representation.
4.2. Portals Detection
This phase corresponds to the watershed algorithm. A level
value, called isoValue
t
, is initially set to the minimum value
of the distance map. isoValue
t
defines a surface that parti-
tions the 3D space into an inside volume -where the dis-
tance field is smaller than isoValue
t
- and an outside vol-
ume -where the distance field is greater than isoValue
t
-
(Remember that by convention the distances have negative
values). The algorithm iteratively increases isoValue
t
. The
inside volume corresponding to iteration t, called Inside
t
, is
cut into different regions. A labeling process assigns a dif-
ferent ID to each region, that is a unique value is assigned to
voxels that belong to the same connected region. The con-
nectivity used is a 4-connectivity in 2D and a 6-connectivity
in 3D. The key step of the algorithm is to detect the catch-
ment basins that merge during an iteration t, in order to sepa-
rate them by a dam. This task is accomplished by the dilation
of each regions of Inside
t
1
in the Inside
t
space, at the be-
ginning of iteration t. This dilation consists in propagating
the ID to the adjacent voxels (see figure 5). During this di-
lation, the new ID that is propagated (called NEW_ID) is
compared to the ID already stored in the voxel that has been
reached (called OLD_ID). Three cases are possible:
OLD_ID is null: the dilation of the region reached a be-
forehand empty voxel. Nothing happens and the dilation
continues (see figure 5 (b)).
OLD_ID is equal to NEW_ID: the voxel already belonged
to the region. The dilation stops.
OLD_ID and NEW_ID are different: the voxel belonged
to another region (see figure 5 (d)). The center of the voxel
is the contact point P. The two colliding regions OLD_ID
and NEW_ID are restored as they were before dilation,
and a portal is built to separate them (see section 4.3). The
dilation process restarts with the dam included (see figure
c
The Eurographics Association and Blackwell Publishers 2003.

Citations
More filters
Book

Virtual Crowds: Methods, Simulation, and Control

TL;DR: The goal in this survey is to establish a baseline of techniques and requirements for simulating large-scale virtual human populations, including basic locomotive behaviors possibly coupled with a few stochastic actions.
Journal ArticleDOI

Way-Finder: guided tours through complex walkthrough models

TL;DR: This paper presents a characterization of suitable properties for camera paths and discusses an efficient algorithm for computing them with little or no user intervention.
Journal ArticleDOI

By-example synthesis of structurally sound patterns

TL;DR: This paper proposes a novel formulation for on-surface by-example texture synthesis that directly works in a voxel shell around the surface, enabling efficient local updates to the pattern, letting the structural optimizer perform changes that improve the overall rigidity of the pattern.
Proceedings ArticleDOI

Camera control in computer graphics: models, techniques and applications

TL;DR: The motivations and requirements for camera control are summarized, an overview of the state of the art is presented, and promising avenues and hot topics for future research are examined, which classifies the various techniques and identifies the representational limits and commitments of each.

Precomputing Geometry-Based Reverberation Effects for Games

TL;DR: By pre-computing image-source gradients for early reflections and directional decay profiles, this paper can generate location dependent reverberation effects without storing or accessing the actual geometry at run-time, and introduces an efficient prioritization scheme and evaluates alternative transforms for late reverberation processing.
References
More filters
Journal ArticleDOI

Sequential Operations in Digital Picture Processing

TL;DR: The relative merits of performing local operations on ~ digitized picture in parallel or sequentially are discussed and some applications of the connected component and distance functions are presented.
Journal ArticleDOI

The watershed transform: definitions, algorithms and parallelization strategies

TL;DR: A critical review of several definitions of watershed transform and associated sequential algorithms is presented in this paper, where the need to distinguish between definition, algorithm specification and algorithm implementation is pointed out.
Proceedings ArticleDOI

Adaptively sampled distance fields: a general representation of shape for computer graphics

TL;DR: This work describes one implementation of ADFs, illustrating its utility on two diverse applications: 1) artistic carving of fine detail, and 2) representing and rendering volume data and volumetric effects.
Journal Article

The Watershed Transformation Applied to Image Segmentation

Serge Beucher
- 01 Jan 1992 - 
TL;DR: This paper defines the basic tool, the watershed transform, and introduces a general methodology for segmentation, based on the definition of markers and on a transformation called homotopy modification, particularly efficient for defining different levels of segmentation starting from a graph representation of the imagesbased on the mosaic image transform.
Related Papers (5)
Frequently Asked Questions (11)
Q1. What are the contributions mentioned in the paper "Volumetric cell-and-portal generation" ?

The authors present an algorithm to generate a cell-and-portal decomposition of general indoor scenes. To restrict the memory load, a hierarchical implementation of the algorithm is presented. The authors also explain how to handle possible model degeneracies -such as cracks, holes and interpenetrating geometriesusing a pre-voxelisation step. The authors show that it is able to deal with classical architectural models, as well as cave-like environments and large mixed indoor/outdoor scenes. 

In future work, their algorithm could directly benefit from the improvements already published in the watershed literature such as marker-controlled watershed to reduce over-segmentation or computational and memory optimized implementations. 

The key step of the algorithm is to detect the catchment basins that merge during an iteration t, in order to separate them by a dam. 

The watershed transform is a morphological tool that considers a function D as a topographic surface S and defines the catchment basins and the watershed lines of D by means of a flooding process: a hole is pierced at each local minimum of the surface S, afterwards the surface is plunged into a lake at a constant vertical speed. 

When the initial full resolution grid does not fit in memory, a mechanism of swap between the central memory and the hard disk is used. 

The distance map is then used by the watershed process to find the contacts between catchment basins, where portals are to be placed. 

Before the z-buffer algorithm became a de facto standard, exact visibility determination (i.e hidden face removal) was the central issue. 

In the case of 2D 1/2 visualization of terrain and city, one could want to use a CPG, with the portals placed between the different peaks and the different buildings. 

In return, each CPG cell containsthe list of objects composing it, organized by a hierarchical tree to speed up the portal culling (for example a binary tree of Axis Aligned Bounding Boxes). 

the storage of the surface into a BSP would solve the efficiency problem, but the memory cost would not be negligible and the construction of a good BSP is not straightforward. 

The major changes are:the use of min and max value stored in every node to speed up the algorithms: the portions of the octree that are not concerned by a treatment (labeling, propagation, dilation, ...) can be easily skipped.