Journal "Software Engineering"
a journal on theoretical and applied science and technology
ISSN 2220-3397
Issue N7 2018 year
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.