VisIt-tutorial-Presentation-graphics

Annotations

This part of the tutorial will use data from the VisIt Class. The file system location of the data will hereinafter be refered to as VISITCLASSDATA.


Setting window colors

The Colors tab in the Annotation window allows you to set the background and foreground colors for the active vis window. Color selection is very crucial in the creation of a presentation quality image. The default window colors, while good for everyday use, are not very good for presentations because they are flat and do not help to convey depth. VisIt provides more interesting gradient color backgrounds that instantly improve the quality of an image that will be used in presentations.


  1. Open VISITCLASSDATA/tas_mean_T63.nc
  2. Create a Pseudocolor plot of global/tas and click Draw.
  3. Go to the GUI, click the Controls menu pull-down and select Annotation.
  4. Choose the Colors tab and click the Gradient radio button so you can change the gradient background settings. Click Apply. This should change the background to a radial blue and black gradient.
  5. Change the Foreground color to white and click Apply.
  6. Experiment with different gradient styles by choosing a new gradient style from the Gradient style combo box and clicking Apply. At the same time, experiment with new gradient colors.
  7. Click the Image radio button to select an image background.
  8. Click on the "..." button for the Background image text field to open the file browser, and select VISITCLASSDATA/starfield.jpg.
  9. Turn off Show axes and Show bounding box on the 3D tab.
  10. Zoom in on the plot a little.
  11. Click on the Image Sphere radio button on the Colors tab.
  12. Set the Repetitions in X to 4.
  13. Set the Repetitions in Y to 4.
  14. Rotate the plot around and watch the stars track with the camera.

Annotation Objects

Adding a time slider and text.
  1. Click the Objects tab in the Annotation window.
  2. Click on Time Slider to create a new time slider object. Click Apply, look for the time slider in the lower left corner of viz window.
  3. Increase the height of the time slider to 7% by incrementing the value in the Height spin box a few times. Click Apply.
  4. Select a new start color by clicking the Start color button and choosing a new color from the color palette. Click Apply.
  5. Click the Text button to create a new 2D text annotation object. Note that the window changes so the attributes for the 2D text annotation show instead of the attributes for the time slider.
  6. Type Global Warming into the Text text field.
  7. Click the Bold check box to make the text be bold.
  8. Click the Shadow check box to make the text have a slight shadow under it.
  9. Click Apply.
  10. Type 0.31 0.95 into the Lower left text field and click Apply to move the annotation to the upper middle of the vis window.
  11. Change the width to be 34% using the Width spin button and click Apply.
  12. Use the Animation slider to change the time so you can see the time slider annotation update a few times.
  13. Use the Animation slider to get back to the first time state.


Saving windows

The Set save options window

VisIt offers a variety of ways to save results to files. Here we will talk about VisIt's Save window features.

Its important to understand the difference between a Save window operation in VisIt and, for example, an Export database operation. The main distinction is that the Save window operation is aimed at saving whatever is currently being displayed in VisIt's viewer window(s) while an Export database operation is aimed at saving the (typically 3D) result of some plot pipeline; the mesh together with selected variables on the mesh. However, this distinction is sometimes muddied because VisIt's Save window feature offers options to save either a 2D raster image or (some of) the 3D geometry that is being rendered in the window.

The Set save options window is depicted here (File -> Set Save options).

Filename section

The Filename section contains controls that specify the name and location of where to save the windows.

Filename

This allows you to specify the base filename that VisIt will save an image to. Note that VisIt will automatically add the file format extension.

The default location into which VisIt will save windows depends on how VisIt was started and on what platform you are running.

Starting from an Icon

When you start VisIt by double clicking on an icon, the default directory into which windows are saved is

  • Windows: My Documents
  • OS X: $HOME
  • Linux: $HOME
Starting from a Shell

When you start VisIt from inside of some shell by typing a command at the shell prompt, the default directory into which windows are saved is the current working directory of the shell at the time VisIt was launched.

Family check box

With this check box enabled, VisIt will automatically append a 4 digit (%04d) sequence number to the filename before automatically adding the format extension. So, for example, if you specify foo for the filename, and png is the selected format, VisIt would generate the filename foo0000.png.

With this option enabled, VisIt will never overwrite an existing file. Before generating the sequence number, VisIt examines the destination directory for any pre-existing files with the same base name and 4 digit sequence number as the intended file. From among any matching files, Visit then determines a next sequence number to use to name the current file to avoid overwriting any existing files. If you have files foo0000.png, foo0001.png, foo0004.png (note that 0002 and 0003 are missing) already in the current directory and perform several Save window operations. Visit will generate the names foo0002.png, foo0003.png and foo0005.png. Finally, VisIt will issue a warning message if it winds up skipping sequence numbers to avoid overwrites.

