Kinetic Visualization (Visualisierung 2 - SS2012)

By Michael Opitz and Reinhard Russ
  1. Overview
  2. User Interface
  3. Implementation
  4. Source Code
  5. Screenshots/Videos
  6. References
Overview

Kinetic Visualization is an approach, which tries to utilize animations (the motion of particles) to enhance the perception of the shape and texture of a static object. The idea originates from observations that e.g. an object in moving water gives the perception of a shape. The modeling method for kinetic visualization is based on a particle system using (physical or biological) rules to update each particle, define interaction between particles and render the particles. The proposed technique is not a replacement for conventional rendering methods e.g. direct volume rendering.

Download KinVisSS2010

Features

Technologies

Requirements

Test Environment

Runtime Settings

The runtime configuration settings are for all configurations, which are used for manipulating the motion strategies of the particles (as described in chaper 3).

Runtime settings

General Movement (chapter 3.2)

PCD formula

Note that the following formula of the paper (chapter 3.1 - Motion Along the Surfaces) is always used and is independent from the user parameters:

Gradient formula

Coherent Movement (chapter 3.3)

The parameter settings for flocking and user preferred direction are responsible that the particles move in directions consistent with their neighbors.

Flocking

Flocking is implemented by weighting the direction vectors of a particles neighbors with a gaussian. Sigma indicates the size of the gaussian and Flocking influence is described in the paper.


Flocking formula Flocking vector formula

The sigma sign means in this context, that this calculation must be done for every neighbor of a particle (there is an iterator ParticleMapIterator implemented for getting the neighbors).

User Preferred Direction

The alternative to flocking is to simply define a user preferred direction for the particle movement.


User direction formula

Collision Avoidance (chapter 3.4)

In order to get a well distributed particle density, the application provides magnetic repulsion and particle dying.

Repulsion

The repulsion radius indicates how big the neighborhood should be, which should be checked. Repulsion influence is described in the paper. Particles will be moving away from each other inverse proportional to the square of their distance (also desribed in the paper in chapter 3.4). This approach is quite similar to Newton's law of universal gravitation or Coulomb's law, because here is also the inverse square of the distance the basis of most calculations.

Magnetic repulsion formula Repulsion vector formula

As for the flocking vector, the sigma sign means in this context, that this calculation must be done for every neighbor of a particle.

Dying

Particle dying is implemented by counting each neighbor and weightening it with a gaussian. If this sum is above the threshold the particle will die.

Preprocessing Settings

The preprocessing configuration settings are for all initialization steps of the particle system, which are also manipulating the motion of the particles and need to be done before the actual rendering of the particle take place, such as motion along the surface (chapter 3.1), particle density (chapter 3.4), number of particles and so on. With this parameters the particle system is generated in a loop (xyz - direction) in the class ParticleFactory.

Preprocessing Settings

Rendering Settings

With the rendering settings, the user is allowed to change the parameters of the direct volume rendering technique and some other parameters of the particles, which are not directly concerned with the particle system itself (e.g. particle size and particle shading).

Rendering Settings

Save Configuration Settings

It is possible to store all mentioned configuration settings in an ini-file.

Store Settings

Open Volume

Tha application can load dat- and dds-files. By selecting multiple image files, it is possible to load respectively build a volume.

Open Volume

The application works with all 8-bit volumes from The Volume Library. The 16-bit volumes are not supported.

Preprocessing (CUDA and alternatively CPU)

In the preprocessing/initialization step, the application computes the gradient and the curvature of the volume image. Additionally in this step also the gaussian smooth image is calculated.

The input for the preprocessing step is for example (Nucleon) the following image:

Nucleon Preprocessing

The class ProcessingUtils and ProcessingUtilsCuda computes now the gradient, curvature and gaussian smooth image of this input. If CUDA is not available on the target architecture, then this computation takes place on the CPU, otherwise on the GPU with CUDA.

Gradient computation

The gradient is calculated like in GPU gems with central differences.

Curvature computation

The curvature is calculated according to Computing the Differential Characteristics of Isointensity Surfaces. First of all the gradient for the image is calculated, which is the first derivation. After this the "gradient of the gradient" in x-,y- and z-direction is calculated for the curvature computation, which is the second derivation.

