visualization with paraview

75
Visualization with ParaView

Upload: others

Post on 23-Oct-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Visualization with ParaView

Visualization with ParaView

Page 2: Visualization with ParaView

Before we begin…

• Make sure you have ParaView 4.1.0 installed so you

can follow along in the lab section

– http://paraview.org/paraview/resources/software.php

Page 3: Visualization with ParaView

Background

• http://www.paraview.org/

• Open-source, multi-platform parallel data analysis and visualization application

• Mature, feature-rich interface

• Good for general-purpose, rapid visualization

• Built upon the Visualization ToolKit (VTK) library

• Primary contributors: – Kitware, Inc.

– Sandia National Laboratory

– Los Alamos National Laboratory

– Army Research Laboratory

Page 4: Visualization with ParaView

Data Types

• Supports a wide variety of data types– Structured grids

• uniform rectilinear, non-uniform rectilinear, and curvilinear

– Unstructured grids

– Polygonal data

– Images

– Multi-block

– AMR

• Time series support1.3. MORE INFORMATION 7

U nst ruct ured Gr id

Unstructured data sets are composed of

points, lines, 2D polygons, 3D tetrahedra,

and nonlinear cells. They are similar to

polygonal data except that they can also

represent 3D tetrahedra and nonlinear cells,

which cannot be direct ly rendered.

In addit ion to these basic data types, ParaView also supports mult i -

block data. A basic mult i-block data set is created whenever data sets

are grouped together or whenever a file containing mult iple blocks is read.

ParaView also has some special data types for represent ing H ierarchical

A dapt ive M esh Refinement (A M R), H ierarchical U niform A M R,

Oct ree, Tablular , and Graph type data sets.

1.3 M ore I nformat ion

There are many places to find more informat ion about ParaView. The Para-

View Users Manual is online and is located at The ParaView User’s Guide.

ParaView also has an online help that can be accessed by simply clicking the

button in the applicat ion.

The ParaView web page, www.paraview.org, is also an excellent place

to find more informat ion about ParaView. From there you can find helpful

links to mailing lists, Wiki pages, and frequent ly asked quest ions as well as

information about professional support services.

*http://www.paraview.org/Wiki/images/c/c6/ParaViewTutorial312.pdf

*

Page 5: Visualization with ParaView

Visualization Algorithms

• Supports a wide variety of visualization algorithms -> Filters– Isosurfaces

– Cutting planes

– Streamlines

– Glyphs

– Volume rendering

– Clipping

– Height maps

– …

Page 6: Visualization with ParaView

Special Features

• Supports derived variables

– New scalar / vector variables that are

functions of existing variables in your data set

• Scriptable via Python

• Saves animations

• Can run in parallel / distributed mode for

large data visualization

Page 7: Visualization with ParaView

Data Formats

• Supports a wide variety of data formats

