BuildForMac_EN - CCSEPBVR/CS-IS-PBVR GitHub Wiki

Building on a Mac

CS/IS-PBVR is implemented in C++, and can be built by switching between the sequential processing version, the OpenMP version for thread parallel processing, and the MPI + OpenMP version for massively parallel processing by setting it in the config file. The client program is implemented in C++, Qt and OpenGL.

Clone source code

Clone using git command as follows.

git clone https://github.com/CCSEPBVR/CS-IS-PBVR.git
cd CS-IS-PBVR
git checkout release/vX.X.X

Building the server, filter, and KVSML converter

Among the source code packages cloned to any directory, the CS-IS-PBVR/CS_Server/ directory is compiled by the following pbvr.conf and Makefile. Configure make with the pbvr.conf file, build the filter and server program. The structure of the CS-IS-PBVR/CS_server/ directory is as follows:

CS-IS-PBVR
└── CS_server
    β”œβ”€β”€ main.cpp
    β”œβ”€β”€ Makefile        - Compile the source code under the CS_server
    β”œβ”€β”€ pbvr.conf       - make configuration file
    β”œβ”€β”€ pbvr.sln
    β”œβ”€β”€ pbvr.v12.suo
    β”œβ”€β”€ Common          - Protocols, Communications, Common Libraries
    β”œβ”€β”€ Filter          - Filter program
    β”œβ”€β”€ FunctionParser  - Math Processing Library
    β”œβ”€β”€ arch            - Compiler configuration file for each environment
    β”œβ”€β”€ VisModule       - Integrated Visualization Library KVS*1 and Server program
    β”œβ”€β”€ KVSMLConverter  - KVSML Converter

*1. This KVS is not used in the client program, and this KVS is a proprietary version specialized for parallel visualization processing on the server.

Specify the function to be installed by changing the input value of the variable in pbvr.conf.
The list of variables in pbvr.conf is shown below.

Variables Input Values Description
PBVR_MACHINE String Compilation configuration files under arch/
PBVR_MAKE_FILTER 0 or 1 Is there support for filters?
PBVR_MAKE_SERVER 0 or 1 Server Support
PBVR_MAKE_KVSML_CONVERTER 0 or 1 Is there support for KVSML Converter?
PBVR_SUPPORT_VTK 0 or 1 VTK Support (Filter Only)

In the variable PBVR_MACHINE, specify the configuration file of MakeFile stored under the arch/ directory according to the compilation environment.

File Name Description
Makefile_machine_gcc Configuring Sequential Compilation with gcc
Makefile_machine_gcc_omp Configuring OpenMP version compilation with gcc
Makefile_machine_gcc_mpi_omp Configuring MPI+OpenMP Compilation with gcc
Makefile_machine_intel Configuring Intel Sequential Compilation
Makefile_machine_intel_omp Configuring OpenMP compilation by intel
Makefile_machine_intel_mpi_omp Configuring MPI+OpenMP Compilation by Intel
Makefile_machine_s86_mpi_omp Compile settings on JAEA large computer
Using Intel Compiler and mpt Library
Makefile_machine_fugaku_clang Configuring Compilation in ARM Clang Mode
Makefile_machine_fugaku_trad Configuring Compilation in Fugaku (ARM) trad Mode

Building the server and filter

Edit pbvr.conf under the CS-IS-PBVR/CS_server/ directory according to the functions to be used in each environment.

An example of using the gcc compiler to build a filter and server program parallelized by OpenMP is shown below.

PBVR_MACHINE=Makefile_machine_gcc_omp 
PBVR_MAKE_FILTER=1
PBVR_MAKE_SERVER=1
PBVR_MAKE_KVSML_COMVERTER=0
PBVR_SUPPORT_VTK=0

Build under CS-IS-PBVR/CS_server with the following command

make -j 16

An executable module is created under CS-IS-PBVR/CS_server as shown below.
Filter: Filter/pbvr_filter
Server: pbvr_server

Building a server with an extended data format

The server program supports only volume data in the original KVSML format,
but data formats can be extended by using the KVS and VTK libraries.

KVS and VTK are assumed to be pre-installed.
For the installation method, refer to each library repository.

The following settings must be made in ccmake when installing VTK.

  1. Turn on the BUILD_SHARED_LIBS option.
  2. Set the CMAKE_BUILD_TYPE option to "Release".
  3. Set the CMAKE_INSTALL_PREFIX to the location where you want to install VTK.

1.The settings required for the VTK filter are shown below.

export KVS_DIR=<BASE_DIR>/KVS/install
export VTK_VERSION=n.n 
export VTK_LIB_PATH=/usr/local/lib 
export VTK_INCLUDE_PATH=/usr/local/include/vtk-n.n 
export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH

Here, enter the version of VTK to be used in n.n, and rewrite the path according to the installation environment of the VTK library.

2.Set KVS_SUPPORT_EXTENDED_FILE_FORMAT in KVS/kvs.conf to 1, then build and install KVS.
3.Build under CS-IS-PBVR/CS_server with the following command.

