Remote Visualization Tool PBVR (v1.17)
User Guide

Jan. 2022
Japan Atomic Energy Agency
Center for Computational Science & e-Systems

Version

Date

Revisednumberrevisedchapter

1.04

2015.3.31-

Release1.05

2015.5.18

5.2

Parameter file function was added on Server

5.4.2

File button was added on MainPanel

5.4.6

Particle data output function was added

5.4.2

CROP panel was enabled for Mac

5.4.3

Histogram function was added on Transfer

1.06a

2015.10.30

Revised content

Function Editor
5.4.5

Image file production function was updated(file output directory, key frame animation)

1.07

2016.2.1

1.2

ICEX and VTK library were added to theplatform list

2

The package was updated including serial
versions and PBVR Filter for VTK was added

3.4

Data

formats

andparameter

files

were

extended including STL, PLOT3D, and VTK
4.2

A new command line option “-pd” was added,“-plimit” was modified, and “-sl” was removed

5.2

A new command line option “-pd” was added,“-plimit” was modified, “-sl” was removed, and“-pin” was extended up to “-pin10”

1.071

2016.2.24

5.4.5

Particle panel was added

6.4

An example of particle integration was added2

The package was updated. Compilation andinstallation were changed.

5.4.2

Transfer Function Editor, Particle Panel andAnimation Control Panel buttons were added
to Main Panel.

1.09

2017.3.2

4.2

New command line options “-Bs”, “-Be” and “Bd” were added.

4.2.1

A usage of command line option “-vin” wasextended for multiple pfi files.

4.2.2

Added about processing of distributed files.

5.2-

Number of panels that opened when client
started was changed.

-

Command line option “-vin” was extended
for multiple pfi files.

i5.4.2-

The following three buttons were added on
MainPanel. “Transfer Function Editor” ，“Particle Panel” ， and “Animation Control
Panel”.

-

A

checkbox“no-repeat

sampling

untilTransfer Functions be edited” was added on
MainPanel, and following three buttons were
added

on

MainPanel.

“LegendPanel”,“Coordinate Panel”, and “Viewer Control
Panel”.
-

5.4.3

Display Particle Number was added.

“Transfer Function Editor” was activated from
MainPanel, and close button was added.

5.4.3.3

An action when NaN appears by the arithmetic
processing of function editor was added.

5.4.5“Particle

panel”

wasactivatedfrom

MainPanel, and close button was added.
5.4.6“Animation Control Panel” was activated from
MainPanel, and close button was added.

1.10

2017.3.15

5.4.7“Legend panel” was added.

5.4.8“Coordinate panel” was added.

5.4.9“Viewer Control panel” was added.

3“filter” was deleted. by Integration of “Filter
program” and “Server program”

3“IN/OUT files” were added.

5.4.2“Main Panel” was changed.

5.4.3

Editor of “Transfer function” was changed.
“Function changes” and “GUI changes” by
TFS function expansion works

4.2

Launching Method: Program Arguments:“pin deletion”, “fin addition”
Changes by Integration of Filter program andserver program

5.2

Launching Method: Program Arguments:“pin deletion”, “fin addition”
Changes by Integration of filter program andserver program

ii

6.1

Launching Program: Program arguments: “pindeletion”, “fin addition”
Changes by Integration of filter program andserver program

6.5

Batch mode processing: Program arguments:“pin deletion”, “fin addition”
Changes by Integration of filter program andserver program

1.11

3

Added description about Filtered version
program.

1.12

2020.6.01-

GUI of Client program was changed. Related
images and descriptions are updated.

1.13

2020.9.17

2.3

Instead of built-in KVS, new Client program
uses user installed KVS.

1.13.12020.10.16

5.3.1.1

Min/Max range in transfer function editor ismodified.

1.14

2020.11.05

1.3

Windows build procedure is updated using

2.1.3

2017 auxiliary environment on MSVC2019.

2.3
1.15

2021.5.1

1.16

2021.7.22-

Added tool bar on rendering screen
Manual for server program with built in filter
released

1.17

2022.1.30

Added polygon composition functioniii

Table of Contents
1

Introduction ..................................................................................................................... 6
1.1 Overview ......................................................................................................................... 6
1.2 System Requirements .................................................................................................... 8
1.3 Environment Setting ....................................................................................................... 8
1.3.1 Usage for Qt ............................................................................................................. 8
1.3.2 Usage of MicrosoftVisualStudio ............................................................................... 9
1.3.3 Qt Setting ............................................................................................................... 10

2

Installation ..................................................................................................................... 13
2.1 Installation of Prebuilt Binaries ..................................................................................... 13
2.1.1 PBVR Server .......................................................................................................... 13
2.1.2 PBVR Client ........................................................................................................... 13
2.2 Build and Installation of Filter and Server Program ...................................................... 14
2.2.1 Linux and Mac ........................................................................................................ 17
2.2.2 Windows ................................................................................................................. 17
2.3 Build of Client Program ................................................................................................. 20
2.3.1 Installation of KVS library ....................................................................................... 20
2.3.2 Setting and build for Client Program ...................................................................... 22
2.3.3 Build of Client Program .......................................................................................... 24
2.3.4 Deployment of Client Program on Windows........................................................... 24
2.3.5 CPU or GPU Renderer ........................................................................................... 25

3

Input Files ...................................................................................................................... 29
3.1 Parameter File .............................................................................................................. 29
3.1.1 PLOT3D configuration file ...................................................................................... 31
3.1.2 Processing of Distributed Files ............................................................................... 32
3.2 Visualization Parameter ................................................................................................ 32
3.3 Volume Data Files ........................................................................................................ 36
3.3.1 Input Data Format .................................................................................................. 36
3.3.2 Endian .................................................................................................................... 37
3.4 Unstructured Grid Data with Mixed Elements ............................................................... 37

4

PBVR Server .................................................................................................................. 39
4.1 Launching PBVR Server ............................................................................................... 39
4.1.1 Launching PBVR Server in Batch Mode ................................................................ 41
4.1.2 Launching PBVR Server in Client-Server Mode..................................................... 41
4.2 Connecting Client and Server via Socket Communication ........................................... 42iv

4.2.1 Local Connection.................................................................................................... 42
4.2.2 Remote Connection................................................................................................ 42
4.2.3 Testing SSH Port Forwarding Connection .............................................................. 44
4.2.4 Remote Connection from SSH Client ..................................................................... 44
5

PBVR Client ................................................................................................................... 47
5.1 Launching PBVR Client ................................................................................................ 47
5.2 Terminating PBVR ........................................................................................................ 50
5.2.1 Standard Termination ............................................................................................. 50
5.2.2 Forced Termination ................................................................................................. 50
5.3 Using the PBVR Client GUI .......................................................................................... 51
5.3.1 Viewer .................................................................................................................... 51
5.3.2 Tool Bar .................................................................................................................. 53
5.3.3 Transfer Function Editor ......................................................................................... 59
5.3.4 Time panel .............................................................................................................. 76
5.3.5 Particle panel.......................................................................................................... 77
5.3.6 Image file production .............................................................................................. 81
5.3.7 Legend panel.......................................................................................................... 86
5.3.8 Coordinate Panel.................................................................................................... 88
5.3.9 Viewer Control Panel .............................................................................................. 89

6

An Example with the Sample Dataset ......................................................................... 90
6.1 Filtering Process ........................................................................................................... 90
6.2 Starting PBVR .............................................................................................................. 91
6.3 Designing Transfer Functions ....................................................................................... 92
6.3.1 Volume Rendering for a Single Variable ................................................................. 92
6.3.2 Multivariate Volume Rendering .............................................................................. 93
6.3.3 Slicing Volumes ...................................................................................................... 94
6.3.4 Synthesis of Transfer Functions ............................................................................. 95
6.4 Integration of Particle Dataset ...................................................................................... 96
6.4.1 Saving Particle Datasets ........................................................................................ 96
6.4.2 Loading Particle Dataset ........................................................................................ 98
6.5 Saving Results ............................................................................................................ 100
6.6 Batch Mode Example ................................................................................................. 100v

1 Introduction
1.1 Overview
This document is a manual for a remote visualization system, PBVR, with a built-in filter
function, developed at the Center for Computational Science & e-Systems, Japan Atomic
Energy Agency. This system has been developed based on the PBVR (Particle Based Volume
Rnderring) method developed by Koyamada Laboratory, Kyoto University, and thevisualization library KVS (https://github.com/naohisas/KVS). And this system realizes highspeed remote visualization of large-scale volume data on remotely located servers. The
system consists of the following two components.
Translated with www.DeepL.com/Translator (free version)
1)

PBVR Sampler
PBVR Server works on the remotely located sever. It converts volume data on thestorage into the particle data for the visualization, and transfer the particle data to theuser PC.

2)PBVR Viewer
PBVR Client works on the user PC, and renders the particle data using GPU.
Storage

ServerInternet

User
PC

Sampler

ViewerParticlerenderer

粒子データ
Volume data

Particle data

Vis. Param.

Figure 1-1 The system configuration of PBVR
PBVR Viewer implements a multivariate visualization function that can be used for various
simulations. In 3D data visualization, color and opacity are assigned to volume data, and these
are called the transfer function. In conventional visualization, a one-dimensional transfer
function that assigns color and opacity to a single physical value is used. PBVR Viewer
provides a transfer function editor that allows users to design multivariate transfer functions
6

using algebraic expressions. The transfer function editor allows users to edit 1D transfer
functions for each variable and to write multidimensional transfer functions using arbitrary
algebraic expressions with these variables. In this algebraic expression, basic operators,
elementary functions, and differential operators can be used.
In the visualization of 3D simulations, displaying polygon data of boundary conditions andcompositing it with calculation results is useful for understanding complex shapes. PBVR
Viewer can composit the particle-based volume rendering and the polygon data. In
conventional rendering methods, the visibility ordering based on alpha blending is thebottleneck, making composite polygons and volumes difficult. In this application, however, theStochastic Rendering Compositor, which processes polygon rendering in the same framework
as particle-based rendering, enables efficient composite rendering of polygons and volumes.

71.2 System Requirements
The remote visualization system PBVR is cross-platform program, and it works on Linux, Mac,and Windows. And the server program works on various supercomputer such as FUGAKU and
SGI8600. The system is verified for the following platforms and compilers.
●Supercomputer
Platform

CPU(architecture)

CompilerOakforestPACS

Inetel Xeon Phi（KNL）

Intel

SGI8600

Intel Xeon GoldIntelFUGAKUA64FX（ARM）

Fujitsu●PBVR Server/Client
PlatformOS

Compiler

LibraryLinux 64bit

Kubuntu18.04

g++ 5.3.1

OpenGL, Qt5.12

Mac 64bit *2

OSX10.14

clang 10.0.0

OpenGL, Qt5.12

MSVC2017 *2

OpenGL, Qt5.12 Visual C++

Windows 64bit*3 Windows10