Then a loop through the volume in each direction computes the curvature as follow (computes the principal curvatures from the first and second deviations of the image):

After this step alphaX, alphaY and alphaZ is calculated. With this results the ti's are calculated as follow:

Tis formula

The ti's are then the curvature C = vec3(t1x, t1y, t1z). Please take a look at the paper for more details.

Gaussian computation

The gaussian computation is used for smoothing the image (remove some noise). This smoothed image is the basis for the curvature computation. It can be also used for rendering a gaussian filtered image of the volume.

On the right side is the gaussian filtered image and on the left side is the non-filtered image.

Gaussian filtered image

Particle System

The generation of the particle system is located in the class ParticleFactory, while the rules for the particle system are implemented in the class Particle. Most of the steps are already described in the user interface part of this documentation, but here a short overview:

Two render passes

In the first pass the particles are rendered to an offscreen framebuffer. The particles are in the intervall [0,width] x [0,height] x [0,depth] and must be transformed to the cube coordinate system [-10,10] x [-10,10] x [-10,10] of the volume. The depth texture is then passed to the volume fragment shader where the rendering of the volume and the visibility computation of the particles take place.

Geometry Shader

The geometry for the particles is generated in the geometry shader particles.geo and is a simple rectangle (with the particle size as parameter). In the fragment shader particles.frag of the particles a texture is used for obtaining nice particles.

Particle texture

Direct Volume Rendering

The application uses direct volume rendering (front-to-back compositing) with a transfer function.

Volume Shading

The volume shading is located in the fragement shader kinetic_particles_dvr.frag. We are using the blinn-phong light model for volume shading and as desribed in we additionally do gradient magnitude shading and gradient magnitude opacity modulation. For shading we are using one light source and the intensitiy of the shading can be manipulated by the user. Shading is performed in every iteration of the ray casting loop and thus has a great performance impact (125fps vs. 75fps).

On the right side is the shaded volume and on the left side is the unshaded volume.

Volume shading

Particle Shading

The particle shading is located in the fragement shader particles.frag. Similarly to the shading of the volume, we use the blinn-phong light model for particle shading.

Comparision

With particles the shape of the object is better represented
Particles vs. Without Particles for Fuel - Better representation of the shape Particles vs. Without Particles for Nucleon - Better representation of the shape

Standard configuration

With this parameters we obtained the best results
Fuel Standard Another Fuel Standard Nucleon Standard Small Nucleon Standard Big
Silicium Standard Neghip Standard (representing the spatial probability distribution of the electrons in a high potential protein molecule) Another Neghip Standard Torus Standard

For the silicium data set this video shows the kinetic visualization much better than the screenshot.

Watch another video

Flocking vs. User Preferred Direction

The chosen user preferred direction in this case was not optimal, because all particles are moving into one (wrong) direction
Fuel Flocking Fuel User Preferred Direction
Torus Flocking Torus User Preferred Direction

Watch video

Repulsion vs. Dying

Repulsion leads to a much better result concerning a well distributed particle density
Fuel Repulsion Fuel Dying
Torus Repulsion Torus Dying

Watch video

Apply only the Gradient Rule (Motion Along the Surface)

Curvature influence, flocking, user direction, repulsion and dying are disabled and thus there are some regions with more particles and some regions with less particles
Only the gradient rule (Nucleon) Only the gradient rule (Fuel)

All Rules are disabled (only Preprocessing)

The particles are flying into the direction of the bounding volume
No rules for the particle system (Nucleon) No rules for the particle system (Fuel)

Watch video
Watch another video

Different Density Levels (Preprocessing step)

Particles are partially not on the volume or to much inside the volume
Different Density Levels (Nucleon) Different Density Levels (Fuel)

Different Density (Inverse) (Preprocessing step)

Results in less particles, because a single particle needs more space
Different Density (Inverse) (Nucleon) Different Density (Inverse) (Fuel)

Different Particle Sizes

Fuel Particles  5% Fuel Particles 10% Fuel Particles 15% Fuel Particles 20% Fuel Particles 30%