– VTK (http://www.vtk.org/VTK/img/file-formats.pdf)

– EnSight

– Plot3D

– Various polygonal formats

• Users can write data readers to extend support to other formats

• Conversion to the VTK format is straightforward

Page 8: Visualization with ParaView

Data Formats

• VTK Simple Legacy Format

• ASCII or binary

• Supports all VTK grid types

• Easiest for data conversion

• Note: use VTK XML format for parallel I/O

VTK simple legacy format (http://www.vtk.org/VTK/img/file-formats.pdf)

Page 9: Visualization with ParaView

Data Formatting Example• Data set: 4x4x4 rectilinear grid

with one scalar variable

Page 10: Visualization with ParaView

ParaView Visualization Pipeline

• All processing operations (filters) produce

data sets

• Can further process the result of every

operation to build complex visualizations

– e.g. can extract a cutting plane, and apply

glyphs (i.e. vector arrows) to the result

• Gives a plane of glyphs through your 3D volume

Page 11: Visualization with ParaView

Demonstration

• WRF weather forecast data set– Rectilinear grid

– Multiple scalar and vector variables

– Time series

• Can show:– Clouds

– Wind

– Temperature

– …

Page 12: Visualization with ParaView
Page 13: Visualization with ParaView

ParaView Test-Drive

Page 14: Visualization with ParaView

Getting Started

• Download example data file

• ‘disk_out_ref.ex2’

– http://portal.longhorn.tacc.utexas.edu/training/

– Right-click, Save link as…

• Open ParaView

Page 15: Visualization with ParaView

ParaViewMenu Bar

Toolbars

Pipeline Browser

Object Inspector

3D View

(well, this is a Mac)

Page 16: Visualization with ParaView

ParaViewUndo/Redo

Camera Controls

View Controls (undo/redo)

VCR Controls

Common

Controls

Active Variable

Controls

Page 17: Visualization with ParaView

ParaViewToday we will:

• Create isosurfaces for a scalar

variable

• Clip and slice the surfaces

• Use glyphs to display a vector

field

• Use streamlines to show flow

through a vector field

• Edit color maps

• Add slices to show variable

values over a plane

• Add color legends

• Create volume rendering

• Create a plot over a line

Page 18: Visualization with ParaView

ParaView

Open the file

disk_out_ref.ex2

• Click File -> Open

• Select disk_out_ref.ex2

• Click OK

• Select ALL variables

• Click blue Apply

• Cylinder outline of

dataset extent displayed

Page 19: Visualization with ParaView

ParaView

Open the file

disk_out_ref.ex2

• Click File -> Open

• Select disk_out_ref.ex2

and click OK

Page 20: Visualization with ParaView

ParaView

Open the file

disk_out_ref.ex2

• Click File -> Open

• Select disk_out_ref.ex2

and click OK

• Select ALL variables

Page 21: Visualization with ParaView

ParaView

Open the file

disk_out_ref.ex2

• Click File -> Open

• Select disk_out_ref.ex2

• Click OK

• Select ALL variables

• Click blue Apply

Page 22: Visualization with ParaView

ParaView

Open the file

disk_out_ref.ex2

• Click File -> Open

• Select disk_out_ref.ex2

• Click OK

• Select ALL variables

• Click blue Apply

Cylinder outline of

dataset extent displayed

Page 23: Visualization with ParaView

ParaView

Manipulate Representation and color

• Use the Active Variable

Controls to change color

Solid Color -> Pres

Page 24: Visualization with ParaView

ParaView

Manipulate Representation and color

• Use the Active Variable

Controls to change color

Solid Color -> Pres

Page 25: Visualization with ParaView

ParaView

Manipulate Representation and color

• Use the Active Variable

Controls to change color

Solid Color -> Pres

• Use Representation

toolbar to change

representation

Surface -> Surface With Edges

Page 26: Visualization with ParaView

ParaView

Manipulate Representation and color

• Use the Active Variable

Controls to change color

Solid Color -> Pres

• Use Representation

toolbar to change

representation

Surface -> Surface With Edges

Page 27: Visualization with ParaView

ParaView

Manipulate Representation and color

• Use the Active Variable

Controls to change color

Solid Color -> Pres

• Use Representation

toolbar to change

representation

Surface -> Surface With Edges

• Show Colorbar

annotation

Page 28: Visualization with ParaView

ParaView

Manipulate Representation and color

• Use the Active Variable

Controls to change color

Solid Color -> Pres

• Use Representation

toolbar to change

representation

Surface -> Surface With Edges

• Show Colorbar

annotation

Page 29: Visualization with ParaView

• Explore dataset with mouse

ParaView

• Click +Z view button

Page 30: Visualization with ParaView

• Explore dataset with mouse

ParaView

• Click +Z view button

• Huh?

Page 31: Visualization with ParaView

• Explore dataset with mouse

ParaView

• Click +Z view button

• Huh?

• Move it around

Page 32: Visualization with ParaView

• Explore dataset with mouse

ParaView

• Click +Z view button

• Huh?

• Move it around

• Change Representation

Page 33: Visualization with ParaView

ParaView

Filters

• Click Filters on

menu bar and find Contour

– Alphabetical

– Common

(Or on toolbar)

Page 34: Visualization with ParaView

ParaView

Filters

• Click Filters on

menu bar and find Contour

– Alphabetical

– Common

(Or on toolbar)

• Contour by AsH3

Page 35: Visualization with ParaView

ParaView

Filters

• Click Filters on

menu bar and find Contour

– Alphabetical

– Common

(Or on toolbar)

Filters

• Click Filters on

menu bar and find Contour

– Alphabetical

– Common

(Or on toolbar)

• Contour by AsH3

• Hit Apply

Page 36: Visualization with ParaView

ParaView

Filters

• With Contour1

selected, use Active

Variable Control to color by CH4

• And drag one of the

colorbars elsewhere

Page 37: Visualization with ParaView

ParaView

Filters

• With Contour1

selected, use Active

Variable Control to color by CH4

• And drag one of the

colorbars elsewhere

Page 38: Visualization with ParaView

ParaView

Filters (2)

• Click Filters on

menu bar and find Clip

– Alphabetical

– Common

(Or on toolbar)

Page 39: Visualization with ParaView

ParaView

Filters (2)

• Choose orientation

axes

Page 40: Visualization with ParaView

ParaView

Filters (2)

• Hit Apply

• Note: all three

objects are visible

– Wireframe of

dataset

– Contour surface

– Surface of clipped

dataset

Page 41: Visualization with ParaView

ParaView

Color Mapping

• Select Clip1

Page 42: Visualization with ParaView

ParaView

Color Mapping

• Select

Edit Color Map

Page 43: Visualization with ParaView

ParaView

Color Mapping

• Select

Edit Color Map

Page 44: Visualization with ParaView

ParaView

Color Mapping

• Select

Choose Preset

Page 45: Visualization with ParaView

ParaView

Color Mapping

• Select

Choose Preset

Page 46: Visualization with ParaView

ParaView

Color Mapping

• Select

Black-Body R…

and Update

Page 47: Visualization with ParaView

ParaView

Color Mapping

• Select

Black-Body R…

and Close

Page 48: Visualization with ParaView

ParaView

Color Mapping

• Close Colormapwindow

Page 49: Visualization with ParaView

ParaView

Filters (3)

• Select original

dataset

• Click Filters on

menu bar and find Stream Tracer

– Alphabetical

– Common

(Or on toolbar)

Page 50: Visualization with ParaView

ParaView

Filters (3)

• Scroll down on Properties pane

until you see seeds

sub-pane

Page 51: Visualization with ParaView

ParaView

Filters (3)

• Change

Point Source

to

High Resolution

Line Source

• Update

Page 52: Visualization with ParaView

ParaView

Filters (3)

• You can manipulate

the ‘rake’

interactively

• You can change the

number of seed

points

• You can change the

interpolation method yadda yadda

Page 53: Visualization with ParaView

ParaView

Filters (3)

• With StreamTracer1

selected,

• Click Filters on

menu bar and find Tube

– Alphabetical

– ?

• Update

Page 54: Visualization with ParaView

ParaView

Filters (3)

Page 55: Visualization with ParaView

ParaView

Filters (3)

• Turn on Wire Frame

of original dataset

• Hide Tube’d

Stream lines

Page 56: Visualization with ParaView

ParaView

Glyphs

• With original dataset

selected…

• Click Filters on

menu bar and find Glyph

– Alphabetical

– Common

(Or on toolbar)

• Apply

Page 57: Visualization with ParaView

ParaView

Glyphs

• A bunch of points

are selected,

sampled from the

dataset and an

Arrow glyph is

applied

• Note V vectors and

Arrow glyph type;

Scalars option is

not enabled

Page 58: Visualization with ParaView

ParaView

Glyphs

• Scroll down in

properties window

and change Scale Mode to scalar

• Scroll back …

• Set Glyph Type to

sphere

• Choose any variable and Apply

Page 59: Visualization with ParaView

ParaView

Glyphs

Spheres radii are

proportional to

value or magnitude

Page 60: Visualization with ParaView

ParaView

Glyphs

• With the Glyphs

selected…

• Edit->Change

Input…

Page 61: Visualization with ParaView

ParaView

Glyphs

• Select the Stream

Trace, Apply

Page 62: Visualization with ParaView

ParaView

Glyphs

Note dependency

tree

• With the Glyph

selected, change Scale Mode to

Vector, Glyph

Type to Arrow, and

choose variable v

• Apply

Page 63: Visualization with ParaView

ParaView

Glyphs

Glyphs are now

tangential arrows

Page 64: Visualization with ParaView

ParaView

Volume Rendering

• Delete everything

except original

dataset

• Set Representation

to Volume

Page 65: Visualization with ParaView

ParaView

Volume Rendering

• Open Colormap

Editor

• Fiddle Opacity

Transfer Function

Page 66: Visualization with ParaView

ParaView

Volume Rendering

• … to look like this

• Close Colormap

Editor

Page 67: Visualization with ParaView

ParaView

Volume Rendering

• And we can then

add a new contour,

streamlines, yadda

yadda

Page 68: Visualization with ParaView

ParaView

Volume Rendering

• Notice smallwrf

directory

• Enter it

Page 69: Visualization with ParaView

ParaView

Animation

• Notice

wrf_small-….vtr

• Expand it and see

that it consists of a

number of

sequentially ordered

files

• Select it and Apply

Page 70: Visualization with ParaView

ParaView

Animation

• Notice

wrf_small-….vtr

• Expand it and see

that it consists of a

number of

sequentially ordered

files

• Select it and Apply

Page 71: Visualization with ParaView

ParaView

Animation

• Select Contour

• Contour By: QRAIN

• Set Value Range

0.0001

• Apply

• Hit Play

Page 72: Visualization with ParaView

ParaView

Saving Animation

• File->Save Animation…

• Set output resolution

• Hit Save Animation

Page 73: Visualization with ParaView

ParaView

Saving Animation

• Create Directory

• e.g. movie1

• Enter that directory

Page 74: Visualization with ParaView

ParaView

Saving Animation

• Set File Name

• e.g. ‘frame’

• Set Files to Type

• I use ‘avi’

• OK

Page 75: Visualization with ParaView

Questions?

• More tutorials available:– http://www.paraview.org/Wiki/The_ParaView_Tutorial