Format options section

The Format options section specifies properties about the format to save the window in.

File type selection

VisIt offers 3 different kinds of file formats; curve, raster image and 3D formats. We only briefly describe these formats below. For more information regarding various file formats mentioned here, see this page.

Curve formats

VisIt offers these curve formats: curve, ultra.

Curve formats are for saving the actual numerical X-Y pair values that define the curve(s) being displayed in a given window. Curve formats can be used to save the contents of windows that are only displaying curves and no other 2D or 3D geometry. If you have a window with a curve overlayed on some 2D geometry, then the window contains a mixture of curves and 2D objects and its contents cannot be saved using a Curve format.

Curve formats are often useful for getting X-Y values out of VisIt and into some 3rd party tools such as Microsoft Excel or PowerPoint.

Raster image formats

VisIt offers these raster image formats: png, jpeg, bmp, ppm, rgb, tiff and ps (postscript).

In our empirical experience in almost all cases, the png format provides the highest (lossless) compression combined with the best quality. If for some reason the png format is not suitable for your workflow, a good second option is the tiff format. In addition, there are a number of 3rd party tools for converting between image formats such as Adobe Photoshop, Gimp and ImageMagick (which is available on Windows, OS X and Linux).

Finally, be aware that although the postscript format is most often used for vector graphics, in VisIt Save window operations, raster images are imbedded in the postscript file.

3D formats

VisIt offers these 3D formats: vtk, stl, obj, ply and pov.

With 3D Save window operations, in most cases, VisIt saves only the geometry of the object being displayed in the window and not any other attributes such as color. However, the vtk format will save these other attributes as additional variables on the 3D mesh object.

Next, often the geometry that is saved is tessellated differently than the original geometry displayed in VisIt's window(s). The vtk and ply formats seem to do the best job at faithfully representing the original geometry.

By default, all of these 3D formats are ascii. So, the file sizes can be a bit on the larger side.

We could include vtk as a curve format here as well. vtk is really best suited as a 3D format. However, in rare cases, vtk can be gainfully employed for curve data in 3rd party tool workflows as well.

Format Specific Options

Some formats offer additional options. These options are either disabled (i.e. grayed out) or enabled depending on the selected format.

Quality slider

Formats that support lossy compression, sometimes also provide a quality control. The higher the quality (e.g. moving the Quality slider control further to the right) the larger the resulting file (less compression).

Compression type menu

Some formats offer multiple ways to compress the files. Be aware that most image compression algorithms are lossy meaning they do not faithfully represent the original data. The tiff format offers both lossy and lossless compression techniques. The png format offers only lossless compression and so does not provide any controls for it.

Binary check box

A majority of the 3D formats offer the option to write binary instead of ascii data. By default, the 3D formats write ascii data. In empirical testing, binary formatted files are 2-2.5x smaller than ascii formatted files. The binary check box, when it is enabled, can be used to turn on binary output.

Stereo check box

The Stereo check box allows you to save stereo pairs. It will save two image files one for the left and right eye. Each image file will be saved according to the aspect ratio and size selections you specify. You may want to turn off the Family check box for stereo pair saves because earlier versions of VisIt neglect to identify the left and right images when the Family check box is enabled.

Force parallel merge check box

Aspect ratio and resolution section

The Aspect ratio and resolution section allows you to specify the aspect ratio and resolution properties of raster images.

Aspect ratio selection

Example of oblong viewer window with GUI widgets highlighted in red

The visualization windows contains two menu bars and visualization results. These menu bars share some of the the same vertical window real estate as the visualization results. However, VisIt's Save window feature only saves the data visualization results portion of the window. This can create some confusion when trying to set a specific size and aspect ratio of saved images.

The Aspect ratio selection has three settings; screen ratio, 1:1 aspect ratio and no constraint. This selection, together with the Width and Height determine the final size of the saved image. Below we describe the various aspect ratio settings.

screen ratio

When screen ratio is selected, only the Width text box value is used. The Height text box is disabled and its value ignored. VisIt saves an image that has the specified width and a height such that it matches the aspect ratio of the image as it is currently displayed in the visualization window. Depending on the value you specify for Width, the resulting saved image may be larger or smaller than the currently displayed image.

1:1 aspect ratio

When 1:1 aspect ratio is selected, only the Width text box value is used. The Height text box is disabled and its value ignored. VisIt saves a square image that has the specified width and equal height.

no constraint

When no constraint is selected, VisIt uses both the Width and Height text box values. VisIt saves an image whose size is the specified width and height.

