Real-Time Snow Simulation - Integrating Weather Data and Cloud Rendering
MetadataVis full innførsel
Over the last decade the NTNU Heterogenous Computing Labratory (HPC-Lab) at theNorwegian University of Science and Technology (NTNU) has had master students work-ing on a real-time snow simulator. Evolving from a complex and highly parallell CentralProcessing Unit (CPU) smoke simulation, the simulator now covers models for wind sim-ulation, snow particle physics, and avalanche prediction all computed in parallel on bothCPU and Graphics Processing Unit (GPU) using Open Computing Language (OpenCL)or Compute Unified Device Architecture (CUDA). The resulting simulation is renderedusing modern techniques and Open Graphics Library (OpenGL).In this thesis, the wind and in-air snow simulation are improved by removing and re-ducing simplifications and assumptions. By extending control of the boundary conditionsand initial distributions, simulations can be run with external context such as real-worldweather information.The simulation boundary conditions are extended to support interpolation betweenground-truth points, and a simple, yet novel approach is introduced for selecting interpo-lation weights. The interpolation cost is shown to be less than 2ms more than for constantvalues in the worst case, for a frame time of 26ms, and at less than 1ms of additional load-ing time. The neighborhood calculation time is smaller than the time to load ground thruthpoints from disk. Snow precipitation rates across the simulation domain are controllablefrom animated data-sets or procedural functions, allowing the use of radar imaging as asource of simulation data. The additional cost of the rejection sampling is shown to benegligible for reasonable configuration values.To help visualize the precipitation rates cloud rendering is introduced to the simula-tor. While previous work focused on terrain and snow particles, the sky was simplified.Animated clouds are shown to be a computationally costly, but affordable, addition to thesimulator, improving the quality of the rendered images. The run-time cost of high qualityclouds is shown to a frame time increase of less than 50% at typical camera positions,and even last-generation mid-range GPUs maintain frame-rates of over 30HZ. High-endconsumer GPUs maintain over 30HZ even in worst-case scenarios and almost 60HZ innormal use.Finally, the choice of Pseudo-Random Number Generator (PRNG) on both the CPUand GPU are re-evaluated. A change is made necessary to support varied precipitationrates, but also improves the statistical properties of the simulation. The performance costof the improvement is shown to be negligible at less than a 5% increase in run-time of theCUDA version of the snow particle update kernel.