Journal "Software Engineering"
a journal on theoretical and applied science and technology
ISSN 2220-3397

Issue N7 2018 year

DOI: 10.17587/prin.9.305-310
Collision Detection of Small-sized Particles with Virtual Objects Based on Depth Buffer
A. V. Maltsev, avmaltcev@mail.ru, Scientific Research Institute for System Analysis of the Russian Academy of Sciences, Moscow, 117218, Russian Federation
Corresponding author: Maltsev Andrey V., Ph.D., Leading Researcher, Scientific Research Institute for System Analysis of the Russian Academy of Sciences, Moscow, 117218, Russian Federation, E-mail: avmaltcev@mail.ru
Received on April 19, 2018
Accepted on May 15, 2018

This paper presents distributed methods to calculate in real-time collision points of small-sized particles, recti-linearly moving along parallel trajectories (for example, water droplets in heavy rain or large snowflakes in windless weather), with three-dimensional objects of virtual environment. Considered solutions are based using the CUDA parallel computing architecture on modern graphics processors and virtual scene depth map generated by means of hardware depth buffer. To create depth map, a fictitious virtual camera is placed to central point of particle systems emitter and scene is rendered from it. The eye vector of the camera (negative Z-axis of view coordinate system) is aligned with particle motion direction. RGB-channels are blocked for writing data, and depth values from z-buffer are stored in single channel floating point texture that is depth map. This texture is converted to format that supported by CUDA, and passed to kernel which calculates current states and positions of particles and also finds their collisions with virtual objects. Based on proposed methods and algorithms, software modules were created and tested in the visualization system developed in Scientific Research Institute for System Analysis of the Russian Academy of Sciences. Complex virtual scenes with different number of particles (from several thousand to several million) were used to evaluate efficiency of the modules and algorithms. It was shown that proposed solutions meet high requirements of real-time visualization. The modules can be used in virtual environment systems, training complexes, virtual laboratories, etc.

Keywords: virtual object, particle, graphics processor, visualization, real time, shader, CUDA
pp. 305–310
For citation:
Maltsev A. V. Collision Detection of Small-sized Particles with Virtual Objects Based on Depth Buffer, Programmnaya Ingeneria, 2018, vol. 9, no. 7, pp. 305—310.
This research was carried out with the financial support of the Russian Foundation for Basic Research in the framework of the scientific project no. 16-07-00796