A Comparison of Different Aspect Ratio Constraints

Only the screen ratio method is assured of producing a faithful representation of what is currently being displayed in the viewer window. Both the 1:1 aspect ratio and no constraint methods can wind up changing the aspect ratio such that the saved image may be dramatically different from that which is currently displayed in the visualization window. A common outcome with these two later approaches is that they can wind up causing annotations and annotation objects relative positions to change dramatically in the saved image.

Here we compare the results of a screen ratio save and a 1:1 aspect ratio save from the original VisIt window configuration shown above. Note that the red line annotation object relative size and position is significantly different between the two saved images.

Screen capture

If you check the Screen capture box, you will save images that are a verbatim representation of what you see on the screen. However, you are also limited in that the resulting image size(s) are only those that can fit into windows displayed on your screen. Often, such images are not high enough resolution for publication or other purposes.

Note that as of this writing, VisIt's Rendering->Anti-aliasing setting works *only* in screen capture saves. If you do non-screen capture saves, antialiasing is ignored. However, with non-screen saves, its possible to achieve anti-aliasing by saving at super-resolution and then using any of a number of common image processing tools (Gimp, Photoshop, ImageMagick) to resize and down-sample to the desired resolution.

Multi-window save section

The Multi-window save section is used to save multiple windows. VisIt provides two convenient ways to save multiple windows. These consist of the basic Tiled method and an Advanced method. To turn on Multi-window save mode, check the box in the section title.

Tiled

A tiled save takes *all* the windows which currently display some plots (e.g. are not blank windows) and orders them in order of increasing window id (the number you can see in the title bar for the windows). For each window, VisIt will do what amounts to 1:1 aspect ratio save. It then takes each of these individual window results and pastes them into a larger tiled image. It uses the Width from the Aspect ratio and resolution section and from that width, decides how to size each image tile.

For between 1 and 3 windows, VisIt will save windows to a single row of tiles. For example, for two windows and a width of 1024, VisIt will save one row of two tiles, each tile is 512x512. For 3 windows and a width of 1024, VisIt would save to a single row of tiles, each tile 341x341 (3x341=1023).

For between 4 and 8 windows, VisIt will save windows to 2 rows of tiles. For more than 8 windows, VisIt will save to 3 rows of tiles. For example, for 5 images, VisIt will save to 2 rows of tiles with the first 3 window's images in the first row, the next two window's images in the second row and the last tile empty (black). Ordering of images in the tiled result is based on window ids and not necessarily on their left-to-right-top-to-bottom appearance on the screen.

A couple of examples of tiled saves are illustrated below.

Here we show a screen shot of the actual VisIt window configuration on the screen and then the resulting tiled saved images.

In the first tiled save, VisIt uses 2 rows of tiles (because there are more than 3 windows with non-blank contents and less than 9). Note the difference in the histogram plot (brown bar chart) position between how the windows appear on the screen and in the resulting tiled saved image. This is due to the fact that image tiles are ordered according to window id and not their relative positions on the screen.

In the second tiled save, note that only 3 tiles are saved. Since the number is 3 or less, VisIt uses only one row of tiles. The reason only 3 tiles are saved is that one of the windows is blank (contains no plots). So, that window is excluded from the save.

In many cases a standard tiled save is sufficient. However, sometimes users require more control over size and position of windows in the resulting combined output. That is what the Advanced mode is for.

Advanced

Advanced Multi-Window Save Controls

In Advanced mode, you must specify everything manually. You will need to specify the following information for each window, whether or not the window is currently blank.

  • Whether to include or omit the window.
  • The Width and Height the window will occupy in the combined result.
  • The X and Y offsets of the lower-left corner of the window relative to a 0,0 origin in the lower-left corner of the combined result.
  • Which layer the window should be put into and the transparency of the window in that layer. Layers are stacked up away from the eye with layer 1 closest to the eye.
Advanced Multi-Window Save Example

In the example at the right, 4 windows are saved to a 1024x1024 image. 3 Windows are saved in layer 1 and a second window is saved in layer 2. The following paramters were used

  • Window 1: Omit=Unchecked, Width=1024, Height=512, X Position = 0, Y Position=0, Transparency=50%, Layer=1
  • Window 2: Omit=Unchecked, Width=512, Height=512, X Position=0, Y Position=512, Transparency=0%, Layer=1
  • Window 3: Omit=Unchecked, Width=512, Height=512, X Position=512, Y Position=512, Transparency=0%, Layer=1
  • Window 4: Omit=Unchecked, Width=512, Height=512, X Position=256, Y Position=256, Transparency=0%, Layer=2