OpenGL Viewer Project
Project lead: Wen Zheng
The goal of this project is to create opengl viewers that facilitate display and
analysis of PhysBAM simulation data, so that users can quickly locate bugs or
potential problems of their simulation. To achieve this goal, a number of
display functions have already been added for various types of data, such as
viewing scalar field data in color map mode, viewing vector field as stream
lines, viewing the vorticity field of a vector field, etc. In addition to those
frequently used functions that are already incorporated into the viewers, users
might also need to add new display functions to explore some specific aspects of
simulation data. Thus the PhysBAM_OpenGL framework is also designed to ease this
There are 3 separate viewers that support 1D, 2D and 3D data respetively. The
current version only supports data structures defined in PhysBAM_Tools,
including grids, scalar fields, vector fields and simple point clouds. An
upgraded version will be released once we release PhysBAM_Geometry.
The PhysBAM_OpenGL viewers support the following functions:
- 3D Navigation: ArcBall rotation, pan and zoom.
- Animation: data for each frame of a simulation sequence will be read from
an indivisual directory named after its frame number; users can play the
sequence at frame rate, at full speed, or step forward/backward.
- Output: users can output the display into jpg/png/ppm/eps images or mov
videos, within a given range of frames.
- Offscreen rendering: rendering can be done offscreen.
- Keyboard control: users can use keyboard to switch display modes of various
components, control animation play, and other functions.
- Screen selection: by SHIFT+clicking on the screen, users can pick and
a specific element, like one cell of a grid, to view its detail
infomation, like density, velocity, pressure, etc.
- Slice mode for 3D data: view 3D data slice by slice as 2D data.