runtime component*1. KMATH is a high-performance pseudorandom number generator library, which wasdeveloped at RIKEN Advanced Institute for Computational Science. Installing
KMATH_RANDOM further requires the NTL library.
*2. It means Microsoft Visual Studio C++ included in Microsoft Visual Studio 2017.

1.3 Environment Setting
Under the Windows environment, Qt and Microsoft Visual Studio (MSVC), which areintegrated development environments (IDEs), are used to build this program. The version
information required for that purpose is described below.

1.3.1 Usage for Qt
The Qt Creator IDE is provided by the installer which can be downloaded from the official Qt
page (https://www.qt.io/download-qt-installer). It automatically installs the Qt package for eachplatform. There are online installer and offline installer in Qt installer, and Qt5.12 provided byoffline installer to build this program.

8

Figure 1-2Offline installer for Qt
It is necessary to select the following items used to build the client program from the installer
setting dialog.
・Tools/QtCreator・Qt *.*.*/Sources
・Qt *.*.*/msvc*** 64bit（Required only Windows）*.*.* means version in the above list.

1.3.2 Usage of MicrosoftVisualStudio
Qt uses MSVC 2017 to build the program, but this version is not available from the official
Microsoft web page. However, the MSVC installer includes an option to install auxiliary tools
for building with MSVC 2017.

9

Figure 1-3 Tools for MSVC2017

1.3.3 Qt Setting
In order to use MSVC2017 with Qt Creator, copy (clone) the compiler settings of MSVC2019
to MSVC2017 of ABI parameters.

10

Figure 1-4 Clone of compilation settings to ABI parameters
Above cloning is repeated to C/C++ compilers. Next, Kits setting is cloned to Compiler terms.

11Figure 1-5 Copy of Kits setting

122 Installation
PBVR consists of a load module package and a source code package. The following sections
show how to install each package.

2.1 Installation of Prebuilt Binaries
The server program are implemented in C ++, and are available for serial processing, OpenMPfor thread parallel processing, and MPI + OpenMP for massively parallel processing. The client
program is implemented by C ++, Qt5 and OpenGL.

2.1.1 PBVR Server
PBVR Server is implemented in C++ and is shipped in three versions: (1) a serial processing
version, (2) an OpenMP version for thread parallel computing, and (3) an MPI+OpenMP
version for massively parallel computing such as SGI8600 and FUGAKU (clang-mode). The
following table lists the load module packages. Choose the suitable load modules, and copy
them to a directory that is specified in the PATH environment parameter. When the copying
finishes, the installation is complete.
Table 2-1 List of load modules for PBVR Server
Platform

Parallelization

Name of load module

Linux 64 bit

Serialpbvr_server_linux

OpenMP

pbvr_server_linux_omp

Serialpbvr_server_mac

OpenMP

pbvr_server_mac_omp

Serialpbvr_server.exe

OpenMP

pbvr_server_omp.exe

SGI8600*1

MPI+OpenMP

pbvr_server_s86_mpi_omp

FUGAKUMPI+OpenMP

pbvr_server_fugaku_mpi_omp

Mac 64 bit
Windows 64 bit*1. The load modules for supercomputers are used only in computing nodes. Therefore, if
the login nodes and the post-processing nodes are on Linux servers, use the load
modules that are compiled for Linux.

2.1.2 PBVR Client
PBVR Client is implemented in C++ and uses Qt and OpenGL. The following table lists theload modules stored in the client directory of the load module package. Choose the relevantload modules, and copy them to a directory that is specified in the PATH environment
parameter.

13

Table2-2 List of load modules for PBVR Client
Platform

Parallelization

Name of load module

Linux 64 bit

pthreadpbvr_client_linux

Mac 64 bit *1

pthreadpbvr_client _mac

Windows 64 bit *2

pthreadpbvr_client.exe*1. This load module is built for Intel-based Macs, and requires Rosetta to be installed on Macs
with M1 chips.
*2. In order to operate the Windows version load module, it is necessary to separately place
the GLUT dynamic library in a directory which has a path or in the same directory as the load
module. The GLUT dynamic library, glut32.dll, is available from the OpenGL site (2.2.2).

2.2 Build and Installation of Filter and Server Program
The filter and the server program are compiled by pbvr.conf and Makefile under the PBVR/
directory in the source code package. pbvr.conf specifies the settings for making and compiling
PBVR Filter and PBVR Server. The source code package is as follows.
Table2-3 Components of source code package
Directory・File

DetailPBVR/
KMATH/

Pseudorandom number generator library KMATH

KVS/Visualization library KVS (for Server program) *2

glui/

Widget library for GUI

Client/OpenGL ver. PBVR Client programs

FunctionParser/

Function editor library

Common/Common library for protocols, communications

Filter/PBVR Filter programsServer/PBVR Server programsarch/Compilation setting files

pbvr.conf *1

Configuration setting file

Makefile *1

Make file for directory PBVR/*1. In Windows, the MSVC solution file pbvr.sln is used instead of pbvr.conf and Makefile.
*2. This KVS is not used for Client program. This is customized KVS for the particle generation
to compiled at parallel environment.

14

The parameters in pbvr.conf (Table2-4) are used to specify which functions are installed.
Table2-4 List of parameters in pbvr.confparameter

Value

DetailPBVR_MACHINE

StringCompilation setting files under arch/

PBVR_MAKE_CLIENT

0 or 1

Support of Open GL ver. PBVR Client

PBVR_MAKE_SERVER

0 or 1

Support of PBVR Server

PBVR_SUPPORT_KMATH

0 or 1

Support of KMATH (Server only) *1*1. In Windows and Mac, KMATH is unavailable, and TynyMT is used.

15

For PBVR_MACHINE, specify the compilation setting file in directory arch/ from those listed in
the following table.
Table2-5 List of compilation setting files
Filename

Use

Makefile_machine_gcc

Serial compilation using gcc

Makefile_machine_gcc_omp

OpenMP compilation using gcc

Makefile_machine_gcc_mpi_omp

MPI+OpenMP compilation using gcc

Makefile_machine_intel

Serial compilation using intel

Makefile_machine_intel_omp

OpenMP compilation using intel

Makefile_machine_intel_mpi_omp

MPI+OpenMP compilation using intel

Makefile_machine_s86_mpi_omp

Parallel compilation using SGI8600

Makefile_machine_fugaku_clang

FUGAKU clang mode compilation

Makefile_machine_fugaku_trad

FUGAKU trad mode compilation

16

2.2.1 Linux and Mac
On a Linux or Mac system, build the source code and install it as follows.
1)

Edit pbvr.conf in directory PBVR/ depending on your environment.
The following example shows the parameters for building OpenMP versions of PBVRClient, PBVR Server using gcc compiler.
#Example of pbvr.conf
PBVR_MACHINE=Makefile_machine_gcc_omp
PBVR_MAKE_CLIENT=1
PBVR_MAKE_SERVER=1
PBVR_SUPPORT_KMATH=0
To utilize Qt ver. PBVR Client, disable OpenGL ver. PBVR Client with describing
PBVR_MAKE_CLIENT = 0.

2)Compile in directory PBVR/ as follows.
$make
Following load modules are generated under PBVR/ directory.

3)

PBVR Server:

Server/pbvr_server

PBVR Client:

Client/pbvr_client

Copy the generated load modules to an arbitrary directory that is specified in the PATH
environment parameter.

2.2.2 Windows
In Windows, uncompress the source code package and build the source code as follows.
1)

Install GLUTi)

Download glut-3.7.6-bin_x64.zip(64bit) from the link below.
https://user.xmission.com/~nate/glut.html

ii)

Extract the following files:
glut.hglut32.lib
glut32.dll

In the setting of pbvr.sln (described later), the above files are set in the following
directories.
üC:¥pbvr¥glut-3.7.6¥include¥GL¥glut.hü

C: ¥pbvr¥glut-3.7.6¥lib¥ glut32.lib

2)Extract server on a Windows machine that has MSVC.

3)Open pbvr.sln with MSVC.

4)

To select the function to be used in each environment, select “Solution Properties” from
MSVC's Solution Explorer. Then, select whether to support each project in "Configuration
Properties". When using the Qt version client, clear the Client check box to disable the
OpenGL version client support.

17

Figure 2-1 Inactivation of client support of OpenGL
5)

To generate a program parallelized by OpenMP, enable "OpenMP support" in thefollowing project file.
ü

ClientüCommonü

Filterü

FunctionParser

ü

glui

ü

KVS_CoreüKVS_SupportGLUTü

Server

Select each project from MSVC's Solution Explorer. Then, select whether to support
OpenMP in each project from "Configuration Properties" -> “C/C++” -> “Language”
6)

Choose Release and x64 from the pull-down list as shown in Figure2-2.

18

Figure2-2 Build configuration for MSVC
7)

Go to the menu Build > Build Solution.

The load modules pbvr_filter.exe, pbvr_server.exe, and pbvr_client.exe are created under¥¥x64¥Release.

192.3 Build of Client Program
The client program is built using the visualization library KVS(https://github.com/naohisas/KVS) and the integrated development environment Qt Creator.

2.3.1 Installation of KVS library
For details on how to install KVS, please refer to the Wiki on the download page. However,this client program is not built using the original KVS, but using a proprietary version of KVS(https://github.com/CCSEPBVR/KVS) with improved framebuffer handling and other features.
As environment variables for installation, specify the KVS installation path in KVS_DIR and
add the commands for KVS in PATH.
Windows
Create the following environment variables from System Preferences and set their values.
VariableValue

KVS_DIRC:¥Program Files¥kvs (Anywhere you want)

PATH%PATH%;%KVS_DIR%¥binLinux/Mac
Set the following environment variables from a terminal.
export KVS_DIR=~/local/kvs
export PATH=$KVS_DIR/bin:$PATH
In addition, for Macs with the M1 chip, it is necessary to switch the architecture. arm64
architecture is used on M1 Macs, but Qt5.12, on which the client program was developed, does
not support arm64. On the M1 Mac, please install Rosetta beforehand and switch thearchitecture to x86-64 by executing the following command in the terminal before the build of
KVS.
arch -x86_64 bash

Set configuration by specifying kvs.conf as following.

20

KVS_ENABLE_OPENGL= 1

KVS_ENABLE_GLU= 0

KVS_ENABLE_GLEW= 0

KVS_ENABLE_OPENMP= 0# Linux/Windows のみ１とする

KVS_ENABLE_DEPRECATED = 0
KVS_SUPPORT_CUDA= 0

KVS_SUPPORT_GLUT= 0

KVS_SUPPORT_OPENCV= 0

KVS_SUPPORT_QT= 0

KVS_SUPPORT_PYTHON= 0

KVS_SUPPORT_EGL= 0

KVS_SUPPORT_OSMESA= 0# Linux/Windows のみ１とする

The Mac environment does not use GLUT and GLEW for KVS installation. However, theLinux/Windows environment uses GLUT and GLEW, and you need to install and set the pathaccordingly.
Linux
Installation of GLUT
sudo apt-get install freeglut3-dev libglut3-dev
Installation of GLEW
sudo apt-get install libglew1.5-dev
Setting the install path to the environment variables KVS_GLUT_DIR and KVS_GLEW_DIR.
export KVS_GLUT_DIR=”Install path for GLUT”
export KVS_GLEW_DIR=”Install path for GLEW”
Windows
1.

Download glut built in 64bit mode from following URL.
http://coskx.webcrow.jp/mrr/for_students/LectGLCG/distribution/index.html
The names of glut files included in the download file are 32bit (glut32.dll and glut32.lib), butthey are built for 64bit.

2.

Download the 64-bit version of GLEW from the GLEW download page(http://glew.sourceforge.net).

3.

Unzip the downloaded file and copy the following files contained in it to the specified folder.
21

Name

Destination

glut32.dll

C:¥PBVR_Dev¥OpenGL¥bin

glew64.dll
glut32.lib

C:¥PBVR_Dev¥OpenGL¥lib

glew32.lib
glew32s.lib
glut.hC:¥PBVR_Dev¥OpenGL¥include¥GL

glew.hwglew.hCreate the environment variables KVS_GLUT_DIR and KVS_GLEW_DIR from System
Preferences and set the GLUT and GLEW installation location (in the example above, toC:¥PBVR_Dev¥OpenGL).

Compile and install KVS on the terminal.
Windows
Launch the developer command prompt of Visual Studio and type nmake command to build
KVS by MSVC. In the following example, the directory of the KVS source code is
C:SRC¥KVS.
cd C:¥SRC¥KVS
nmake
nmake installLinux/Mac
Build KVS from a terminal using make. In the example below, the directory of the KVS sourcecode is set to /SRC/KVS.
cd /SRC/KVS
make
make install
See the wiki on the download page for more options on compiling.

2.3.2 Setting and build for Client Program
The client program is conﬁgured in qtpbvr.conf. Edit qtpbvr.conf as follows to enable
PBVR_MODE=CS.
22

#PBVR_MODE - Either CS (ClientServer), or IS (Insitu) - Needed on all platforms
PBVR_MODE = CS
#PBVR_MODE = IS

Open the project file QtClient.pro included in the source code with Qt Creator to configure
and build the client program.
1.

Select “File” -> “Open File or Project”.

2.

Select the QtClient.pro file from the QTPBVR/QtClient directory.
PBVRClient/QtClient/QtClient.pro

3.

Select “QtClient” from Active Project.

4.

Select “Build Settings” and check “Shadow Build”.

5.

Set “../build” in “Build Directory”.

Figure 2-3 Client Configuration

Next, set KVS environment variables in your project. In "Build Settings", press "Detail" in"Build Environment" to expand the section, and the environment variables KVS_DIR (where
KVS is installed), KVS_SOURCE (where KVS source code is installed), and GLEW_DIR(where GLEW is installed) is added. On Windows, also add %GLEW_DIR%¥bin to the PATH.

23

Figure 2-4 Setting of KVS environmental variables

2.3.3 Build of Client Program
Next, Client program can be built.
1. Select Edit on the left toolbar.
2. Right click on the “QtClient” project and select "Run qmake".
3. Right click the “QtClient” project and select "Build".

Figure 2-5 Build of Client Program

2.3.4 Deployment of Client Program on Windows
This step is only necessary on Windows, and only if you want to deploy an application that canbe relocated from the build location.
24

C:> cd C:¥PBVR_Dev¥QTPBVR¥build¥App
C:> windeployqt –release pbvr_client.exe
C:> cp C:¥PBVR_Dev¥OpenGL¥bin¥*.dll .
Next, copy shader programs from installed KVS to App folder.
Source: /include/Core/Visualization/Shader/
Destination: /App/include/Core/Visualization/Shader/
The App folder can now be relocated and executed from another location on the samemachine, or on another Windows machine.

2.3.5 CPU or GPU Renderer
The project will build default with GPU_MODE.
As for the CPU MODE,
1.

Open project in QtCreator

2.

Go to project settings -> build -> additional arguments, and enter DEFINES+=CPUMODE

3.

Right click project and click Run Qmake

4.

Right click project and click Rebuild.

25

Figure 2-6 Project setting for CPU mode.

26

Figure 2-7 Qmake for CPU mode27

Figure 2-8 Project rebuild for CPU mode28

3 Input FilesPBVR generates the particle data using script files of file reader parameters and visualization
parameters. The file reader parameter describes the path and file format of the volume data to
be read, and the visualization parameter file specifies the path of the particle data output andthe particle generation method. The particle generation process of the server program is
executed not only in client-server mode which works on login nodes, but also in batch mode
which works on calculation nodes.
[1] Batch mode
In this mode, a job of the server program is submitted on the supercomputer, and a particle
data file is generated from the volume data on the parallel environment. Then, after the job isexecuted, the particle data file is copied onto the user PC and visualized by the client program.
[2] Client Server mode
In this mode, the server program interactively generates particle data files on the visualization
node and transfers them to the user PC via socket communication, which is then visualized by
the client program.

3.1 Parameter File
The parameter file is in ASCII format. It is used in PBVR Filter for AVSFLD/UCD, PLOT3D,
STL, and VTK data. The name of the parameter file is specified on the command line whenrunning PBVR Filter. Table3-1 lists the parameters.

29

Table3-1 List of PBVR Filter input parameters
Parameter nameParameter detailDefault

Notes

value
in_dirInput file directory‘.’

Directory path for input files *1

field_file

AVSFLD file name-*2, *3, *4

stl_binary_file

STL file name-*2

plot3d_config_file

PLOT3D configuration -*2, *3

file name
vtk_file

VTK file name-*2, *3, *5

vtk_in_prefix

Prefix of time series -*2, *3, *5

VTK data files
vtk_in_suffix

Suffix of time series -*2, *3, *5

VTK data files
ucd_inp

AVSUCD file name-ASCII format*2

in_prefix

Prefix of time series -Binary format*2

AVSUCD data files
in_sufix

Suffix of time series -Binary format*2

AVSUCD data files
formatStep number format “%05d”
for time series data

start_step

Starting step number‘1’

end_step

Ending step number‘1’

multi_elem_type

Flag on mixed‘0’‘0’: data with a single element

element type

type

unstructured grid‘1’: data with multiple element
types*1. Directories can be specified either with an absolute path or a relative path, although tilde(~) cannot be used as an abbreviation for the home directory.
*2. One of the following options, field_file, stl_binary_file, plot3d_config_file, vtk_file,
vtk_in_prefix(suffix), ucd_inp, or in_prefix(suffix) should be given.
*3. When the input data are 2D or 3D structured grid data, the output data are converted to
unstructured grid data with linear quadrilateral or hexahedral elements, respectively.
*4. The file can refer only to the parameters ‘nstep’, ‘ndim’, ‘dim1’, ‘dim2’, ‘dim3’, ‘veclen’,‘coord [123]’, and ‘variable.
*5. Five VTK Legacy data formats (VTK Structured Points, VTK Structured Grid, VTK
Rectilinear Grid, VTK UnstructuredGrid, and VTKPolygonalData) are automaticallyrecognized by PBVR Filter.

30

An example of the script file of file reader parameter is shown in following.
#
in_dir=../…………①

field_file=pd3d.fld
out_prefix=case0
out_dir=./…………②

start_step=0
end_step=511① Specify the input data path (in the above example, the input data is read from the shareddirectory)② Specify the output data path (in the above example, the output is for the rank directoryof each process)3.1.1 PLOT3D configuration file
PLOT3D data formats are described by a PLOT3D configuration file. Here, usebytecountshould be set to be 1 for Fortran and 0 for C binary data, respectively.
Parameter name

Use

Default value

coordinate_file_prefix

Prefix of coordinate file-coordinate_file_suffix

Suffix of coordinate file-coordinate_mode_precision

Precision (float | double)

doublecoordinate_mode_usebytecount

1 for true, 0 for false

truecoordinate_mode_endian

Endian (little | big)

littlecoordinate_mode_iblanks

1 for true, 0 for false

false

solution_file_prefix

Prefix of solution file-solution_file_suffix

Suffix of solution file-solution_mode_precision

Precision (float | double)

doublesolution_mode_usebytecount

1 for true, 0 for false

truesolution_mode_endian

Endian (little | big)

littlefunction_file_prefix

Prefix of function file-

function_file_suffix

Suffix of function file-

function_mode_precision

Precision (float | double)

doublefunction_mode_usebytecount

1 for true, 0 for false

truefunction_mode_endian

Endian (little | big)

little31

3.1.2 Processing of Distributed Files
For visualization, this system integrates multiple volume data files from distributed
environments. The volume data files are filtered one by one. One or more PFI files are
generated for each volume data file. If two or more PFI files are needed for an input volumedata file, then their files names are defined in a PFL file. The PFL file is specified with thecommand line option “-vin”.
The first line of a PFL line is “#PBVR PFI FILES”. The PFI file names are written from thesecond line, using the absolute path or relative path of the PFL file. The following example
shows the contents of a PFL file:#PBVR PFI FILES
hex_filter_out/hex.pfi
hex2_filter_out/hex2.pfi

3.2 Visualization Parameter
All the visualization parameters including the transfer function can be saved in thevisualization parameter file by the PBVR client program. By reusing this visualization
parameter file, the same visualization as when it was saved is possible.

32

Table 3-2 List of visualization parameters

33

No

Item

Explanation

Output1

SUB_PIXEL_LEVEL

SUB_PIXEL_LEVEL22

PBVR_PARTICLE_LIMITPBVR_PARTICLE_LIMIT

1000000
0

3

SAMPLING_TYPE

SAMPLING_TYPE

34

EYE_POINT_X

EYE_POINT_X

0

5

EYE_POINT_Y

EYE_POINT_Y

0

6

EYE_POINT_Z

EYE_POINT_Z

0

7

CENTER_POINT_X

CENTER_POINT_X

0

8

CENTER_POINT_Y

CENTER_POINT_Y

0

9

CENTER_POINT_Z

CENTER_POINT_Z

010

UP_VECTOR_X

UP_VECTOR_X

0

11

UP_VECTOR_Y

UP_VECTOR_Y

1

12

UP_VECTOR_Z

UP_VECTOR_Z

0

13

RESOLUTION_WIDTHRESOLUTION_WIDTH

620

14

RESOLUTION_HEIGHTRESOLUTION_HEIGHT

620

15

FILTER_PARAMETER_FILENA

ファイルリーダパラメータファ param.tx

ME

イル

t

16

CROP_TYPECROP_TYPE

1

17

CROP_CXMINCROP_CXMIN

018

CROP_CXMAXCROP_CXMAX

3

19

CROP_CYMINCROP_CYMIN

2.98023
e-08

20

CROP_CYMAXCROP_CYMAX

2

21

CROP_CZMINCROP_CZMIN

1.49012e-08

22

CROP_CZMAXCROP_CZMAX

1

23

CROP_PBVR_SRADIUS

CROP_PBVR_SRADIUS

1.8708324

CROP_SCENTERXCROP_SCENTERX

1.5

25

CROP_SCENTERYCROP_SCENTERY

1

26

CROP_SCENTERZCROP_SCENTERZ

0.5

27

CROP_PBVR_PRADIUS

CROP_PBVR_PRADIUS

1.8027828

CROP_PBVR_PHEIGHTCROP_PBVR_PHEIGHT

1

29

CROP_PCENTERXCROP_PCENTERX

1.5

30

CROP_PCENTERYCROP_PCENTERY

1

31

CROP_PCENTERZCROP_PCENTERZ

0.5

34

32

ROTATION1X

ROTATION1X

1

33

ROTATION1YROTATION1Y

034

ROTATION1ZROTATION1Z

035

ROTATION2X

ROTATION2X

036

ROTATION2YROTATION2Y

1

37

ROTATION2ZROTATION2Z

038

ROTATION3X

ROTATION3X

039

ROTATION3YROTATION3Y

040

ROTATION3Z

ROTATION3Z

1

41

TRANSLATIONXTRANSLATIONX

042

TRANSLATIONY

TRANSLATIONY

043

TRANSLATIONZ

TRANSLATIONZ

044

SCALINGXSCALINGX

145

SCALINGYSCALINGY

1

46

SCALINGZSCALINGZ

1

47

COORD1_SYNTH

COORD1_SYNTH

X

48

COORD2_SYNTH

COORD2_SYNTH

Y

49

COORD3_SYNTH

COORD3_SYNTHZ50FONTTYPE

Font

8x13

51

BACKGROUND_COLOR_R

Background Color200

BACKGROUND_COLOR_G

200

BACKGROUND_COLOR_B

210

52

TF_RESOLUTION

Resolution

256

53

TF_NUMBER

Number Transfer Function

5

54

TF_SYNTH_C

Color synthesizing function

C1+C2

55

TF_SYNTH_O

Opacity synthesizing function

O1+O2

56

TF_NAME[n]_C

Color func. nameC1

57

TF_NAME[n]_VAR_C

Variables synthesizing function q1*q2
for color

58

TF_NAME[n]_MIN_C

Minimum of color func.

059

TF_NAME[n]_MAX_C

Maximum of color func.

500

60

TF_NAME[n]_TABLE_C

Table of color map

0,0,255,
0,4,255,
0,...

61

TF_NAME[n]_O

Opacity func. nameO1

62

TF_NAME[n]_VAR_O

Variables synthesizing function q2
for opacity

63

TF_NAME[n]_MIN_C

Minimum of opacity func.

064

TF_NAME[n]_MAX_C

Maximum of opacity func.

300

35

65

TF_NAME[n]_TABLE_C

Table of opacity map

0,0.0039
2157,...

66

LEGEND_DISPLAY

Flag of showing legend

1

0=not active, 1=active
67

LEGEND_FUNCTION

Selectionofcolor/opacity C2function to show as legend
68

LEGEND_POSITION

Direction of legend

0

0=Vertical, 1=Horizontal
69

LEGEND_CAPTION

Caption of legend

CAPTIO
N_C2

70

LEGEND_INTERVALSInterval of lines in legend

571

LEGEND_INTERVAL_THICKNE

Width of lines in legend

3

Color of lines in legend

248

SS
72

73

LEGEND_INTERVAL_COLOR_R
LEGEND_INTERVAL_COLOR_G

14

LEGEND_INTERVAL_COLOR_B

42

LEGEND_FRAMELINE_THICKN

Width of frame of legend

5

Color of frame of legend

8

ESS
74

LEGEND_FRAMELINE_COLOR_R

6

LEGEND_FRAMELINE_COLOR

245_G
LEGEND_FRAMELINE_COLOR_B

3.3 Volume Data Files
The file formats AVSFLD/UCD, PLOT3D, STL, VTK are available for the server program.

3.3.1 Input Data Format
PBVR Server can process the following data formats as input.
1)

AVSFLD binary data*1

2)

AVSUCD ascii and binary data*1

3)

STL binary data*2

4)

PLOT3D binary data*3

5)

VTK Legacy binary data *4*1. Details of AVS data formats can be found in the AVS manual or at

http://www.cybernet.co.jp/avs. AVSUCD binary data in “data” format can be used.
However, the geom and the data_geom formats are not supported. 2D and 3D elements36

in Table3-3 and their mixed elements are supported.
*2. Details of STL data formats can be found at https://en.wikipedia.org/wiki/STL_(file_format).
*3. Referthedetailsof

PLOT3D

data

formats

can

be

found

at

http://ntrs.nasa.gov/archive/nasa.
*4. Details of VTK data formats can be found at http://www.vtk.org/. PBVR Filter canprocess VTK structured points, VTK structured grid, VTK rectilinear grid, VTK
unstructured grid, and VTK polygonal data.

3.3.2 Endian
The binary files used in PBVR Server are in little endian format. Conversion is necessary on
a big endian machine if the input data files are not already in little endian format.

3.4 Unstructured Grid Data with Mixed Elements
When unstructured grid data contains several element types, PBVR Filter first generates UCD
binary data blocks for each element type. These blocks are then divided into sub-volumes,
which are read by PBVR Server. By setting the parameter multi_element_type to 1 in theparameter file, PBVR Filter produces a sub-volume for each element type.
#
in_dir=.
in_prefix=MULTI
in_suffix=.dat
out_dir=.
out_prefix=div
out_prefix=.dat
format=%03
start_step=1
end_step=20
multi_element_type=1

Output files are generated for each element type. The file names have a two-digit prefix that
represents the element type. The following list shows the prefix for each element type.

37

Table3-3 List of element types
Element nameElement type code

Triangle Linear

2

Quadrilateral Linear

3

Tetrahedron Linear

4

Pyramid

5

Prism

6

Hexahedron Linear

7

Triangle Quadratic

9

Quadrilateral Quadratic

10

Tetrahedral Quadratic

11

Hexahedral Quadratic

14

For example, for the above parameter file, if the input data consist of linear tetrahedral
elements and quadratic tetrahedral elements, the following output files are generated.
Table3-4 File names for mixed elements
Original mixed elements

LinearQuadratic

data

tetrahedral data

tetrahedral data

MULTI001.dat

04-div001_-

11-div001_-

MULTI002.dat

04-div002_-

11-div002_-

MULTI003.dat⇒

04-div003_-

11-div003_-

MULTI004.dat

Decompose

04-div004_-

11-div004_-

MULTI005.dat

04-div005_-

11-div005_-

：

：

：

MULTI020.dat

04-div020_-

11-div020_-

38

4 PBVR Server
In PBVR method, the volume data is converted to the particle data, and the particle data is
projected onto the screen to create the visualization result. PBVR Server reads sub-volume
files, which are produced by PBVR Filter, and performs parallel particle generation of theparticle data. The particle data is transferred to PBVR Client via socket communication.

4.1 Launching PBVR Server
PBVR can run on supercomputers to generate particle data either in batch mode or in client–server mode. In client–server mode, the interactive processing is realized by connecting PBVRClient and PBVR Server via a socket communication. Stand-alone processing on PCs orworkstations is also possible by launching PBVR Client and PBVR Server in client–server
mode on the same machine. The following example shows how to launch PBVR Server:
Examples:Launch the MPI+OpenMP version, and use N processes$ mpiexec -n N pbvr_server
Launch the OpenMP version$ pbvr_server*1. Since the MPI+OpenMP version of PBVR Server operates with master-slave MPI
processing, the number of processes N should be specified by the number of slave
processes + 1.
*2. In both processing modes, the number of OpenMP threads is set with environment
parameter OMP_NUM_THREADS.
*3. In Windows, these commands should be launched from Visual Studio 2013 x64 Native
Tools command prompt.

39

Table4-1 List of command line options for the PBVR Server program
Option-hLaunchPossible

Default

mode *1 values

valuesCS,B--

Functionality
This shows the list of available
options and parameters

-B

B

-

-

To launch in the batch mode-pa

B

File name-

Visualization parameter file *2

-pd

B

Real

1.0

Particle densityuMethod for sampling particles

number-S

Bu, m, ru: uniform sampling
m: metropolis samplingr: rejection sampling-plimitB

1-99999999

1000000

Maximum number of particles

-vin

B

File name-

Input volume data (a PFI or PFL file)
*3

-pout

B

File name./Name of the output particle data file
*3

-p

CS

Port number

60000

Port number for socket
communication-viewerB

100-9999620×620

Viewer resolution-

Create particle files separately

×100-9999
-Bd

B

-

without aggregating the subvolumes-Bs

B

Integer of 0 or First step of First time step for visualizing
more

specified PFI
file group-Be

B

Integer of 0 or Last step of Last time step for visualizing
more

specified PFI
file group*1. In launch mode, CS and B denote client-server mode and batch mode, respectively.
*2. The visualization parameter file is explained at 4.1.1.
*3. This option specify a relative of an absolute path of PFI file generated for filtered volumedata or PFL file (3.1.2) in distributed processing. Do not omit the file extension. If thisoption conflicts with the option in the parameter file specified with ‘–pa’, the latter isignored.
*4. This generates a set of particle data files with names“[file name]_[time step]_[number of sub-volumes]_[sub-volume index].kvsml,”
40

where [file name] is the prefix specified with this option. If the prefix is omitted, theprefix ’server’ will be inserted automatically.

4.1.1 Launching PBVR Server in Batch Mode
For command line option ‘-B’ is given, PBVR Server is launched in batch mode. The following
example shows how to launch PBVR Server in the batch mode (for the MPI+OpenMP version).
$ mpiexec -n 5 pbvr_server -B -vin ./data/case.pfi -pout ./output/case -pa ./param.in
In this example, the input data file ./data/case.pfi is processed with the visualization
parameter file ./param.in to output the following particle data.
./output/case_XXXXX_YYYYYYY_ZZZZZZZ.kvsml
Here
XXXXX

：Number of steps（5 digit）

YYYYYYY：Index for the sub-volume（7 digit）

ZZZZZZZ：Total number of Sub-volumes（7 digit）

Usually, all the sub-volumes for each time step are integrated, so both YYYYYYY andZZZZZZZ are 1. If you want to output particle data for each of the sub-volumes without the
integration, command line option -Bd must be specified when starting the server in batch mode.
The visualization parameter file is specified with the command line option -pa. This file isgenerated in client–server mode interactively. Large-scale data processing in batch mode is
executed using this file as is or with relevant values for the parameters.

4.1.2 Launching PBVR Server in Client-Server Mode
If the command line option “-B” is not specified, PBVR Server is launched in client–servermode, as in this example:$ mpiexec -n 5 pbvr_server
first reading time[ms]:0
Server initialize done
Server bind done
Server listen done
Waiting for connection ...
When “Waiting for connection” appears, as in the above example, and PBVR Server is waiting
for socket communications with PBVR Client, launch PBVR Client in another terminal. In
41

client–server mode, the input volume data name should be given to PBVR Client rather thanto PBVR Server.
The default port number for the socket communication is 60000. To change the port number,use the command line option ‘-p’:$mpiexec -n 5 pbvr_server -p 55555

4.2 Connecting Client and Server via Socket Communication
The client program and the server program perform socket communication using the port
connected by port forwarding, and send and receive particle data and visualization parameters.
This section describes about the port forwarding using ssh.

4.2.1 Local Connection
The following example shows how to launch both PBVR Client and PBVR Server on a single
machine ‘machineA’. In this example, they cooperate using the default port number 60000 of‘machineA’.
Step 1 [Launch PBVR Server]
machineA> mpiexec -n 5 pbvr_server
Step 2 [Launch PBVR Client]machineA> pbvr_client -vin filename

4.2.2 Remote Connection
This section shows an example in which the local machine (machineA) and remote machine(machineB) are connected by ssh port forwarding, and the client program is started onmachineA and the server program is started on machineB. Basically, the startup method afterconnecting ssh port forwarding is the same as standalone.
ssh port forwarding is a mechanism to transfer the port on the network using the routecommunicated by ssh called ssh tunnel. There are three types of port forward: local forward,
remote forward, and dynamic forward. In this system, local forward is used to connect the portof the client PC to the target via the ssh server. The outline and command of ssh local forward
are shown below.

42Remote Server

Client PC
SSH Tunnel
Port 50000

SSH

TargetServerPort 60000

Figure 4-1 Abstract of local forward[Command of SSH local forward]
ClientPC> ssh -L 50000:{Target Address}:60000 {Remote Server Address}
In the ssh local forward command, if the remote server and the target match, the target address
will be “localhost”. Also, any port number can be used except the port numbers assigned to
TCP and UDP, and in this example, the port numbers 50000 and 60000 are used.
The following shows an example in which port 50000 of machineA is connected to port 60000
of machineB using ssh port forwarding and the client program and server program are started
on each machine.
Step1 [SSH port forwarding]machineA> ssh -L 50000:localhost:60000 username@machineB（The 50000 port of machineA is forwarded to the 60000 port of machineB. SincemachintB itself is the target, the target address is localhost.）
Step2 [Launch PBVR Server]
machineB> mpiexec –n 5 pbvr_server
Step3 [Launch PBVR Client]machineA> pbvr_client –vin filename
The following shows an example in which a user enters an interactive node interactB from alogin node of machineB and connects port 50000 of machineA to port 60000 of interactB.
[SSH port forwarding]machineA> ssh -L 50000:interactB:60000 username@machineB43

4.2.3 Testing SSH Port Forwarding Connection
To check if SSH port forwarding is available, use the following test program, which simply
transfers characters input from PBVR Server to PBVR Client. This program is available fromthe link below.
“C for Linux 2” Mitsuyuki Komata, SYUWA System, Inc., September 2005 (Japanese).
http://www.ncad.co.jp/~komata/c4linux2/
Launch PBVR Server
server port_number
Launch PBVR Client
client server_hostname port_number

4.2.4 Remote Connection from SSH Client
This section shows a port forwarding (local forward) using SSH client software Tera Term inWindows environment.
1)

Launch TeraTerm and hit cancel in the “New connection” dialog.

Figure4-2 Tera Term dialog 1)
2)

Select Setup > SSH Transfer from the menu bar. Click Add… in the Forwarding Setup
dialog.

44

Figure4-3 Tera Term dialog 2)
3)

In the Select Direction for Forwarded Port dialog, select Forward Local Port (it means
the local forwarding) and enter the port number to be used for PBVR Client, which iscorresponds to the port 50000 in Figure 4-1. In the to remote machine text field, enter
the domain name or the IP address of the server, which is corresponds to the target
address in Figure 4-1. In the port field, enter the port number to be used on PBVR Server,which is corresponds to the port 60000 in Figure 4-1. Click on OK to complete the setup
of port forwarding.

Figure4-4 Tera Term dialog 3)
4)Connect to the server. Select File > New Connection from the menu bar. In the New
Connection panel, enter the host name of the serve which is corresponds to the remote
server address in Figure 4-1, and click on OK. In the SSH Authentication panel, enter
the user name and passphrase, or specify the location of the private key file, and clickon OK.

45

Figure4-5 Tera Term dialog 4)46

5 PBVR Client
PBVR Client can operate either in client–server mode or in stand-alone mode. In client–servermode, PBVR Client receives particle data that is rendered using OpenGL based on primitives
generated in PBVR Server. PBVR Client also gets visualization parameters (a transfer functionetc.) via user interaction and sends the parameters to PBVR Server. In this way, PBVR Client
controls the volume rendering process in PBVR Server. The data transfer between PBVRClient and PBVR Server uses a socket communication with a user-specified port number. In
contrast, when PBVR is in stand-alone mode, it reads and displays particle data generated by
PBVR Server operating in batch mode.

5.1 Launching PBVR Client
The following examples show how to launch the client program in client-server mode and to
do so in stand-alone mode.
[Launch PBVR Client in client-server mode] *1$ pbvr_client -vin [sub-volume file name *2] [command line options][Launch PBVR Client in stand-alone mode]$ pbvr_client [particle data file name] [command line options]*1. Client–server mode requires that PBVR Server has already been started.
*2. The file name for a sub-volume can be specified with the absolute or the relative pathto the PFI file.
As with PBVR Server, if two or more PFI files are needed for an input volume data file, createa PFL file and specify it with the command line option “-vin” (Section 3.1.2).
Table5-1 List of command line options for client47

Option-hLaunch mode *1 Parameter
CS,SA

Default

value

parameters--

Function
List of options andparameters

-pd

CS

Real

1.0

Particle densityuParticle sampling method

number-SCSu, m, ru: uniform sampling
m: metropolis samplingr: rejection sampling-plimitCS

1~99999999

1000000

Particle limit *2-tdataCS

all, divall

Particledatatransfer

methodall: step batch
transmission,
div: sub-volume divide
forwarding）
-pa

CS,SA

File name-

Visualization

parameter

file
-vin

CS

File name-Name of the PFI or PFL
file of input volume data
*2

-tf

CS

File name

-

Name

of

the

transferfunction file *3-pCSPort number

60000

Port number for socket
communication-viewer

CS,SA

100-9999620×620

Viewer resolution

×100-9999-

CS,SA

shading-pout{L/P/B}, ka, kd, -Shading method *4

ks, n
CS,SA

File name-Output

file

name

for

particle data *5
-pin1

SA

File name-

Input file name for particle
data

-iout

CS,SA

Directory name./Output directory name forimage files*1. CS and SA denote client-server mode and stand-alone mode, respectively.
*2. This option specifies the relative or absolute path of a PFI file generated for filteredvolume data or a PFL file for distributed processing. Do not omit the file extension. If48this option conflicts with the option in the parameter file specified with “-pa”, the latter isignored.
*3. Transfer function files are generated by hitting the Export File button in the Transfer
Function Editor. To apply the transfer function specified in this option, hit the Apply
button in the Transfer Function Editor. Alternatively, the transfer function file can beloaded also with the Import File button.
*4. This argument specifies the shading parameters.
L: Lambert ShadingThis method ignores specular reflection during shading. Parameters “ka” and “kd” arethe coefficients for ambient and diffusion, respectively. They can have a value
between 0 and 1.
P：Phong ShadingThis method adds specular reflection to Lambert shading. Phong shading imitatessmooth metal and mirrors, which is sometimes called highlighting. Parameters “ka”,“kd”, “ks” (which are the coefficients for specular reflection and have values between 0
and 1) and “n” (which is the strength of the highlighting and has values between 0 and100) are used.
B：Blinn-Phong ShadingThis is a simplified form of Phong shading. Parameters “ka”, “kd”, “ks”, and “n” areused.
*5. This generates a series of particle data files that are named“[prefix]_[time index]_[number of sub-volumes]_[sub-volume index].kvsml”,
where the prefix is specified by this option.

49

5.2 Terminating PBVR
5.2.1 Standard Termination
PBVR Client’s rendering process for the time-series data starts at the initial time step, andcontinues to the final time step. When the final time step is rendered, PBVR Client returns to
the initial time step to loop over the steps. To terminate PBVR Client, press Ctrl+C in the
console running PBVR.
In client-server mode, pressing Ctrl+C in the client console terminates both PBVR Clientand PBVR Server. Just before the termination, PBVR Client and Server will synchronize theirtime steps. However, PBVR Client ignores pressing Ctrl+C whenever the client-server
communications are interrupted with the Stop button in the Time Panel.

5.2.2 Forced Termination
If PBVR Server is terminated other than by pressing Ctrl+C in PBVR Client’s console, PBVRClient becomes stuck and cannot be terminated with Ctrl+C. Furthermore, even if Ctrl+C ispressed to terminate PBVR Client, both PBVR Client and Server can become stuck. This canhappen if the time step is not updated due to heavy particle generation processes or someother reason. In this case, obtain the process IDs of PBVR Client and PBVR Server using the
ps command in the console, and then force them to quit with the kill command as follows:[Force the termination of a PBVR Client process]$ ps -C pbvr_client
PID TTY

TIME CMD

19582 pts/600:00:00 pbvr_client$ kill -9 19582[Force the termination of a PBVR Server process】$ ps -C pbvr_server
PID TTY

TIME CMD

19539 pts/500:00:00 pbvr_server$ kill -9 19539

50

5.3 Using the PBVR Client GUI
The client program after startup not only displays the visualization result, but also provides a
GUI that can interactively control visualization parameters.

5.3.1 Viewer
As shown in Figure5-1, Viewer renders the rendering result of particle data.

Figure5-1 Viewer[Operations]Rotation:

Dragging left with the mouse

Translation:

Dragging right with the mouse

Zoom:

Shift + left-dragging, or dragging while pressing the mouse wheel

Reset:

Home button (fn + left arrow on Macs)[Display]51

time step:Time step for the data displayed

fps:

Frame rate (frame/sec)[Tool bar]
Zoom in/out.
Translations.
Get

keyframe/delete

animation.

52

keyframe/play

keyframe

5.3.2 Tool Bar
Various functions of the client program are selected from the toolbar. The “File” tab controls
the input and output of the visualization parameter file and transfer function.
The visualization parameter means a group of parameters that can be set by the client, suchas viewer resolution, particle density, particle number limit, input volume data file name on theserver (PFI file or PFL file), transfer function, etc. The visualization parameter file is a file inwhich they are described in the tag format.
The "File" tab and its functions are shown below.

Figure 5-2 File tab•

Import Parameters specifies the visualization parameter file to be input.

•

Export Parameters outputs the visualization parameter file.

•

Import Transfer Functions specifies the input transfer function file.

•

Export Transfer Functions outputs a transfer function file.

The "Window" tab and its functions are shown below.

Figure 5-3 Window tab•

Animation Control displays a video creation panel.

•

Coordinates displays a coordinates editor.

•

Filter Information displays the input volume data property.

•

Legend Option displays a legend panel for control the legend bar.

•

System Status displays system property.

•

Render Options controls rendering options.

•Time Controls displays a time step control panel.

•

Volume Transform specifies geometry transformation for a rendering object.
53

•

Revert to Default Layout returns the layout of GUI when this application starts.

•

Particle Selector displays a particle panel.

•

Transfer Function Editor displays a transfer function editor.

•

Viewer Controls displays a viewer control panel.

545.3.2.1 FilterInfo
The Filter Info panel displays information about the input filtered volume data.

Figure 5-4 FilterInfo•

Vector number displays the number of variables consisting of the volume data.

•

All Elements displays the number of elements consisting of the volume data.

•

Sub Volume displays the number of sub-volume separated by the filter program.

•Element Type displays the type of element (Table3-3) consisting of the volume data.

•

All Nodes displays the number of nodes of the volume data.

•

Step Number displays the number of time steps.

•

File Type displays the volume decomposition type (エラー! 参照元が見つかりません。).

•

3D Extent displays the min-max X-Y-Z coordinates of the volume data.

55

System Status

Figure 5-5 System status•

CPU Memory displays the system memory usage in megabytes.

•

Displayed Particles displays the number of rendering particles.

•

Filter Parameter File displays the name of input volume data.

•

Step Interval specifies minimum of a time step update interval by [msec]. This is used tolengthen the update interval for time steps that are too short.

•Transfer Function Edit _ Hold till complete holds update of the transfer function till time step
progress completed.

56

Render Options

Figure 5-6 Render Options
Density specifies the particle density related to the depth of the image.
Limit specifies the upper limit of the number of particles generated by the server program inorder to prevent the number of particles from exploding due to incorrect transfer function
specification. If the number of particles exceeds this upper limit, the server programautomatically reduces the image quality and adjusts so that the number of particles falls within
this upper limit.
Data-Size Limit specifies the upper limit of the particle data size using [GB] generated by theserver program in order to avoid explosion of the number of particles due to incorrect transfer
function specification. If the particle data size exceeds this upper limit, particle generation isforced to stop.
Resolution specifies the viewer’s resolution.

57

5.3.2.2 Volume Transform

Figure 5-7 Volume Transform•

Rotation specifies the rotation angle (degree) about the x-, y-, and z-axis of the object.

•

Translation specifies the translation of the object in the x, y and z directions.

•

Scale specifies the scale rate of the object.

58

5.3.3 Transfer Function Editor
The transfer function editor enables to create transfer functions which assign the colors andopacity to physical values. In a standard rendering of a volume, a transfer function is definedwith only one physical quantity. In contrast, PBVR allows for multi-dimensional transfer
functions. It has the following three features:1)

It assigns a parameter to color and, independently, a parameter to opacity.

2)

It defines both color and opacity with an arbitrary function of the X-, Y-, and Z-coordinatesand parameters q1, q2, q3, ….

3)It algebraically synthesizes a multi-dimensional transfer function from one-dimensionaltransfer functions that are defined by color functions C1, C2, … and opacity functions O1,
O2, ….

Figure 5-8 Transfer Function Editor[Operations]
Scale change in histogram: Drag the mouse up/down in the histogram.
•

Number Transfer Functions specifies the maximum number of transfer functions that can becreated.

•Color Function category specifies the color functions and its argument which is synthesized59

by the physical values.
•

Opacity Function category specifies the opacity functions and its argument which issynthesized by the physical values.

•

Color Map category edits the color functions.

•

Opacity Map category edits the opacity functions.

•

Reset button returns the transfer functions to initial state.

•

Apply button sends the transfer function to the server program.

•

Export button saves the transfer function file with same format of “-pa” option.

•

Import button reads the transfer function file.

60

5.3.3.1 Color Map Specification

Figure 5-9 Top: Color Function category, bottom: Color Map category[Color Function category]•

Synthesizer specifies the synthesis of the color function of C1 to C [N]. *1•

Function spin button selects the color function of C1 to C [N] for edit its argument.

•

The button surrounded by red dotted line opens Color Function Editor which enables tosynthesize the physical values as an argument of C1 to C [N].

[Color Map category]•User Defined Range Min:Max specifies the minimum and maximum range of the color
function which is assigned to the synthesized physical value.

•

Synth. Func. Range Min:Max displays the minimum and maximum values of the synthesized
physical value.

•

Edit Color Map button opens Color Map Editor.

•

Histogram displays a distribution of the synthesized physical value with the user defined range
min:max.

•

If the Lock button surrounded by blue dotted line is pressed, it is prohibited to input for theuser defined range min:max and forced to apply the value of the synth. func. range min:max.

*1 [N] is the value of the limit number of the transfer function specified by Number of Transfer
Functions.

61

62

5.3.3.1.１. Color Function Editor
PBVR Client can define the arguments of the color functions C1 to C [N] using the algebraic
formula. In the Color Function Editor, the algebraic formula is synthesized by the physicalvalues. The names of the variables that can be used in the algebraic formula are shown below.
•

Physical values：q1, q2, q3, .., qn.

•

Coordinate values：X, Y, Z.

Figure 5-10 Color Function Editor•

Color Function List displays the created color functions.

•

Function: C[N] = f( algebraic formula ) displays a color function selected in Color Function
List and enables to edit the algebraic formula.

•

Cancel button close this panel.

•

Set button applies the edited algebraic formula to Color Function List.

•

Save button applies the Color Function List to the transfer function•

Select button applies a color function of Color Function List to Function.

63

5.3.3.1.２. Color Function Editor: Freeform Curve Edit Tab
In the Freeform Curve Edit tab of Color Map Editor, the color function can be created by thefree form curve.

Figure 5-11 Color Map Editor: freeform curve tab•

Color Palette consists of saturation on the horizontal axis and brightness on the vertical axis,
and these can be specified by the position of the cursor.

•

The right side of the color palette is RGB bar and enables to specify the hue. Color Palettereflects the hue specified in RGB bar.

•

Reset button returns this tab to default state.

64•Undo button undo single action.

•

Redo button redo single action.

•

Save button applies created color function.

•

Cancel button close this panel.

Blends the single color specified by the Color palette and the RGB bar with those from astandard spectrum. This is done by dragging the mouse along the color box while pressing theleft mouse button. The blending ratio between the specified color and the color from thestandard spectrum is determined by the vertical position of the mouse within the box. For
example, if the mouse is traced across the upper edge of the color box from left to right, it ispainted completely by the specified color. If the mouse is traced across the middle of the colorbox, the colors in the box are replaced with blended colors that are 50% of the original colorand 50% of the specified color.

65

5.3.3.1.３. Color Map Editor: Expression Tab
In Expression Edit tab of Color Map Editor, the color functions can be created by algebraic
expressions.

Figure 5-12 Color Map Editor: Expression tab•

R describes the color function of the red component of the color by algebraic expression.

•G describes the color function of the green component of the color by algebraic expression.

•

B describes the color function of the blue component of the color by algebraic expression.

A variable of the color function is x, and the domain and range of the color function are 0 to 1.

66

5.3.3.1.４. Color Map Editor: Control Points Edit Tab
In Control Points Edit tab of Color Map Editor, the color functions can be created by control
points.

Figure 5-13 Color Map Editor: Control Points Edit Tab•

Point enables to specify the values of control points (up to 10). The domain is 0 to 1.

•

Red enables to specify a red component value corresponding to the control point. The range
is 0 to 1.

•

Green enables to specify a green component value corresponding to the control point. The
range is 0 to 1.

•

Blue enables to specify a blue component value corresponding to the control point. The range
is 0 to 1.

Each control point is interpolated with a piecewise linear function.

675.3.3.1.５. Color Map Editor: Predefined ColorMaps Tab
Predefined Color Maps tab of Color Map Editor provides the selection of predefined color
functions.

Figure 5-14 Color Map Editor: Predefined ColorMaps Tab

Default Colors: displays the list of the predefined color maps. The following templates areavailable.
•

Rainbow•

Blue-white-red•

Black-red-yellow-white•

Black-blue-violet--yellow-white•

Black-yellow-white68•Blue-green-red•

Green-red-violet•

Green- blue--white•

HSV model•

Gray-scale

•

Black

•

White

69

5.3.3.2 Opacity Map Specification

Figure 5-15 Top: Opacity Function category, bottom: Opacity Map category[Opacity Function category]•

Synthesizer specifies the synthesis of the opacity function of O1 to O[N]. *1•

Function spin button selects the opacity function of O1 to O[N] for edit its argument.

•

The button surrounded by red dotted line opens Opacity Function Editor which enables tosynthesize the physical values as an argument of O1 to O[N].

[Opacity Map category]•

Range Min:Max specifies the minimum and maximum range of O1 to O[N].

•Server Side Range (min:max) displays the minimum and maximum values of the synthesized
physical value•

Edit Color Map button opens Opacity Map Editor.

*1 [N] is the value of the limit number of the transfer function specified by Number of Transfer
Functions.

70

5.3.3.2.１. Opacity Function Editor
PBVR Client can define the arguments of the opacity functions O1 to O [N] using the algebraic
formula. In the Opacity Function Editor, the algebraic formula is synthesized by the physicalvalues. The names of the variables that can be used in the algebraic formula are shown below.
•

Physical values：q1, q2, q3, .., qn.

•

Coordinate values：X, Y, Z.

Figure 5-16 Opacity Function Editor•

Opacity Function List displays the created color functions.

•

Function: O[N] = f( algebraic formula ) displays a color function selected in Opacity Function
List and enables to edit the algebraic formula.

•

Cancel button close this panel.

•

Set button applies the edited algebraic formula to Opacity Function List.

•

Save button applies the Opacity Function List to the transfer function•

Select button applies a color function of Opacity Function List to Function.

715.3.3.2.２. Opacity Map Editor: Freeform Curve Tab
In the Freeform Curve Edit tab of Opacity Map Editor, the opacity function can be created by
the free form curve.

Figure 5-17 Opacity Map Editor: Freeform Curve Tab•

Reset button returns this tab to default state.

•

Undo button undo single action.

•

Redo button redo single action.

•

Save button applies created color function.

•

Cancel button close this panel.

In drawing the opacity function, a free-form curve can be drawn by left-dragging with themouse and a linear interpolation line between two points can be drawn by right-click.

72

5.3.3.2.３. Opacity Map Editor: Opacity Expression Tab
In Expression Edit tab of Opacity Map Editor, the opacity functions can be created by algebraic
expressions.

Figure 5-18 Opacity Map Editor: Opacity Expression Tab•

O: describes the color function of the blue component of the color by algebraic expression.

A variable of the opacity function is x, and the domain and range of the opacity function are 0
to 1.

73

5.3.3.2.４. Opacity Map Editor: Control Point Editor Tab
In Control Points Edit tab of Opacity Map Editor, the opacity functions can be created by control
points.

Figure 5-19 Opacity Map Editor: Control Point Editor Tab•

Point enables to specify the values of control points (up to 10). The domain is 0 to 1.

•

Opacity enables to specify the opacity value corresponding to the control point. The range is
0 to 1.

Each control point is interpolated with a piecewise linear function.

74

5.3.3.3 Function Editor
Table 5-2 lists the built-in math operations available in the function editors. They can be used
for the overall transfer functions, the parameters, and for the color and opacity curves.
Table 5-2 Math operations available in function editors
Math operation

In function editors

+

+

-

-

×

*

/

/

sin

sin(x)cos

cos(x)tan

tan(x)log

log(x)exp

exp(x)

square rootsqrt(x)

power

x^y

When arithmetic processing by the function editor produces NaN, PBVR outputs an error
message and stops the drawing process.

75

5.3.4 Time panel
Figure5-20 shows Time panel, which specifies the time steps for the visualization. Each widget
works as described below.

Figure5-20 Time panel•

Progress expresses the current time step as a percentage.

•

Time step specifies the time step of the data to be rendered.

•

Min Time specifies the minimum time step for the ROI.

•Max Time specifies the maximum time step for the ROI.

•

Start/Stop starts/stops communications between PBVR Client and PBVR Server.

76

5.3.5 Particle panel
Figure5-21 shows Particle panel, which is used to integrate multiple particle datasets. Eachwidget works as described below.

Figure5-21 Particle panel. Left: particle selection mode, right: polygon selection mode.
Display Particle category shows a list of particle and polygon datasets. The particle is sentfrom PBVR Server, or is loaded from local files (maximum 5 files). The polygon is loaded fromlocal files (maximum 5 files). If the subpixel levels of the server particle data and local particle
data is different, the server particle’s subpixel level takes priority. In standalone mode, If
multiple local particle data are to be displayed and the sub-pixel level of each particle data isdifferent, the sub-pixel level of the later loaded particle data takes priority.
Keep Initial Step category specifies particle datasets, in which the initial step data isdisplayed before the time series starts, when integrated particle datasets start from different
time steps. Keep Final Step category specifies particle datasets, in which the final step data
is displayed after the time series ends, when integrated particle datasets end at different time
steps.
[Display Particle/ Keep Initial Step/ Keep Final Step category]•Server check box is activated when a particle dataset from PBVR Server is integrated withlocal particle data sets. This checkbox is not available in stand-alone mode.

•(Particle1)- (Particle5) check boxes are activated to integrate the particle datasets loaded
from local files. The checkbox is not available before particle datasets are loaded via Particle
file panel.
77•(Polygon1)- (Polygon5) check boxes are activated to integrate the polygon datasets loaded
from local files. The checkbox is not available before polygon datasets are loaded via Particle
file panel.

Edit Particle category enables to add particle data or polygon from a local file on the client PC
to the list of (Particle1)- (Particle5), (Polygon1)- (Polygon5) and to save the integrated
particle data as the particle file.
[Edit Particle category]•

Item spin button selects the item from the list of (Particle1)- (Particle5), (Polygon1)(Polygon5) to add particle data.

•

Particle Name text box enables to name the particle data and polygon read from the client
PC. If this description is omitted, the file name displayed in the Particle File column is used.

•

Browse button opens the file dialogue to load the particle data and polygon. The path ofthe loaded particle data and polygon file is displayed in the Particle File column. A pathcontaining a double-byte character string cannot be specified.

•

Add button adds the particle data and polygon displayed in the Particle File column to theitem selected with the Item spin button. If you select an item that has already been added,
overwrite it with the particle data that was load later.

•

Delete button deletes the particle data and polygon added to the item currently selectedwith the Item spin button.

•

Export button integrates the particle data in memory and outputs it to the file specified in
the Particle File column.

•

Close button closes Particle panel.

•

Polygon Option appears in case of that polygon is selected at Item spin button. It can
specify color and opacity of the polygon.

5.3.5.1 Example of volume and polygon composition
The following is an example of a composite the unstructured lattice data spx.inp and thepolygon spx.stl of its boundary shape included in the sample data. Specify the path of spx.inp
filtered by the -vin option when starting the server, and execute volume rendering on the client(Figure 5-22 left). Next, in the Edit Particle category of the Particle Integration panel, selectPolygon from the Item spin box, and specify the path of spx.stl in Particle File. Next, specify
the data name "spx.stl" in Particle Name, and set the color and opacity. Then, check spx.stl in
the Display Particle category (right side of Figure 5-22), and the boundary shape will be
synthesized (center of Figure 5-22).

78

Figure 5-22 Left: volume rendering result of spx.inp; Center: composite view of spx.inp
volume and boundary shapes; Right: settings of the Particle Integration panel in thecomposite view.

5.3.5.2 Example of multi-time steps composition
The behavior of the particle integration is explained using Figure 5-23 (sever side: 1~4 time
steps, client side:0~3). If the server checkbox and the particle checkboxes are checked, alltime steps are displayed as shown in Table 5-3. If the checkbox Keep Initial Step is checked
for the client particles, only the first time step is displayed, as shown in Table 5-4. If Keep Final
Step is checked for the client particles, only the final time step is displayed, as shown in Table
5-5.

S1

Serverer
Client

S2

S3

S4
time step

C0

C1

C2

C3

er
Figure 5-23 The behavior of the particle integration

Table 5-3 Particle datasets displayed by default.
Step0

Step1

Step2

Step3

Step4

Server

-

S1

S2

S3

S4

Client

C0

C1

C2

C3

-

79

Table 5-4 Particle datasets displayed with Keep Initial Step for the server particles.
Step0

Step1

Step2

Step3

Step4

Server

S1

S1

S2

S3

S4

Client

C0

C1

C2

C3

-

Table 5-5 Particle datasets displayed with Keep Final Step for the client particles.
Step0

Step1

Step2

Step3

Step4

Server

-

S1

S2

S3

S4

Client

C0

C1

C2

C3

C3

80

5.3.6 Image file production
In Animation Controls, PBVR Client saves image data for the Viewer in two modes, both ofwhich are played as a movie.
lTime series data mode
The images are saved as time series data in BMP format. The image data files areconverted and compressed into a movie file via free software, such as ImageMagic
and ffmpeg.

l

Key frame animation mode
Geometrical information from an arbitrary time step is retained as a key frame. A
series of key frames can be played as a key frame animation.

Figure5-24 shows the Animation Control Panel. Each widget works as described below.

Figure5-24 Animation Controls Panel•

Capture spin box turns image production off or on.

•

Image File specifies a prefix for the image data files. The default name is “PBVR_image”.

•

File specifies a key frame file that contains geometrical data. The default name is ./xform.dat.

•

Interpolation specifies the number of frames used for linear interpolation of the geometry data
between two key frames in a key frame animation. The default value is 10.

•

Total Key Frames shows the number of key frames stored in the current key frame animation.
It is initialized to 0, and incremented (or decremented) by pressing “x” (or “d”). It is initialized
to 0 again by pressing “D”.

•

Total Animation Frames shows the number of total frames stored in the current key frame81animation, which is calculated as(Total Key Frames – 1) x Interpolation

5.3.6.1 Image production
Image files are produced as follows.
1.

Specify the prefix for the image files in image file.

2.

Select “on” in the capture drop down menu.

3.

A series of image files are saved at each time step.

4.

Image production is stopped by selecting “off” in the capture drop down menu.

The image files are saved in the directory specified by the command line option “-iout”. If “iout” option is not specified, they are saved in the current directory “./”. The following shows
an example of image data files produced with the default prefix “PBVR_image”:
PBVR_image.00001.bmp
PBVR_image.00002.bmp…
If the image files are produced from a key frame animation, which is explained later, the filenames are modified by adding “_k” after the prefix.
PBVR_image_k.00001.bmp
PBVR_image_k.00002.bmp…

5.3.6.2 Key frame animation of a still image
A key frame animation of a still image, which is obtained by pressing Stop in the Time Panel,is produced as follows.
[Capture key frames and save them in a file]1) Specify a key frame file in file.
2) Activate the Viewer by clicking it.
3) Adjust the view and press “x” to store the geometry information for the view inmemory.
4) Repeat (3).
5) Press “M” (i.e., shift+m) to play the key frame animation.
6) If the contents of the key frame animation are satisfactory, press “S” (i.e., shift+s) to

save the geometry information as a series in the key frame file.
82

[Play a key frame file]1) Specify a key frame file in file.
2) Activate the Viewer by clicking it.
3) Press “L” (i.e., shift+f) to play the key frame animation stored in the key frame file.
4) Press “x” to add new key frames to the current key frame animation.

Table5-6 Keys used for controlling key frame animation
Key

Functionx

Add geometry information for the current view to the key
frame data in memory.

dDelete the last key frame.

D

Delete all key frames.

M

Play or pause the key frame data in memory.

S

Save the key frame data in memory to a key frame file.

L

Load a key frame file and play its key frame data83

5.3.6.3 Key frame animation of time series data
A key frame animation of time series data can be produced as follows.
1)

By pressing “x” while time series data are being rendered, both geometry information
and a time step number are stored in memory.

2)

Press “S” to save a series with geometry information and time step numbers in the key
frame file.

3)

Press “F” to load a series with geometry information and time step numbers in the key
frame file and play a key frame animation. Here, if key frames are at unequal intervals,
then interpolation frames, which are specified in interpolation, are non-uniform in time.
Time series data

Key frame information
No.

Time step number

0

00002

1

00004

2

00025

3

00035

00002,00003
00004,00006,00008～00024
00025,00026,00027～00034
00035～00044

Figure5-25 Key frame animation for time series data

In the example shown in Figure5-25, if there are 10 interpolation frames between key frames,
then 5 interpolation frames are assigned to the time steps 00002 and 00003 between key
frames 0 and 1. On the other hand, between key frames 1 and 2, 10 interpolation frames are
assigned to the time steps from 00004 to 00024. As a result, the time steps 00004, 00006,…, 00024 are shown in the key frame animation.

84

5.3.6.4 Key frame file format
A key frame file contains binary data with the following format.

Type

Size

data

(bytes)int

4Time step number

float

4

rotation[0].x

float

4

rotation[0].y

float

4

rotation[0].zFile format

float

4

rotation[1].x

Key frame data 1

float

4

rotation[1].yKey frame data 2

float

4

rotation[1].z

float

4

rotation[2].x

float

4

rotation[2].y

float

4

rotation[2].z

float

4

translation.x

float

4

translation.y

float

4

translation.z

float

4

scaling.x

float

4

scaling.y

float

4

scaling.z:

Figure5-26 Key frame file format

85

5.3.7 Legend panel
Figure5-27 shows the Legend panel. A legend is a bar showing how the values of a physicalquantity are rendered as a color in the visualization. Each widget works as described below.

Figure5-27 Legend panel•

Display Legend checkbox turns on or off of showing the legend.

•

Caption text box enables to enter a caption string for the legend and the contents are reflectedby Set button.

•

Color Function spin button selects the color map legend and the range.

•

Layout Direction spin button selects the direction of the legend (vertical/horizontal).

•Intervals specifies the number of tick marks.

•

Thickness in Division category specifies a thickness of the tick marks.

•

Color in in Division category specifies a color of the tick marks.

•

Thickness in Frameline category specifies the thickness of the frame border.

•

Color in in Frameline category specifies a color of frame border.

Figure5-28 shows an example of legend.

86Figure5-28 Example of a legend875.3.8 Coordinate Panel
Figure5-29 shows the Coordinate panel. This panel is used to specify a coordinatetransformation for each axis. For example, you can change from Cartesian coordinates tocylindrical coordinates.

Figure5-29 Coordinate panel

・ Coordinate 1 specifies a formula for the new X coordinate. Empty or blank means just "X", i.e.,
the Cartesian coordinate.
・ Coordinate 2 specifies a formula for the new Y coordinate. Empty or blank means just "Y", i.e.,
the Cartesian coordinate.
・ Coordinate 3 specifies a formula for the new Z coordinate. Empty or blank means just "Z", i.e.,
the Cartesian coordinate.
・ Rescale button rescales the viewer display using the maximum and minimum coordinate
values of data displayed so far.
・ Apply button sends a formula defined with this panel to the server.

The coordinate transformations are entered into the text boxes for coordinate axes 1–3.
Variables used are the Cartesian coordinates (X, Y, and Z), physical quantities (q1, q2, …, q9),
and time (T). The variables can be written in upper case (X, Y, Z, and T) or lower case (x, y, z,
and t). In addition, the operations allowed are the same as those used in the transfer function
editor (see Section 5.3.3.3). If a physical quantity specified does not exist, then 0 will be used.

88

5.3.9 Viewer Control Panel
Figure5-30 shows the Viewer Control Panel, which specifies the properties of the viewer.
Each widget works as described below.

Figure5-30 Viewer control panel
・ Background specifies the background color of the viewer.
・ Font selects a font type and size of the character shown to a viewer

89

6 An Example with the Sample Dataset
The following sections demonstrate the usage of PBVR for a sample dataset gt5d.tgz.

6.1 Filtering Process
Uncompress gt5d.tgz to extract the following files under the directory ./gt5d.
gt5d.fld:

An AVS field fileco3d.dat:

A coordinate data file

pd3d.dat:

The variable 1

psid.dat:

The variable 2

param.txt:

Input parameters for PBVR Filter

demo.tf:

A transfer function file for demonstration

Execute PBVR Filter with the following command (which invokes the OpenMP version).
$ filter ./ param.txt
The contents of param.txt are as follows:#
in_dir=./gt5dfield_file=gt5d.fld
out_dir=./gt5d
out_prefix=casestart_step=0
end_step=4
The above example specifies the SPLIT file format (which is the default format), a single
sub-volume (without sub-volume decomposition), and the same directory for both input andoutput. This filtering process generates the following files in the specified output directory.
case.pfi: A PFI filecase_YYYYYYY_ZZZZZZZ_connect.dat: An element configuration filecase_YYYYYYY_ZZZZZZZ_coord.dat: A node coordinate filecase_XXXXX_YYYYYYY_ZZZZZZZ.kvsml: A kvsml filecase_XXXXX_YYYYYYY_ZZZZZZZ_value.dat: A variable file90

6.2 Starting PBVR
[step 1] Launch PBVR Server (which is the OpenMP version)$ pbvr_server
first reading time[ms]:0
Server initialize done
Server bind done
Server listen done
Waiting for connection ...
[step 2] Launch PBVR Client. This example uses the metropolis sampling and Phong
Shading.
$ pbvr_client -S m -vin ./gt5d/case.pfi -shading P,0.6,0.6,0.6,30

Figure6-1 PBVR GUI

91

6.3 Designing Transfer Functions
This section shows examples of visualizing gt5d.fld, using the multi-dimensional transfer
function that is produced with the advanced transfer function design capability of PBVR.
gt5d.fld contains structured grid volume data that consists of two variables.

6.3.1 Volume Rendering for a Single Variable
First, visualize the variable q1 by setting the transfer function t1 as shown in Figure6-2. In thisexample, the transfer function is designed with the Transfer Function Editor. The left part of
the Transfer Function Editor shows the configuration for colors, while in the right part shows
the opacity. Notice that this configuration is the conventional volume rendering for a single
variable.

Figure6-2

Volume rendering result for the variable q1.

Color Function SYNTHESIZER ：C1
Opacity Function SYNTHESIZER ：O1
Color Map Function：C1 = f(q1)Opacity Map Function：O1 = f(q1)92

6.3.2 Multivariate Volume Rendering
The next example shows the result of a multivariate volume rendering, in which the variables
q1 and q2 are synthesized as shown in Figure6-3. In this example, the colors are assigned to
the variable q1, while the opacity is assigned to the variable q2. The opacity map extracts twotorus surfaces, which are given by the iso-surfaces of the variable q2. The colors encode the
distribution of the q1 values in these iso-surfaces.

Figure6-3 Rendering a multivariate volume. The q1 values are color-mapped onto the isosurfaces of q2.
Color Function SYNTHESIZER ：C1
Opacity Function SYNTHESIZER ：O2
Color Map Function：C1 = f(q1)Opacity Map Function：O2 = f(q1)93

6.3.3 Slicing Volumes
Figure6-4 shows an application of PBVR’s multivariate volume rendering after extracting aslice. With PBVR, an arbitrary function can be used to design a transfer function. In thisexample, the cylindrical surface (X2+Z2=const.) is extracted and the color of the variable q1 ismapped onto it.

Figure6-4 Rendering after slicing the volume with PBVR’s multivariate volume rendering
capability.
Color Function SYNTHESIZER ：C1
Opacity Function SYNTHESIZER ：O3
Color Map Function：C1 = f(q1)Opacity Map Function：O3 = f(sqrt(X2+Z2))
Opacity Range Min：180
Opacity Range Max：38094

6.3.4 Synthesis of Transfer Functions
This section explains how to synthesize transfer functions in PBVR. Figure6-5 shows atransfer function O4, whose opacity function makes the region Y > 0 transparent. By
synthesizing the previously described transfer functions O1, O2, and O3 together with a newtransfer function O4 as (O1 + O2) * O4 + O3, the individually extracted sub-regions canundergo a flexible composition using arithmetic operations. In this example, the colors of t2
and O3 are set to (R, G, B) = (0, 0, 0), while the color of O4 is set to (R, G, B) = (1, 1, 1). In theabove synthesis equation, the final colors are the rainbow color map defined for O1. On theother hand, the opacity of O4 is multiplied by the sum of O1 and O2 in order to extract thelower half region (Y < 0) of O1 and O2. Then, the resulting region is synthesized with thecylindrical surface given by O3.
As demonstrated by these examples, PBVR’s ability to synthesize transfer functions is
powerful. It can extract an arbitrary region for each parameter and then use a series ofmathematical operations.

Figure6-5 Synthesizing transfer functions
Color Function SYNTHESIZER ：(C1+C2)*C4+C3
Opacity Function SYNTHESIZER ：(O1+O2)*O4+O3

95

6.4 Integration of Particle Dataset
While the previous section illustrates a visualization using volume rendering, iso-surfaces, andsurface rendering via multi-dimensional transfer functions, a similar image composition canalso be achieved by integrating multiple particle datasets. This section gives an example of aparticle integration.

6.4.1 Saving Particle Datasets
Particle datasets are stored using the Particle File sub-panel in Particle panel. Figure6-6
shows an example using “Export Particle”. In this case, the following files are generated withthe prefix “p1”:./particle/p1_XXXXX_YYYYYYY_ZZZZZZZ.kvsml./particle/p1_XXXXX_YYYYYYY_ZZZZZZZ_colors.dat./particle/p1_XXXXX_YYYYYYY_ZZZZZZZ_coords.dat./particle/p1_XXXXX_YYYYYYY_ZZZZZZZ_normals.dat
Here, XXXXX is the time step, YYYYYYY is the sub-volume number, and ZZZZZZZ is thenumber of sub-volumes. The files “colors”, “coords”, and “normal” contain the color,
coordinates, and normal vector of each particle, respectively. On hitting the Export button,
integrated particle data are stored in the above files. While saving, the Export button is deactivated as shown in Figure6-7. Once the whole time series data have been saved, the Export
button becomes active again.

96

Figure6-6 Particle File panel (Export is active)

Figure6-7 Particle File panel (Export is inactive)97

6.4.2 Loading Particle Dataset
In the following example, three particle datasets, p1, p2, and p3, which correspond to theimages in Figure6-2 to Figure6-4, are loaded and integrated. Here, PBVR Client is launchedin stand-alone mode with the following command:$ pbvr_client -shading P,0.6,0.6,0.6,30 –pin1 ./particle/p1 –pin2 ./particle/p2 –pin3 ./particle/p3
p1–p3 are listed in the Particle panel. After turning on the Display particle checkbox for p1,
the volume rendering is shown, as illustrated in Figure6-8. In addition, by turning on the
Display particle checkboxes for p2 and p3, all three particle datasets are integrated, as in
Figure6-9. The integrated particle data can be stored as a single particle dataset via Particle
File. Note that to obtain images that are correctly integrated, all the particle datasets must be
generated using the same particle densities and particle limits, which are specified by thecommand line options -pd and -plimit.

98

Figure6-8 Particle dataset p1

Figure6-9 Integration of p1, p2, and p3

99

6.5 Saving Results
After designing the transfer function, PBVR can save the resulting image and parameters in
the following three ways:
1)

Image output (Section 5.3.6)
To save the results as images, select “on” in the capture drop-down list in the Animation
panel. Bitmap image files (PBVR_image.xxxxx.bmp) are generated.

2)

Transfer function file (Section 5.3.3)
To generate a transfer function file, enter a file name for the transfer function in the FilePath of the Transfer Function Editor and press Export File. This file can subsequently
be loaded using Import File.

3)

Visualization parameter file (Section 3.1)
All the visualization parameters including the transfer function can be exported and used
to run PBVR Server in batch mode. Open the File panel from the Main panel, specify
the parameter filename and press Export FILE.

6.6 Batch Mode Example
This section shows how to run PBVR Server in batch mode using the visualization parameter
file exported in the previous section. This mode is used for massively parallel processing on asupercomputer. In addition, it is also useful for high-speed rendering of time series data with
PBVR Client in stand-alone mode, because it eliminates the latency due to particle generationand particle data transfer.
[Step 1] Launch PBVR Server (of OpenMP version) in batch mode
$ pbvr_server –B –vin ./gt5d/case.pfi –pout ./output/case -S m -pa ./param.in[Step 2] Launch PBVR in stand-alone mode
$ pbvr_client –pin1 ./output/case -shading P,0.6,0.6,0.6,30

100

ファイル名 :CS-PBVR_builtin_ManualEng.docx

フォルダー :
/Users/kawamura/Library/Containers/com.microsoft.Word/Data/Documents
テンプレート :/Users/kawamura/Library/Group

Containers/UBF8T346G9.Office/User
Content.localized/Templates.localized/Normal.dotm
表題 :
副題 :
作成者 :

y ido

キーワード :
説明 :作成日時 :

2022/01/11 14:00:00

変更回数 :

2

最終保存日時 :2022/01/11 14:00:00

最終保存者 :

河村 拓馬

編集時間 :

2 分

最終印刷日時 :2022/01/11 14:00:00

最終印刷時のカウント
ページ数 :

101

単語数 :14,251 (約)文字数 :81,236 (約)