make -j 16

4.An executable module is created under CS-IS-PBVR/CS_server as shown below.
Server:pbvr_server

Filter build for VTK

VTK 6.0 or later is required to build a filter for VTK. For information on installing the VTK library, refer to the VTK website. Also, when installing, perform the following settings in CMake-gui.

  1. Turn on the BUILD_SHARED_LIBS option.
  2. Set the CMAKE_BUILD_TYPE option to "Release".
  3. Set the CMAKE_INSTALL_PREFIX to the location where you want to install VTK.

The settings required for the VTK filter are shown below.

export VTK_VERSION=n.n 
export VTK_LIB_PATH=/usr/local/lib 
export VTK_INCLUDE_PATH=/usr/local/include/vtk-n.n 

Here, enter the version of VTK to be used in n.n, and rewrite PATH according to the installation environment of the VTK library.

Building KVSML Converter

KVS and VTK are assumed to be pre-installed.
For the installation method, refer to each library repository.

The following settings must be made in ccmake when installing VTK.

  1. Turn on the BUILD_SHARED_LIBS option.
  2. Set the CMAKE_BUILD_TYPE option to "Release".
  3. Set the CMAKE_INSTALL_PREFIX to the location where you want to install VTK.

1.The settings required for the VTK filter are shown below.

export KVS_DIR=<BASE_DIR>/KVS/install
export VTK_VERSION=n.n
export VTK_LIB_PATH=/usr/local/lib 
export VTK_INCLUDE_PATH=/usr/local/include/vtk-n.n 
export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH

Here, enter the version of VTK to be used in n.n, and rewrite the path according to the installation environment of the VTK library.

2.Set PBVR_MAKE_KVSML_COMVERTER in CS-IS-PBVR/CS_Server/pbvr.conf to 1.
3.Build with the following command under CS-IS-PBVR/CS_server.

make -j 16

4.An executable module is created under CS-IS-PBVR/CS_server as shown below.
KVSMLConverter/Example/Release/kvsml-converter

Building the Client

The client program is built using the visualization library KVS and the integrated development environment Qt Creator.

Configuring and Building KVS

This client is built using original version of KVS, which is an improved version of the original KVS.

  • KVS library installation
    Execute the following command from the terminal to clone the KVS library for QTPBVR.

    git clone https://github.com/TO0603/KVS.git
    cd KVS
    git checkout main
    

    Edit KVS/kvs.conf as follows:

    #=============================================================================
    #  KVS enable/support flags
    #  $Id: kvs.conf 1525 2013-04-11 02:58:08Z [email protected] $
    #=============================================================================
    KVS_ENABLE_OPENGL                = 1
    KVS_ENABLE_GLU                   = 1
    KVS_ENABLE_GLEW                  = 0
    KVS_ENABLE_OPENMP                = 0
    KVS_ENABLE_DEPRECATED            = 0
    
    KVS_SUPPORT_CUDA                 = 0
    KVS_SUPPORT_GLUT                 = 1
    KVS_SUPPORT_GLFW                 = 0
    KVS_SUPPORT_FFMPEG               = 0
    KVS_SUPPORT_OPENCV               = 0
    KVS_SUPPORT_QT                   = 1
    KVS_SUPPORT_OPENXR               = 0
    KVS_SUPPORT_PYTHON               = 0
    KVS_SUPPORT_MPI                  = 0
    KVS_SUPPORT_EGL                  = 0
    KVS_SUPPORT_OSMESA               = 0
    KVS_SUPPORT_EXTENDED_FILE_FORMAT = 0 
    

    After editing, add the following command to "~/.zshrc".

    export KVS_DIR=<BASE_DIR>/KVS/install
    

    After appending, execute the following command to install.

    source ~/.zshrc
    make -j 16
    ~~Wait for the build to complete~~
    make install
    
  • QTPBVR build

Open the QTPBVR.pro under the 1. CS-IS-PBVR/QTPBVR/ directory with QtCreator.
If "Valid settings not found" is displayed when it opens, click the "OK" button. Check the "Qt 6.2.4 for macOS" kit on the project settings screen and click the "Configure Project" button. Local Image

  1. Switch the build setting to Release. Local Image

  2. Scroll down and make sure the environment variable KVS_DIR is set. If not, set it manually. Local Image

  3. Check the qtpbvr.conf settings from Edit. If you want to load the fbx and .3ds formats PBVR_SUPPORT_FBX set the PBVR_SUPPORT_3DS to 1 and enter the full path of the FBXSDK, Assimp library include, and lib directory. Local Image

  4. Right-click on the project and click "Run qmake". Local Image

  5. After qmake is complete, right-click on the project and click "Build". Local Image

  6. After the build is completed, make sure that you can execute QTPBVR with the play mark at the bottom left of the screen or Ctrl+R. Local Image

⚠️ **GitHub.com Fallback** ⚠️