A 3D roaming and collision detection algorithm applicable for massive spatial data
RESEARCH ARTICLE
A 3D roaming and collision detection
algorithm applicable for massive spatial data
Mingxia Xie ID1,2*, Xinqiang Niu2
1 Key Laboratory of Urban Land Resources Monitoring and Simulation, Ministry of Land and Resources,
Shenzhen, China, 2 Changjiang Institute of Survey, Planning, Design and Research, Wuhan, China
*
a1111111111
a1111111111
a1111111111
a1111111111
a1111111111
OPEN ACCESS
Citation: Xie M, Niu X (2020) A 3D roaming and
collision detection algorithm applicable for massive
spatial data. PLoS ONE 15(2): e0229038. https://
doi.org/10.1371/journal.pone.0229038
Editor: Yong Peng, Central South University,
CHINA
Received: August 27, 2019
Accepted: January 28, 2020
Published: February 21, 2020
Copyright: © 2020 Xie, Niu. This is an open access
article distributed under the terms of the Creative
Commons Attribution License, which permits
unrestricted use, distribution, and reproduction in
any medium, provided the original author and
source are credited.
Data Availability Statement: All relevant data are
within the paper and its Supporting Information
files.
Funding: This work was supported by the Project
Supported by the Open Fund of Key Laboratory of
Urban Land Resources Monitoring and Simulation,
Ministry of Land and Resources (KF-2018-03-050),
and China Postdoctoral Science Foundation
(2018M642800), National Key R&D Program of
China(2017YFC1502600).
Competing interests: The authors have declared
that no competing interests exist.
Abstract
In this paper, a novel 3D roaming algorithm considering collision detection and interaction is
proposed that adopts a triangle mesh to organize and manage massive spatial data and
uses a customized bounding box intersector to rapidly obtain the potential collided triangles.
The proposed algorithm can satisfy the requirements of timeliness and practicability during
complicated large 3D scene collision detection. Moreover, we designed a method to calculate the collision point coordinates according to the spatial position relation and distance
change between the virtual collision detection sphere and triangles, with the triangle edges
and three vertices being considered. Compared to the methods that use the native intersector of OpenSceneGraph (OSG) to obtain the collision point coordinates, the calculation efficiency of the proposed method is greatly improved. Usually, when there is a big split/pit in
the scene, the viewpoints will fly off the scene due to the fall of the collision detection sphere,
or the region interior cannot be accessed when the entrance of some local region (e.g., internal grotto) of the scene is too small. These problems are solved in this paper through 3D
scene-path training and by self-adaptively adjusting the radius of the virtual collision detection sphere. The proposed 3D roaming and collision detection method applicable for massive spatial data overcomes the limitation that the existing roaming and collision detection
methods are only applicable to 3D scenes with a small amount of data and simple models. It
provides technical supports for freewill browsing and roaming of indoor/outdoor and overground/underground of the 3D scene in cases of massive spatial data.
Introduction
With the rapid development of 3D spatial data acquisition technologies (e.g., 3D laser scanner,
oblique photography, UAV measurement, and BIM) as well as spatial object modelling technologies, the availability of 3D spatial data with various scales or different degrees of details
has been greatly improved. The data size and complexity of 3D scenes have sharply increased
while critically improving the verisimilitude of 3D scenes. Presently, 3D spatial data acquisition and modelling technologies have been widely applied to digital twins and the product
life-cycle management of engineering (i.e., water resource and hydropower engineering, constructional engineering, underground pipe network engineering, and railroad and bridge
PLOS ONE | https://doi.org/10.1371/journal.pone.0229038 February 21, 2020
1 / 15
A 3D roaming and collision detection algorithm
engineering). During the application process, the constructed 3D scene is both a 3D geospatial
environment model with a macro-region and a complicated 3D virtual scene with a micro and
exquisite building model. When the viewing point enters from the macroscopic scene into the
micro indoor scene, if it does not consider the collision detection problem and roams and analyzes indoor, it will lead to the problem of incorrect analysis and calculation due to the inaccurate capture or acquisition of the viewing point. Moreover, during the roaming process, it has
the phenomena of penetration (e.g., flying into the ground and passing through the wall) that
do not conform with real situations, which makes it difficult to roam and analyze indoors or
makes it unable to operate.
Scene roaming and collision detection are the core technologies of virtual scenes. Their
effects directly influence the reality of the whole virtual scene [1]. The existing roaming algorithms considering collision detection mainly construct the target bounding box to judge the
collision relation among actual objects and find the balance between the close joint degree of
bounding box with the actual collision object surface with the collision detection effectiveness;
thus, roaming in 3D scenes is realized [2][3]. Existing algorithms have mainly been applied to
3D scenes with less data volume and to simple models. There are still no clear and effective
solutions regarding how to realize high-efficient roaming in consideration of real-time collision detection and interaction in massive and complicated 3D scenes so as to effectively avoid
the phenomenon of penetration that does not conform to actual situations. Besides, the problem of inaccurate capturing of the viewing point remains. However, it has critical significance
in the fields of digital twins and engineering product life-cycle management for integrated
management, analysis, roaming, and applications of massive indoor/outdoor and overground/
underground spatial data. In addition to improving the sense of reality for virtual scenes, it is
convenient for users’ indoor operations, such as searching and analyzing.
Current situation analysis
In a 3D scene, people usually observe an object with their eyes. If the viewing point moves, the
surrounding scenery moves reversely relative to the viewing point. This process leads to a
scene roaming effect in the brain. Collision is caused by user interaction and object movement
during roaming [4]. During scene roaming, when the system receives the user input, it needs
to judge if the new viewing points corresponding to the user input will collide with or enter
objects in the scene [5] [6].
Analysis of collision detection methods
There are two types of collision detection methods: intersector detection methods and bounding box detection methods. In intersector detection methods, the iterator is bonded with (...truncated)