![](bg3.png)
more, the total number of triangles resulting from the
volumetric model can be several hundred thousands,
which renders this option inapplicable to untethered
VR. Triangulation becomes even more problematic,
since the triangulated meshes must be smoothed and
vertex normals estimated in the updated regions and
their boundaries. On the other hand, direct volume
rendering using ray marching can be performed in a
more controllable manner, with the option to trade
visual fidelity for speed in order to maintain the de-
sired frame rate. However, it implies two things:
first, the rendering pipeline of the game engine must
be circumvented for the particular game object and
second, the volume representation must be resident
on GPU memory and constantly updated. The latter
proved to be an especially heavy task in Unity, which
does not provide access to texture subloading func-
tionality. The custom rendering for the sculpted vol-
ume translates to implementing all shading with cus-
tom shaders. Furthermore, since the game engine is
agnostic to the volumetric representation, interaction
with light sources, including shadows, cannot use the
rendering passes of the former. A positive side-effect
of this is that custom lighting allows us to model more
realistic light-volume interaction, more suitable for
the often translucent materials used.
2 RELATED WORK
We present here a brief overview of prior art relevant
to the tasks at hand in our application, i.e. geometry
representation for dynamic updates and visualisation
approaches for such data. We deem a review of the
general volume editing and related VR applications
out of the scope of our discussion, since we focus on
the specific case of untethered VR, where prior art is
scarce.
Volumetric Representations. Since direct editing of
geometric meshes with arbitrary operations can lead
to heavy re-tesselation and topology changes, a tri-
angulated mesh representation is typically avoided in
digital sculpting applications. Even more so in our
case, where the computing resources of an untethered
VR system are limited. On the other hand, volumetric
representations offer a generic and fast approach to
represent arbitrary shapes, at a user-controlled preci-
sion. Volumetric data, expressing the presence of the
geometric shape at a given spatial partition, can eas-
ily be accomplished using a uniform grid representa-
tion (Lagae and Dutr
´
e, 2008), which is an inexpensive
choice in terms of construction and update, but can
become prohibitively expensive on storage require-
ments. Alternatively, resorting to image-based regular
grids (Vardis et al., 2016; Karabassi et al., 1999) can
be lighter to maintain and equally fast to update on ev-
ery consecutive frame. Complexity of spatial queries
is constant on both of these structures but can induce
divergence if variable size lists of primitives are main-
tained for each voxel (for analytic computations), in-
stead of being treated as discretised boolean volume
presence (occupancy) indicators. To represent and
process larger and more detailed geometric shapes,
uniform grids can be hierarchically built. Hierarchi-
cal approaches include the popular Sparse voxel oc-
tree (Laine and Karras, 2010) and hierarchical irreg-
ular grids (P
´
erard-Gayot et al., 2017), but such meth-
ods are inapplicable to our case, since we not only
need per-frame updates of the data structure, but there
is also limited amount of memory bandwidth for data
representation.
Volume - Ray Intersection Queries. Depending
on the voxel grid representation, ray traversal or
marching within a volume towards a potential hit cell
can be achieved either analytically (Amanatides and
Woo, 1987), exhaustively evaluating all possible ray
- cell hits along the footprint of a ray or, approxi-
mately using a digital differential analyzer (DDA) al-
gorithm (McGuire and Mara, 2014). Both approaches
can be adapted either for image-domain or world-
space ray traversal and also account for hierarchi-
cal representations, as in the Quadtree Displacement
Mapping image-space ray traversal (Drobot, 2010).
In our work, to minimise thread divergence within
fragment invocation, we employ a variant of the
DDA algorithm with a constant number of samples,
since the resolution of the volume is fixed, hence the
worst case traversal length. Signed distance fields
(SDFs) (Bloomenthal and Wyvill, 1997) is another
popular approach to quickly traverse empty space in
ray marching and represent level sets of complex pro-
cedural shapes. A distance field is a spatial func-
tion that reports the minimum distance of a given
point from the level set. The SDF replaces the abso-
lute distance with a signed one, indicating the sided-
ness. This information can be used for safely skipping
empty space while traversing a volume, whose occu-
pancy boundary can be considered a discretised level
set isosurface. It can also be used to iteratively com-
pute intersections with the isosurface. We do not gen-
erate a full distance field for our model, which would
be required for empty space skipping, since the vol-
ume is constantly updated and SDF computation is
rather expensive. However, we exploit a generic algo-
rithm to identify the closest intersection point on the
SDF, the sphere tracing (Hart, 1995), to better approx-
imate a smooth shading point and normal from a ray
marching hit point (see Section 4.2).
GRAPP 2023 - 18th International Conference on Computer Graphics Theory and Applications
112