Home

Introduction

The purpose of this program is to visualize vector fields. This is done by rendering a stream surface.

Stream Surface

A stream surface is generated by sampling particles along a seed line. This seed line is placed by the user. The particles are carried by the vector field and at each iteration the position of the particles generates mew points and normals of the surface. This is done, until all particles die or a maximum iteration set by the user is reached.

Functionality

The program first generates a volume. Then, a surface is generated according to the volume. This generates a point cloud, which is finally rendered.

Rendering is done by creating for each particle position a quad which is aligned tangential to the surface. In the fragment shaders, this quad is trimmed to discs. There are three passes, to render the point cloud: 1) The depth is rendered to a texture. 2) The shaded surface is rendered to a texture using additive blending. In the alpha channel the weight of the rendered points is saved (depending on the radius). The depth texture is used to discard points, which are behind the frontmost plus an small offset. 3) The texture is rendered using a screen aligned quad. In the same step, the values are normalized by the alpha component of the second step.

Afterwards, the moveable spheres, seed line and bounding box are rendered over this, so they are always visible.

UI

There are two main UI elements: the options menu and the moveable spheres. The options menu provides with settings regarding seed line, particle sampling interval, used volume data, number of iterations and a setting if the surface should be rendered colored. The white sphere defines the direction of the light source of the scene. The green spheres are the end points of the seed line.

There are two vector fields the user can choose from: Tornado and Test1. The Tornado volume was taken from here.