This page imported from: /afs/bu.edu/cwis/webuser/web/s/c/scv/documentation/tutorials/SciVis/dv.html
Introduction to Scientific Visualization Tools
Data Visualizer Tutorial
This is a quickie tutorial of Wavefront’s Data Visualizer. It is not meant to
be a full, comprehensive tutorial, but merely an aid to getting your feet wet.
You may still still want to try the lessons in the Data Visualizer Lessons manual.
Stay tuned to this homepage for additional tutorials on DataVisualizer.
First, make sure you have the environment variable WF_DV_DIR set to
/usr/local/wave/TDV3.1 by typing printenv WF_DV_DIR.
To make sure, edit your .cshrc file and add the following lines:
if ( -d /usr/local/wave/TDV3.1/bin ) then set path = ( $path /usr/local/wave/TDV3.1/bin ) setenv WF_DV_DIR /usr/local/wave/TDV3.1 endif
If there are other lines referring to an older version of DataVisualizer,
remove them. Save your .cshrc file and source it:
source ~/.cshrc
Now you are ready to start.
- Type dv on the command line.
- Get familiar with the DataVisualizer terminology and window setup
Here’s some terminology that doesn’t really adhere to commonly used definitions:
- control panel:
- The control panel is that horizontal area loaded with buttons like Session, Data,
Tools, etc. One might expect that popup menus exist underneath these, but one would
be wrong. The control panel is more like a toolbar that manages what “mode” you are
in, and thus what menus are available.Some control panel modes and what they do (see the reference for a complete list):
- data: Loads data into DV
- tools: Data exploration and visualization tools (like cut-plane, or isosurface)
- views: Manipulate the camera in the viewport
- motion: Animation
- images: Saving animation and stills.
- menus:
- These are the areas left of the main viewing area (often called the viewport. It’s
the area that is currently totally black, since you haven’t done anything, yet). When
you select any of the “mode” (DV calls them utilities) buttons from the control panel,
the menus for that mode with appear in the empty area. - submenus:
- modify menu:
- These are located at the bottom of the main window, under the viewport. Depending
on what you select from the menus, interface elements appear that allow you to modify
the current item you have selected from the menu (in general)
- Select the Data button from the control panel to get into “data” mode
A “data menu” containing the names of available datasets will popup in the upper left
corner of the menu area. Select “storm.bwave” from the list and hit the Open button
to start loading. The “center cameras” menu will appear below the data menu. - Center the camera on some data.
This function calculates the approximate center of the distribution of data and uses
this as the origin for the camera to pivot around. Select the “rain water” entry and
hit “Center”. You’ll get a bounding box. You won’t see anything in it, yet, since all
you’ve done so far is define your point of view. - Select “Tools” from the control panel
The “tools menu” will appear in the menu area. All the visualization tools available in
Data Visualizer have entries here. Each tool has three buttons arranged horizontally
in the menu. Selecting the leftmost, which has the name of the tool on it, brings up
the “tool creation menu”. Selecting the middle button (nothing on it), makes that
tool the current tool (you’ll see why this is useful later, when we get to the
modify menu) or if there is no tool of that type, brings up the “tool creation”
menu. The rightmost button with the green rectangle is referred to as the “LED”.
It toggles this tool on and off.The Tool creation menu can also be used to select one out of several named tools
or to delete a tool. - Create a tool
In order to use a tool, you need to create an “instance” of it.
Select the cut-plane tool (either leftmost button that says “cut-plane” or middle
button right next to it in the tools menu). The tool creation menu pops up with the
name in the text field automatically generated. You can change the name to something
more memorable if you like. Hit the “create” button. You have created an instance
of a cut-plane tool. - Select the data to be viewed
A data selection menu will pop up below the tools creation menu. There are
two scalar fields defined on our sample volume. Choose rain water (remember the
data we centered the camera on?). The display will automatically reorganize
itself by replacing all the tool creation related menus with tool manipulation
menus, ie. the positioning, miscellaneous, data selection and subtools menus. - Display the tool’s representation of the data
You’ve noticed that you don’t see anything, yet, even though you’ve created this
tool. Go to the subtools menu. Select the “scalar mapping” labelled button and see
the changeable parameters in the modify menu. Select the “shade” button to
set the rendering mode. Select the “scalar mapping” LED, and now you will see the
cut-plane. - Modify how the tool displays data
You should see a color bar with two black arrow sliders in the modify menu.
Moving these arrows will define the range of data values that are visible in the
viewport. Move the leftmost one until it is just touching the light blue area of the
colorbar, and wait for the rendering to be done. You will see that most of the
original cut-plane is gone…the area whose values were represented by all the colors
in the colorbar from grey up to light blue.Go back to the data selection menu and select the vector button.
Select wind_vel from the list. You can now make elevated surfaces
by deforming the cut-plane by the vector value of the wind velocity at each
point. Select the “” button, To the right hand side of the modify menu, you should
should now see the “elevated surf” button. Underneath it are two text fields.
Input the value .5 in the “elev scale” text field. Now set the elevated surf
LED. You now have a surface plot whose elevation is difficult to see at
the current camera angle. - Move the camera around
Go to the positioning menu. With the first mouse button held down, drag
the mouse down the move menu, and select rotate. Turn the Z axis LED off.
Input -45 into the X axis and 45 into the Y axis text fields. You should now be
able to see the shape of the surface more easily. Remember that you are moving
the CAMERA not the object.
We’ve now gone over all the basic steps for any tool-> Create the tool, choose data
for the tool to operate on, modify its subtools, and render the image, possibly
repeating steps 2 through 4 several times before getting the right thing.
A Note about Colormaps:
Colors are often used to represent certain values to help find hotspots
or ranges of data. Colormaps are lists of colors that map to values in your
data set. The default colormap in DataVisualizer is an even distribution of
colors over which the data values are spread linearly. Colormaps do not have
to conform to this type of mapping however, and mappings can be changed for
a data set in order to highlight certain features.
Perhaps you are interested in a more detailed mapping of values in the
cut-plane. Go to the miscellaneous menu and pick “colormap”. Ignore the colormap menu
list…that is for choosing a predefined colormap and you don’t want to do that
for this example. Go to the modify menu and select the “graph” button. Look at
the colorbar. You will see a histogram representation of the distribution of data
values and what colors they are currently represented by in the cut-plane. The
height of the bars in the histogram represent the number of datum with that value.
Clearly, in this example, most values are clustered around the grey area.
First, turn the cut-plane LED off in the tools menu, so that the image won’t be redrawn
every time you make a modification to the colormap. Then start moving the little arrow
markers to the left, and see how the colors are redistributed. After you have moved
a number of the markers into the high density area, turn the cut-plane LED back on
and see how the new mapping looks.
Now, go back to the colormap list and select “default”. This will return your
colormap to its original default values. Go to the modify menu and select “labels”.
This will tell you precisely what values are represented by the colors at the
marker points. Selecting a marker turns it light blue and makes it the current
marker. Selecting “New” makes a new marker after the current one. “Delete” removes
the current one. And “Next” just repositions at the next value.
Turn the cut-plane LED off.
Select the marker whose value is 9.0085. Go to the color editing area just to
the left. This allows you to modify the individual color selected with the
marker. Move the arrow underneath the Value bar (“V”) all the way over to the left
and see the square area to the left display in all black. The color on the color
bar at 9.005 is now black also. Turn the cut-plane LED back on. It is now
much easier to see where on the cut-plane the value 9.0085 exists. (It is helpful
to use highly contrasting colors when your intent is to make certain features
stand out)
Saving Still Images:
Animation:
You can only animate tools moving in space, you cannot animate changing features like
the colormap. There are two ways to do animation in DataVisualizer:
- pocket menus – shortcut – You can use the “pocket menus” to do simple animation without
saving the images or switching from the current menu to the motion menu. - motion menu – You can use the motion menu to set up more complex animations.
A simple example using the pocket menu:
First, get rid of the elevated surface, and return the x,y,z rotational values in the position
menu to 0,0,0. You should see this:
Now, with the position menu in “move” mode, set the z value to -2, hit “enter”. When the
rendering is done, select the leftmost button from the pocket menu to set that as the
first frame. Now set the z value of the cut-plane to -2, hit “enter” and wait for the render
to complete. Select the middle pocket menu button. Then hit the button to replay
your animation. DataVisualizer will do the interpolation of 30 frames for you.
Saving Animations:
You need to use the motion menu to create animations that can be saved. First, set
the z value of our cut-plane back to -2. Select “motion” from the control panel. Make sure the
“setup motion” button is selected in the motion menu. Select “save start”, and then go back
to the tools menu (I know, this is cumbersome, but unfortunately, that’s the way you have to
do it). Set the cut-plane’s z value to 2, and go back to the motion menu. Select the “save end”
button. Replay the animation with the “animate” button.
Select the “save images” button. Select the “name button”. Enter the base name for the
animation in the text field below the empty list. This be used to generate the names of each
frame, which is created as a separate image file. Hit OK. The new name should show up next
to a pop-down list of filetypes. You may select any filetype you like from this list. Now
hit the “animate/save” button and you’re done.
Data Format:
This diagram shows the hierarchy of components in a data volume in DataVisualizer.