PBRT Getting Started
First time use WSL?
sudo apt update sudo apt install build-essential sudo apt install cmake
To compile PBRT v3, run the following commands:
git clone --recursive https://github.com/mmp/pbrt-v3/
cd pbrt-v3
mkdir build
cd build
cmake ../
make -jBashTo compile PBRT v4, run the following commands:
git clone --recursive https://github.com/mmp/pbrt-v4/
cd pbrt-v4
mkdir build
cd build
cmake ../
make -jBash(Options) After compiling both versions, you can create symbols links for easier access from terminal.
sudo ln -s /[your-pbrt-v4-PATH]/build/pbrt /usr/local/bin/pbrt4
sudo ln -s /[your-pbrt-v3-PATH]/build/pbrt /usr/local/bin/pbrt3BashNotice: You need to change the PATH above.
If you wanna delete the links, type:
Bashsudo rm /usr/local/bin/pbrt4 sudo rm /usr/local/bin/pbrt3
Some Problem when building pbrt-v4 cmake files:
Error Log:
Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY
OPENGL_INCLUDE_DIR)
Call Stack (most recent call first):
You need to download the OpenGL Lib:
sudo apt update
sudo apt install -y \
mesa-utils \
libgl1-mesa-dev \
libglu1-mesa-dev \
freeglut3-dev \
xorg-devBashError Log:
CMake Error at src/ext/glfw/src/CMakeLists.txt:76 (message):
Failed to find wayland-scanner
Lack wayland-scanner tool when cmake building GLFW, run following command:
sudo apt update
sudo apt install -y \
wayland-protocols \
libwayland-devBashError Log:
CMake Error at /home/linuxbrew/.linuxbrew/share/cmake/Modules/FindPkgConfig.cmake:645 (message):
The following required packages were not found:
- xkbcommon>=0.5.0
Need download Wayland:
sudo apt update
sudo apt install -y \
libxkbcommon-devBashError Log:
CMake Error at /usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:659 (message):
pkg-config tool not found
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:825 (_pkg_check_modules_internal)
src/ext/glfw/src/CMakeLists.txt:163 (pkg_check_modules)
…
CMake Error at src/ext/glfw/src/CMakeLists.txt:186 (message):
RandR headers not found; install libxrandr development package
sudo apt-get install xorg-dev libglu1-mesa-devJavaScriptError Log:
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY
OPENGL_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.22/Modules/FindOpenGL.cmake:443 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:85 (find_package)
sudo apt-get install libgl1-mesa-devJavaScriptImath was not found?
sudo apt install libimath-3-1-29t64Warnning Log:
CMake Warning at CMakeLists.txt:200 (message):
Found CUDA but PBRT_OPTIX7_PATH is not set. Disabling GPU compilation.
Optix doesn’t support WSL2 yet.
Go optix link , download the file.
Maybe you got the file named: “NVIDIA-OptiX-SDK-8.1.0-linux64-x86_64-35015278.sh”. (Change the name Remember)
Then, ensure the .sh file has executable permissions:
chmod +x NVIDIA-OptiX-SDK-8.1.0-linux64-x86_64-35015278.shBashExecute the installer script:
sudo ./NVIDIA-OptiX-SDK-8.1.0-linux64-x86_64-35015278.shBashpress y to accept the license:
Log:
Do you accept the license? [yn]:
y
By default the NVIDIA OptiX will be installed in:
“/home/remo-wsl/NVIDIA-OptiX-SDK-8.1.0-linux64-x86_64”
Do you want to include the subdirectory NVIDIA-OptiX-SDK-8.1.0-linux64-x86_64?
Saying no will install in: “/home/remo-wsl” [Yn]:
yUsing target directory: /home/remo-wsl/NVIDIA-OptiX-SDK-8.1.0-linux64-x86_64
Extracting, please wait…Unpacking finished successfully
Set the Environment Variable After Installation (Remember Change The File Name) :
export PBRT_OPTIX7_PATH=/home/remo-wsl/NVIDIA-OptiX-SDK-8.1.0-linux64-x86_64BashTo make it permanent, add it to your .bashrc:
echo 'export PBRT_OPTIX7_PATH=/home/remo-wsl/NVIDIA-OptiX-SDK-8.1.0-linux64-x86_64' >> ~/.bashrc
source ~/.bashrcBashFinally, back to the pbrt-v4 PATH:
rm -rf build
mkdir build
cd build
cmake .. -DPBRT_OPTIX7_PATH=/home/remo-wsl/NVIDIA-OptiX-SDK-8.1.0-linux64-x86_64
make -j$(nproc)BashMitsuba 3 Getting Started
Requirements
Python >= 3.8- (optional) For computation on the GPU:
NVidia driver >= 495.89 - (optional) For vectorized / parallel computation on the CPU:
LLVM >= 11.1
The following command leads you to intall both Mitsuba 3 and JIT (If your system not already available. )
pip install mitsubaBash
发表回复