PMViewer rendering framework.
The power of modern graphics hardware allow us to visualise and analyse in the real-time rendering of large number of N-body particles. We propose a novel technique that accelerate rendering of the Smoothed Hydrodynamics Particles(SPH) particles by GPU.
Our hardware assisted visibility sorting algorithm is a hybrid technique that operates in both object space and image space. In object-space, the algorithm performs a sorting of the 3D primitives in preparation for rasterization.
The goal of the sorting is to create an high dynamical range images with highlighting the inner most parts of rendered objects, in mean wile keeping depth perception in the scene. We sort particles by pre computed density and colour them by the given property: Temperature, Metallicity, Age, Density. Using density probability function we map particle properties to colour table by predefined transfer functions in each colour channel.
An interactive colour table editor allow us to design favourite transfer function. The particles sorting is done on the CPU and the rendering is done completely on the Graphics Processing Unit (GPU).
We use GL_POINT_SPRITE_ARB OpenGL extension to render particles and GL_VERTEX_PROGRAM_POINT_SIZE_NV to assign size per particle. We use OpenGL Shading Language(GLSL) shader program to orientate(billboard) a particles to the direction of camera. We use camera aligned splats to render particles. The maximum speed achieved on the NVIDIA G8800Ultra(780M VRAM), which is about 40fps for 60M SPH particles.
The method presented here is implemented in the platform independent framework written in C/C++ language using OpenGL, GLUT and GLEW libraries. The framework also supports stereoscopic camera setup.