ParaView technique: Curved and nicely spaced arrow glyphs

ParaView has a number of great filters for generating visualizations of 3D vector fields. This post describes a recipe I learned from Russell M Taylor II at UNC’s Department of Computer Science. The recipe combines several of ParaView’s filters to produce curved arrow glyphs that are laid end-to-end at a good density in the image, resulting in improved perception of the vector field. The technique is inspired by the 2D vector field visualizaton technique Turk and Banks presented in their Image-Guided Streamline Placement paper at SIGGRAPH 1996.

This recipe can be used to generate images like this:

Compared to the image below created with the standard Glyph filter, the curvedness of the glyphs and their end-to-end alignment in the image above makes it much easier to visually trace along the vector field.

To create images like this, follow this recipe:

  1. Load data with a vector field array. Let’s assume the array is named Velocity.
  2. Add a Point Source from the Sources menu. Place the center of this source somewhere near the beginning of the vector field. Set the “Number of Points” to between 50-100. Adjust this number if the resulting image is overloaded with arrow glyphs.
  3. Create a Stream Tracer with Custom Source. Set the “Input” to the dataset you loaded in step 1 and the “Seed Source” to the Point Source created in step 2. Set the “Integration Step Unit” option to “Length”.
  4. Attach a Contour filter to the Stream Tracer with Custom Source created in Step 3. Change the “Vectors” option to “Velocity” and the “Contour By” option to “IntegrationTime”. Remove the existing value in the table under “Isosurfaces” and click on the insert range icon (below the minus sign). Change the number of “Steps” to somewhere between 50 and 100. Again, some tweaking might be needed to the exact number of steps to achieve the desired glyph density. This step gives you a set of points along the streamlines evenly spaced in integration time, which means points will be closer where the vector field magnitude is lower and less densely packed where the vector field magnitude is greater.
  5. Create another Stream Tracer with Custom Source with the “Input” set to the dataset loaded in Step 1 and the “Seed Source” set to the Contour filter. Change the “Vectors” option to “Velocity”, the “Integration Direction” to “BACKWARD”, and the “Integration Step Unit” to “Length”.
  6. Attach a Tube filter to the Stream Tracer with Custom Source from Step 5.
  7. Attach a Clip filter to the Tube filter in Step 6. In this step, we’ll clip the stream tubes by the “IntegrationTime” variable. Note that because the integration direction was backward, the “IntegrationTime” variable is non-positive. Change the “Clip Type” option to “Scalar”, the “Scalars” array to “IntegrationTime” and the “Value” option to -0.2. If the resulting tube segments overlap and appear as a single tube, adjust the “Value” property to a smaller number. If the resulting tube segments are spaced too far away, increase the “Value” property.
  8. Finally, attach a Glyph filter to the Contour filter created in Step 4. To get a cone at the end of the tube segments, change the “Glyph Type” to “Arrow” and the “Tip Length” to 1. To get the glyphs to match the size of the tube, or to be slightly larger, turn “Scale Mode” to off and adjust the “Scale Factor” to 1. If the cone is too long in comparison to its base, you might need to increase the “Tip Radius” and decrease the “Scale Factor” to squash the cones.

The end result should be an image similar to the top image above.

Note that there are a couple of limitations to this technique. If the tube segments are very short, the cones at the tips may overlap because their lengths are not changed. Variations of this technique could deal with this by changing the Contour filter in Step 4 to an array that gives the length of the streamline generated in Step 3, but then density would no longer correspond to vector magnitude.

The ParaView state file for the example shown here is attached CurvedGlyphs.pvsm. Note that the state file has an extension of “.txt” to work around security restrictions in WordPress. Please remove this extension after download. The state file requires the disk_out_ref.ex2 data file available here.

11 Responses to ParaView technique: Curved and nicely spaced arrow glyphs

  1. Pingback: Will Schroeder

  2. Pingback: Utkarsh Ayachit

  3. Pingback: Someone fromjapan

    • Pingback: Cory Quammen

      • Pingback: Someone fromjapan

        • Pingback: Someone fromjapan

  4. Pingback: Bill

    • Pingback: Cory Quammen

  5. Pingback: Someone fromjapan

  6. Pingback: Someone fromjapan

  7. Pingback: matt

Questions or comments are always welcome!