diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 77f30a49..2fe637c0 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,6 +20,7 @@ concurrency:
jobs:
## Build Jobs ##
+
## Linux
build-centos8:
secrets: inherit
@@ -83,53 +84,22 @@ jobs:
artifact-out: build-rocky8-7
artifact-path: build
- ## Dev Build Jobs ##
- ## Linux
- cache-ospray-rocky8-7:
- secrets: inherit
- uses: ./.github/workflows/cache-ospray.yml
- with:
- image: rockylinux:8.7
- ospray-version: devel
- rkcommon-version: devel
-
- build-rocky8-7-dev:
- needs: cache-ospray-rocky8-7
- uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
- with:
- image: rockylinux:8.7
- cmd: |
- module load cmake/3.25.3
- module load intel/2022.1
- export CC=icx
- export CXX=icpx
- export CXXFLAGS="-fhonor-infinities -fhonor-nans"
- export CFLAGS=$CXXFLAGS
- export CACHE_DIR=${{ needs.cache-ospray-rocky8-7.outputs.cache-dir }}
- export OSPRAY_VER=${{ needs.cache-ospray-rocky8-7.outputs.ospray-version }}
- export CMAKE_PREFIX_PATH=$CACHE_DIR/ospray-$OSPRAY_VER/build/install
- export TBB_ROOT=$CACHE_DIR/ospray-$OSPRAY_VER/build/tbb/src/tbb
- cmake -L -S . -B build -DENABLE_OPENIMAGEIO=OFF -DENABLE_OPENVDB=OFF -DENABLE_EXR=OFF
- cmake --build build -- -j`nproc`
- artifact-path: build
- artifact-out: build-rocky8-7-dev
-
## MacOS
- build-macos-clang-dev:
+ build-macos-clang:
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/macos.yml@main
with:
cmd: |
- gitlab/macos-dev.sh
+ gitlab/macos.sh
artifact-out: build-macos
artifact-path: build-macos
## Windows
- build-windows-msvc15-dev:
+ build-windows-msvc15:
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/windows.yml@main
with:
cmd: |
$env:Python3_ROOT = "N:/packages/apps/python/3.9.7/windows"
- gitlab\win-dev.ps1
+ gitlab\win.ps1
artifact-out: build-windows
artifact-path: build-win
@@ -142,37 +112,31 @@ jobs:
cmake --build build-win-msvc16 --parallel $env:NUMBER_OF_PROCESSORS --config Release --target install
## Dev Test Jobs
- test-run-rocky8-7-dev:
- needs: build-rocky8-7-dev
+ test-run-rocky8-7:
+ needs: build-rocky8-7
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/docker.yml@main
with:
- # Run the rocky8-7-dev build on the ubuntu 18.04 image as a test, and because it has vncserver installed
+ # Run the rocky8-7 build on the ubuntu 18.04 image as a test, and because it has vncserver installed
image: rockylinux:8.7-tgt-rebuild
pre-cmd: yum -y install tigervnc-server mesa-libGLU
cmd: |
module load intel/2023.0
build/ospStudio --verify_install
- export CACHE_DIR=/NAS/ci-cache
- export OSPRAY_VER=devel
gitlab/run-dev.sh
gitlab/run-dev-img-cmp.sh
- artifact-in: build-rocky8-7-dev
+ artifact-in: build-rocky8-7
artifact-path: build/model-results build/cert-tests/*
- artifact-out: test-run-rocky8-7-dev
+ artifact-out: test-run-rocky8-7
artifact-on-failure: true
### Devel Coverity Job ###
static-analysis:
- needs: cache-ospray-rocky8-7
secrets: inherit
- uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/static_analysis.yml@main
+ #uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/static_analysis.yml@main
+ uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/static_analysis.yml@tgt/coverity_env
with:
project: OSPRay Studio
prebuild: >
module load cmake/3.25.3 &&
- export CACHE_DIR=${{ needs.cache-ospray-rocky8-7.outputs.cache-dir }} &&
- export OSPRAY_VER=${{ needs.cache-ospray-rocky8-7.outputs.ospray-version }} &&
- export CMAKE_PREFIX_PATH=$CACHE_DIR/ospray-$OSPRAY_VER/build/install/lib64/cmake/ospray-3.0.0 &&
- export TBB_ROOT=$CACHE_DIR/ospray-$OSPRAY_VER/build/tbb/src/tbb &&
cmake -L -S . -B build -DENABLE_OPENIMAGEIO=OFF -DENABLE_OPENVDB=OFF -DENABLE_EXR=OFF
build: cmake --build build
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 03e56616..7eb5b0bd 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -115,7 +115,7 @@ jobs:
with:
cmd: |
msiexec.exe /a (Get-ChildItem $env:GITHUB_WORKSPACE\build-win\package\*.msi | Select-Object -Expand FullName) /qn TARGETDIR=$env:GITHUB_WORKSPACE | Out-Null
- & $env:SIGN_FILE_WINDOWS -t $env:GITHUB_WORKSPACE\build-win\package\*.msi (Get-ChildItem "$env:GITHUB_WORKSPACE\Intel\OSPRay Studio v0\bin\*" | Select-Object -Expand FullName)
+ & $env:SIGN_FILE_WINDOWS -t $env:GITHUB_WORKSPACE\build-win\package\*.msi (Get-ChildItem "$env:GITHUB_WORKSPACE\Intel\OSPRay Studio*\bin\*" | Select-Object -Expand FullName)
artifact-in: release-windows
## macOS ##
@@ -131,22 +131,14 @@ jobs:
### Scan Jobs ###
- cache-ospray:
- secrets: inherit
- uses: ./.github/workflows/cache-ospray.yml
- with:
- image: rockylinux:8.7
- ospray-version: devel
- rkcommon-version: devel
-
composition-analysis:
secrets: inherit
uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/composition_analysis.yml@main
static-analysis:
- needs: cache-ospray
secrets: inherit
- uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/static_analysis.yml@main
+ #uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/static_analysis.yml@main
+ uses: intel-innersource/libraries.devops.renderkit.workflows/.github/workflows/static_analysis.yml@tgt/coverity_env
with:
coverity: true
image: rockylinux:8.7
@@ -154,10 +146,6 @@ jobs:
ignore-files: pysg.cpp
prebuild: >
module load cmake/3.25.3 &&
- export CACHE_DIR=${{ needs.cache-ospray.outputs.cache-dir }} &&
- export OSPRAY_VER=${{ needs.cache-ospray.outputs.ospray-version }} &&
- export CMAKE_PREFIX_PATH=$CACHE_DIR/ospray-$OSPRAY_VER/build/install &&
- export TBB_ROOT=$CACHE_DIR/ospray-$OSPRAY_VER/build/tbb/src/tbb &&
cmake -L -S . -B build -DENABLE_OPENIMAGEIO=OFF -DENABLE_OPENVDB=OFF -DENABLE_EXR=OFF &&
echo "Done: Configure OSPRay Studio"
build: cmake --build build
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2d9ca72d..c927765f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,59 @@
Version History
---------------
+### Changes in OSPRay Studio v1.0.0
+
+- Compatible with OSPRay release v3.1.0
+
+- Features and Improvements
+ - Add support for new OSPRay functionality:
+ - Principled and Luminous materials support emissive textures
+ - Add native support for disc and oriented disc geometry
+ - Add support for mirror repeat and clamp to edge texture wrap modes
+ - `OSPTextureWrapMode` supported on all textures
+ - glTF texture wrapping now fully supported
+ - Support frame buffer denoise and tonemapper on non-float buffer format
+
+ - Add more OSPRay material types to UI, supporting the rest of
+ the OSPRay material types and their default values.
+ - Support for both OpenEXR v2.x and v3.x APIs
+ - Detection of asynchronous file modifications for automatic
+ update HDRI and backplate textures.
+ - Enable plugins to access MainWindow class, re-enabling plugins to access
+ the ArcballCamera
+ - Enable MPI distributed rendering in Batch mode allowing ospStudio to utilize
+ OSPRay's MPI Distributed renderer in Batch mode
+
+
+- Cleanup and bug fixes:
+ - For Windows builds, add dependent load for dll injection security
+ - Graceful exit if command line parsing fails
+ - Fix support for 2D measured light intensity distribution
+ - Correctly set OBJ texture parameters in SciVis/AO and show OBJ colors in widget
+ - Fixed a long-standing bug in OBJ material loader. kd and ks textures were
+ loaded as linear format and not sRGB gamma encoded.
+ - Fix value scaling when displaying depth buffer
+ - Add helper code to enable loading of pre-OSPRayStudio v0.13 sg files
+ - Fix incorrect texture flip on load in UDIM and reuse
+
+- Update 3rd party dependencies
+ - Implicitly included in this repo:
+ - CLI11 v2.4.0 (github.com/CLIUtils/CLI11)
+ - dear imgui v1.90.2 WIP (docking branch) (github.com/ocornut/imgui)
+ - dirent v1.24 (github.com/tronkko/dirent)
+ - ImGuiFileDialog v0.6.6.1 (github.com/aiekick/ImGuiFileDialog)
+ - imGuIZMO.quat v3.0 (github.com/BrutPitt/imGuIZMO.quat)
+ - JSON for Modern C++ 3.11.3 (github.com/nlohmann/json)
+ - stb_image v2.29 (github.com/nothings/stb)
+ - tinydng v0.1.0 (github.com/syoyo/tinydng)
+ - tinyexr v1.0.7 (github.com/syoyo/tinyexr)
+ - tinygltf v2.8.20 (github.com/syoyo/tinygltf)
+ - tinyobjloader v2.0.0rc13 (github.com/tinyobjloader/tinyobjloader)
+ - via FetchContent:
+ - glfw v3.3.9 (github.com/glfw/glfw)
+ - pybind11 v2.11.1 (github.com/pybind/pybind11)
+ - draco v1.5.7 (github.com/google/draco)
+
### Changes in OSPRay Studio v0.13.0
- Compatible with OSPRay release v3.0.0
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 819a3490..cca5a1e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,7 +3,7 @@
cmake_minimum_required(VERSION 3.15)
-project(ospray_studio VERSION 0.13.0 LANGUAGES CXX C)
+project(ospray_studio VERSION 1.0.0 LANGUAGES CXX C)
include(GNUInstallDirs)
include(ProcessorCount)
@@ -55,6 +55,20 @@ else()
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CONFIGURATION_TYPES})
endif()
+## Add dependent load for Windows dll injection load security
+if (WIN32)
+ get_filename_component(COMPILER_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
+ if (COMPILER_NAME STREQUAL "icx" OR COMPILER_NAME STREQUAL "icpx")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /Qoption,link,/DEPENDENTLOADFLAG:0x2000")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /Qoption,link,/DEPENDENTLOADFLAG:0x2000")
+ elseif (MSVC)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEPENDENTLOADFLAG:0x2000")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEPENDENTLOADFLAG:0x2000")
+ else()
+ message(WARNING "Urecognized compiler, DEPENDENTLOADFLAG can't be set")
+ endif()
+endif()
+
## global options and variables
option(OSPRAY_INSTALL "Install OSPRay libraries in addition to OSPRay Studio libraries / binaries" ON)
set(OSPRAY_STUDIO_RESOURCE_FILE "${PROJECT_SOURCE_DIR}/resources/ospray_studio.rc")
diff --git a/README.md b/README.md
index 5bc08c33..1a8b110b 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# OSPRay Studio
-This is release v0.13.0 of Intel® OSPRay Studio. It is released under the
+This is release v1.0.0 of Intel® OSPRay Studio. It is released under the
Apache 2.0 license.
Visit [**OSPRay Studio**](http://www.ospray.org/ospray_studio)
@@ -72,28 +72,28 @@ listed in OS-specific building process below.
### Required dependencies
- [CMake](https://www.cmake.org) (v3.15+) and any C++14 compiler
-- Intel [OSPRay](https://www.github.com/ospray/ospray) (v3.0.0) and its
+- Intel [OSPRay](https://www.github.com/ospray/ospray) (v3.1.0) and its
dependencies - OSPRay Studio builds on top of OSPRay. Instructions on
building OSPRay are provided
[here](http://www.ospray.org/downloads.html#building-and-finding-ospray).
OSPRay and OSPRay Studio have the following common dependencies which Studio
can hence leverage from an OSPRay build.
- Intel oneAPI Rendering Toolkit common library
- [rkcommon](https://www.github.com/ospray/rkcommon) (v1.12.0)
+ [rkcommon](https://www.github.com/ospray/rkcommon) (v1.13.0)
- Intel [Threading Building Blocks](https://www.threadingbuildingblocks.org/)
-- OpenGL and [GLFW](https://www.glfw.org) (v3.3.8) - for the windowing environment
+- OpenGL and [GLFW](https://www.glfw.org) (v3.3.9) - for the windowing environment
### Optional Dependencies
-- Intel [Open Image Denoise](https://openimagedenoise.github.io) - (v2.0.0 or
+- Intel [Open Image Denoise](https://openimagedenoise.github.io) - (v2.2.0 or
newer) for denoising frames. To use with OSPRay Studio, OSPRay must be built
with `-DBUILD_OIDN=ON` in CMake.
- [OpenVDB](https://www.openvdb.org/) to support loading VDB formatted volume files.
- [OpenImageIO](http://openimageio.org/) and [OpenEXR](https://www.openexr.com/)
- (pre-3.x versions) to support images in a variety of file formats. Set `OPENIMAGEIO_ROOT`
+ (either v2.x or v3.x) to support images in a variety of file formats. Set `OPENIMAGEIO_ROOT`
and `OPENEXR_ROOT` to the respective install directories to use these libraries.
- (tested with OpenImageIO v2.3.16 and OpenEXR v2.5.8)
+ (tested with OpenImageIO v2.3.16 and OpenEXR v2.5.8 and v3.3.0)
- [Python] (3.9.7) (https://python.org) for python bindings
### Building on Linux and macOS
diff --git a/app/Batch.cpp b/app/Batch.cpp
index 3ff2605b..f6dbf417 100644
--- a/app/Batch.cpp
+++ b/app/Batch.cpp
@@ -63,6 +63,14 @@ void BatchContext::start()
cameraIdx = whichCamera;
if (parseCommandLine()) {
+ // If using MPI distributed, ensure mpiRaycast renderer is chosen.
+ if (sgUsingMpi()) {
+ if (optRendererTypeStr != "mpiRaycast") {
+ std::cerr << "Distributed rendering requires mpiRaycast renderer." << std::endl;
+ optRendererTypeStr = "mpiRaycast";
+ }
+ }
+
std::cout << "...importing files!" << std::endl;
loadCamJson();
@@ -235,14 +243,15 @@ bool BatchContext::parseCommandLine()
try {
app->parse(ac, av);
} catch (const CLI::ParseError &e) {
- exit(app->exit(e));
+ app->exit(e);
+ return false;
}
if (filesToImport.size() == 0) {
std::cout << "No files to import " << std::endl;
- return 0;
+ return false;
} else
- return 1;
+ return true;
}
void BatchContext::refreshRenderer()
diff --git a/app/GUIContext.cpp b/app/GUIContext.cpp
index 5753b541..36b28676 100644
--- a/app/GUIContext.cpp
+++ b/app/GUIContext.cpp
@@ -63,6 +63,7 @@ void GUIContext::start()
if (!mainWindow) {
mainWindow = new MainWindow(defaultSize, currentUtil);
mainWindow->initGLFW();
+ StudioContext::setMainWindow((void *)mainWindow);
}
// load plugins //
@@ -245,22 +246,7 @@ void GUIContext::refreshRenderer()
r["maxContribution"] = maxContribution;
// Re-add the backplate on renderer change
- if (backPlateTexture != "") {
- auto backplateTex =
- createNodeAs("map_backplate", "texture_2d");
- if (backplateTex->load(backPlateTexture, false, false))
- r.add(backplateTex);
- else {
- backplateTex = nullptr;
- backPlateTexture = "";
- }
- } else {
- // Node removal requires waiting on previous frame completion
- frame->cancelFrame();
- frame->waitOnFrame();
- r.remove("map_backplate");
- r.handle().removeParam("map_backplate");
- }
+ r["backplate_filename"] = backPlateTexture.str();
}
void GUIContext::saveRendererParams()
@@ -345,7 +331,8 @@ bool GUIContext::parseCommandLine()
try {
app->parse(ac, av);
} catch (const CLI::ParseError &e) {
- exit(app->exit(e));
+ app->exit(e);
+ return false;
}
// XXX: changing windowSize here messes causes some display scaling issues
@@ -616,11 +603,12 @@ void GUIContext::saveNodesJson(const std::string nodeTypeStr)
void GUIContext::selectBuffer(OSPFrameBufferChannel whichBuffer, bool invert)
{
+ auto &framebuffer = frame->childAs("framebuffer");
+
optDisplayBuffer = whichBuffer;
- optDisplayBufferInvert = invert;
+ optDisplayBufferInvert = invert && framebuffer.isFloatFormat();
// Only enabled if they exist
- auto &framebuffer = frame->childAs("framebuffer");
if (!framebuffer.hasDepthChannel())
optDisplayBuffer &= ~OSP_FB_DEPTH;
if (!framebuffer.hasAccumChannel())
diff --git a/app/MainWindow.cpp b/app/MainWindow.cpp
index a4f075bd..6956f66b 100644
--- a/app/MainWindow.cpp
+++ b/app/MainWindow.cpp
@@ -706,7 +706,9 @@ void MainWindow::display()
std::transform(depthCopy.begin(),
depthCopy.end(),
depthCopy.begin(),
- [&](float value) { return (value - minValue) * rcpRange; });
+ [&](float value) {
+ return isinf(value) ? 1.f : (value - minValue) * rcpRange;
+ });
bufferCopy = std::move(depthCopy);
}
diff --git a/app/WindowsBuilder.h b/app/WindowsBuilder.h
index 1ca95c30..7b8f063c 100644
--- a/app/WindowsBuilder.h
+++ b/app/WindowsBuilder.h
@@ -296,8 +296,8 @@ void WindowsBuilder::buildWindowFrameBufferEditor()
whichBuffer == OSP_FB_DEPTH))
whichBuffer = OSP_FB_DEPTH;
- ImGui::NewLine();
ImGui::SameLine();
+ ImGui::NewLine();
if (fb.hasPrimitiveIDChannel()
&& ImGui::RadioButton(
"PrimID##displayPrimID", whichBuffer == OSP_FB_ID_PRIMITIVE))
@@ -315,42 +315,42 @@ void WindowsBuilder::buildWindowFrameBufferEditor()
"InstanceID##displayInstID", whichBuffer == OSP_FB_ID_INSTANCE))
whichBuffer = OSP_FB_ID_INSTANCE;
+ ImGui::SameLine();
ImGui::NewLine();
- ImGui::Checkbox("Invert values##displayInverted", &invertBuffer);
-
if (!fb.isFloatFormat())
ImGui::TextColored(
ImVec4(.5f, .5f, .5f, 1.f), "Enable float format for more buffers");
}
- ctx->selectBuffer(whichBuffer, invertBuffer);
+ // Only float buffers will be inverted
+ ImGui::SameLine();
+ ImGui::NewLine();
+ if (fb.isFloatFormat())
+ ImGui::Checkbox("Invert values##displayInverted", &invertBuffer);
+
+ ctx->selectBuffer(whichBuffer, invertBuffer);
ImGui::Separator();
ImGui::Text("Post-processing");
- if (fb.isFloatFormat()) {
- ImGui::Checkbox("Tonemap", &ctx->frame->toneMapFB);
- ImGui::SameLine();
- ImGui::Checkbox("Tonemap nav", &ctx->frame->toneMapNavFB);
-
- if (ctx->studioCommon.denoiserAvailable) {
- ImGui::Checkbox("Denoise", &ctx->frame->denoiseFB);
- ImGui::SameLine();
- ImGui::Checkbox("Denoise nav", &ctx->frame->denoiseNavFB);
- }
- if (ctx->frame->denoiseFB || ctx->frame->denoiseNavFB) {
- ImGui::Checkbox("Denoise only PathTracer", &ctx->frame->denoiseOnlyPathTracer);
- ImGui::Checkbox("Denoise on final frame", &ctx->frame->denoiseFBFinalFrame);
- ImGui::SameLine();
- // Add accum here for convenience with final-frame denoising
- ImGui::SetNextItemWidth(5 * ImGui::GetFontSize());
- ImGui::DragInt(
- "Limit accumulation", &ctx->frame->accumLimit, 1, 0, INT_MAX, "%d frames");
- }
- } else {
- ImGui::TextColored(
- ImVec4(.5f, .5f, .5f, 1.f), "Enable float format for post-processing");
- }
+ ImGui::Checkbox("Tonemap", &ctx->frame->toneMapFB);
+ ImGui::SameLine();
+ ImGui::Checkbox("Tonemap nav", &ctx->frame->toneMapNavFB);
+
+ if (ctx->studioCommon.denoiserAvailable) {
+ ImGui::Checkbox("Denoise", &ctx->frame->denoiseFB);
+ ImGui::SameLine();
+ ImGui::Checkbox("Denoise nav", &ctx->frame->denoiseNavFB);
+ }
+ if (ctx->frame->denoiseFB || ctx->frame->denoiseNavFB) {
+ ImGui::Checkbox("Denoise only PathTracer", &ctx->frame->denoiseOnlyPathTracer);
+ ImGui::Checkbox("Denoise on final frame", &ctx->frame->denoiseFBFinalFrame);
+ ImGui::SameLine();
+ // Add accum here for convenience with final-frame denoising
+ ImGui::SetNextItemWidth(5 * ImGui::GetFontSize());
+ ImGui::DragInt(
+ "Limit accumulation", &ctx->frame->accumLimit, 1, 0, INT_MAX, "%d frames");
+ }
ImGui::Separator();
@@ -486,7 +486,7 @@ void WindowsBuilder::buildWindowKeyframes()
}
}
- if (ImGui::ListBoxHeader("##")) {
+ if (ImGui::BeginListBox("##")) {
for (int i = 0; i < cameraStack->size(); i++) {
if (ImGui::Selectable(
(std::to_string(i) + ": " + to_string(cameraStack->at(i))).c_str(),
@@ -496,7 +496,7 @@ void WindowsBuilder::buildWindowKeyframes()
ctx->updateCamera();
}
}
- ImGui::ListBoxFooter();
+ ImGui::EndListBox();
}
ImGui::End();
@@ -805,7 +805,10 @@ void WindowsBuilder::buildWindowTransferFunctionEditor()
range1f(0.f, 1.f),
"TransferFunctionEditor");
- if (ImGui::ListBoxHeader("##transferFunction", transferFunctions.size())) {
+ if (ImGui::BeginListBox("##transferFunction",
+ ImVec2(-FLT_MIN,
+ ImGui::GetTextLineHeightWithSpacing()
+ * transferFunctions.size()))) {
int i = 0;
for (auto t : transferFunctions) {
if (ImGui::Selectable(t.first.c_str(), (whichTFn == i))) {
@@ -834,7 +837,7 @@ void WindowsBuilder::buildWindowTransferFunctionEditor()
}
i++;
}
- ImGui::ListBoxFooter();
+ ImGui::EndListBox();
ImGui::Separator();
if (whichTFn != -1) {
diff --git a/app/ospStudio.cpp b/app/ospStudio.cpp
index bc5c385a..fb98e4ee 100644
--- a/app/ospStudio.cpp
+++ b/app/ospStudio.cpp
@@ -5,7 +5,6 @@
#include "Batch.h"
#include "GUIContext.h"
-#include "sg/Mpi.h"
// CLI
#include
@@ -64,12 +63,12 @@ void StudioContext::addToCommandLine(std::shared_ptr app)
"files",
filesToImport,
"The list of files to import"
- );
+ )->check(CLI::detail::ExistingFileValidator());
app->add_option(
- "reload assets",
+ "--reload",
optReloadAssets,
"reload asset file contents, rather than creating an instance"
- );
+ )->check(CLI::IsMember({true, false}));
app->add_option(
"--renderer",
optRendererTypeStr,
@@ -95,7 +94,7 @@ void StudioContext::addToCommandLine(std::shared_ptr app)
return true;
},
"Set the renderer background color"
- )->expected(4)->check(CLI::NonNegativeNumber);
+ )->expected(4)->check(CLI::NonNegativeNumber);
app->add_option(
"--pixelfilter",
optPF,
@@ -120,27 +119,27 @@ void StudioContext::addToCommandLine(std::shared_ptr app)
"--saveAlbedo",
optSaveAlbedo,
"Save albedo values"
- );
+ )->check(CLI::IsMember({true, false}));
app->add_flag(
"--saveDepth",
optSaveDepth,
"Save depth values"
- );
+ )->check(CLI::IsMember({true, false}));
app->add_flag(
"--saveNormal",
optSaveNormal,
"Save normal values"
- );
+ )->check(CLI::IsMember({true, false}));
app->add_flag(
"--saveLayers",
optSaveLayersSeparately,
"Save layers in separate files"
- );
+ )->check(CLI::IsMember({true, false}));
app->add_flag(
"--verboseImporter",
optVerboseImporter,
"Additional console info messages when importing files"
- );
+ )->check(CLI::IsMember({true, false}));
app->add_option(
"--resolution",
[&](const std::vector val) {
@@ -240,12 +239,12 @@ void StudioContext::addToCommandLine(std::shared_ptr app)
"--denoiser",
optDenoiser,
"Enable frame denoising"
- );
+ )->check(CLI::IsMember({true, false}));
app->add_flag(
"--denoiseFinalFrame",
optDenoiseFinalFrame,
"Denoise only when accum limit is reached"
- );
+ )->check(CLI::IsMember({true, false}));
app->add_option(
"--camera",
optCameraRange,
@@ -300,11 +299,28 @@ int main(int argc, const char *argv[])
{
std::cout << "OSPRay Studio" << std::endl;
- // Just look for either version or verify_install arguments, initializeOSPRay
- // will remove OSPRay specific args, parse fully down further
+ // Parse first argument as StudioMode
+ // (GUI is the default if no mode is given)
+ // XXX Switch to using ospcommon/rkcommon ArgumentList
+ auto mode = StudioMode::GUI;
+ if (argc > 1) {
+ auto modeArg = std::string(argv[1]);
+ if (modeArg.front() != '-') {
+ auto s = StudioModeMap.find(modeArg);
+ if (s != StudioModeMap.end()) {
+ mode = s->second;
+ // Remove mode argument
+ removeArgs(argc, argv, 1, 1);
+ }
+ }
+ }
+
+ // Look for either special arguments: version, verify_install, use_mpi and plugins, initializeOSPRay
+ // will remove OSPRay specific args. Other options will be parsed later
bool version = false;
bool verify_install = false;
bool use_mpi = false;
+ std::vector pluginsToLoad;
for (int i = 1; i < argc; i++) {
const auto arg = std::string(argv[i]);
if (arg == "--version") {
@@ -316,6 +332,11 @@ int main(int argc, const char *argv[])
} else if (arg == "--mpi") {
use_mpi = true;
removeArgs(argc, argv, i, 1);
+ } else if (arg == "--plugin" || arg == "-p") {
+ // Parse argument list for any plugins.
+ pluginsToLoad.emplace_back(argv[i + 1]);
+ removeArgs(argc, argv, i, 2);
+ --i;
}
}
@@ -327,22 +348,18 @@ int main(int argc, const char *argv[])
if (use_mpi) {
#ifdef USE_MPI
- use_mpi = ospLoadModule("mpi") == OSP_NO_ERROR;
- if (!use_mpi) {
+ if (mode != StudioMode::BATCH) {
std::cout
- << "Fatal: ospStudio launched with --mpi, but could not load the OSPRay MPI module."
- << std::endl;
+ << "Error: ospStudio distributed rendering currently only enabled for "
+ << "batch mode."
+ << std::endl;
return 1;
- } else {
- sgInitializeMPI(argc, argv);
- std::cout << "ospStudio --mpi, rank " << sgMpiRank() << "/"
- << sgMpiWorldSize() << "\n";
}
-
-#else // USE_MPI
+#else
std::cout
- << "Fatal: ospStudio launched with --mpi, but has not been compiled with MPI support."
- << std::endl;
+ << "Error: ospStudio launched with --mpi, but has not been compiled "
+ << "with MPI support."
+ << std::endl;
return 1;
#endif
}
@@ -368,33 +385,6 @@ int main(int argc, const char *argv[])
std::cout << "OpenImageDenoise is " << (denoiser ? "" : "not ") << "available"
<< std::endl;
- // Parse first argument as StudioMode
- // (GUI is the default if no mode is given)
- // XXX Switch to using ospcommon/rkcommon ArgumentList
- auto mode = StudioMode::GUI;
- std::vector pluginsToLoad;
- if (argc > 1) {
- auto modeArg = std::string(argv[1]);
- if (modeArg.front() != '-') {
- auto s = StudioModeMap.find(modeArg);
- if (s != StudioModeMap.end()) {
- mode = s->second;
- // Remove mode argument
- removeArgs(argc, argv, 1, 1);
- }
- }
-
- // Parse argument list for any plugins.
- for (int i = 1; i < argc; i++) {
- const auto arg = std::string(argv[i]);
- if (arg == "--plugin" || arg == "-p") {
- pluginsToLoad.emplace_back(argv[i + 1]);
- removeArgs(argc, argv, i, 2);
- --i;
- }
- }
- }
-
// Set parameters common to all modes
StudioCommon studioCommon(pluginsToLoad, denoiser, argc, argv);
studioCommon.splitPluginArguments();
@@ -419,11 +409,13 @@ int main(int argc, const char *argv[])
case StudioMode::HEADLESS:
std::cerr << "Headless mode\n";
break;
-#ifdef USE_BENCHMARK
case StudioMode::BENCHMARK:
+#ifdef USE_BENCHMARK
context = std::make_shared(studioCommon);
- break;
+#else
+ std::cerr << "Benchmark mode not enabled. Recompile with -DUSE_BENCHMARK=ON\n";
#endif
+ break;
default:
std::cerr << "unknown mode! How did I get here?!\n";
}
diff --git a/app/ospStudio.h b/app/ospStudio.h
index 0518dfc7..435e18bb 100644
--- a/app/ospStudio.h
+++ b/app/ospStudio.h
@@ -15,10 +15,12 @@
#include "sg/Scheduler.h"
#include "sg/renderer/MaterialRegistry.h"
#include "sg/scene/lights/LightsManager.h"
+#include "sg/Mpi.h"
// studio app
#include "AnimationManager.h"
// ospcommon
#include "rkcommon/common.h"
+#include "rkcommon/utility/getEnvVar.h"
#include "version.h"
@@ -29,7 +31,7 @@ class App;
}
using namespace ospray;
-using namespace rkcommon::math;
+using namespace rkcommon;
class PluginManager;
enum class StudioMode
@@ -37,9 +39,7 @@ enum class StudioMode
GUI,
BATCH,
HEADLESS,
-#ifdef USE_BENCHMARK
BENCHMARK,
-#endif
};
enum class OSPRayRendererType
@@ -58,9 +58,7 @@ const static std::map StudioModeMap = {
{"gui", StudioMode::GUI},
{"batch", StudioMode::BATCH},
{"server", StudioMode::HEADLESS},
-#ifdef USE_BENCHMARK
{"benchmark", StudioMode::BENCHMARK},
-#endif
};
const static std::map standardResolutionSizeMap = {
@@ -103,7 +101,7 @@ class StudioCommon
const char **plugin_argv{nullptr};
};
-using CameraMap = rkcommon::containers::FlatMap;
+using CameraMap = containers::FlatMap;
// abstract base class for all Studio modes
// XXX: should be merged with StudioCommon above
@@ -155,6 +153,13 @@ class StudioContext : public std::enable_shared_from_this
std::string outputFilename{""};
StudioMode mode;
+ void *ctxMainWindow{nullptr}; // Will be populated if in GUI mode
+ void setMainWindow(void *mainWindow) {
+ ctxMainWindow = mainWindow;
+ };
+ void *getMainWindow() {
+ return ctxMainWindow;
+ };
bool optReloadAssets{false};
bool optResetCameraOnLoad{true};
@@ -207,30 +212,9 @@ class StudioContext : public std::enable_shared_from_this
inline OSPError initializeOSPRay(int &argc, const char **argv, bool use_mpi)
{
- OSPDevice device;
-
- if (use_mpi) {
- // TODO: calling ospInit seems to be required,
- // even though the OSPRay MPI warns us not to do this...
- OSPError initError = ospInit(&argc, argv);
-
- if (initError != OSP_NO_ERROR) {
- std::cerr << "OSPRay not initialized correctly!" << std::endl;
- return initError;
- }
-
- device = ospGetCurrentDevice();
- if (!device) {
- std::cerr << "OSPRay device could not be fetched!" << std::endl;
- return OSP_UNKNOWN_ERROR;
- }
-
- // TODO: setErrorCallback and ospDeviceSetParam calls seem to break mpi.
- // Why?
- } else {
+ if (!use_mpi) {
// initialize OSPRay; OSPRay parses (and removes) its commandline
// parameters, e.g. "--osp:debug"
-
OSPError initError = ospInit(&argc, argv);
if (initError != OSP_NO_ERROR) {
@@ -238,13 +222,13 @@ inline OSPError initializeOSPRay(int &argc, const char **argv, bool use_mpi)
return initError;
}
- device = ospGetCurrentDevice();
-
+ OSPDevice device(ospGetCurrentDevice());
if (!device) {
std::cerr << "OSPRay device could not be fetched!" << std::endl;
return OSP_UNKNOWN_ERROR;
}
+ // TODO: setErrorCallback and ospDeviceSetParam calls seem to break mpi.
// set an error callback to catch any OSPRay errors
ospDeviceSetErrorCallback(
device,
@@ -261,10 +245,51 @@ inline OSPError initializeOSPRay(int &argc, const char **argv, bool use_mpi)
ospDeviceSetParam(device, "warnAsError", OSP_BOOL, &warnAsErrors);
ospDeviceSetParam(device, "logLevel", OSP_INT, &logLevel);
- }
- ospDeviceCommit(device);
- ospDeviceRelease(device);
+ ospDeviceCommit(device);
+ ospDeviceRelease(device);
+
+ } else {
+ //
+ // MPI Distributed
+ //
+
+ // Initialize MPI and set rank and world size in sg
+ sg::sgInitializeMPI(argc, argv);
+ std::cout << "ospStudio --mpi, rank " << sg::sgMpiRank() << "/"
+ << sg::sgMpiWorldSize() << "\n";
+
+ // load the MPI module, and select the MPI distributed device. Here we
+ // do not call ospInit, as we want to explicitly pick the distributed
+ // device
+ auto OSPRAY_MPI_DISTRIBUTED_GPU =
+ utility::getEnvVar("OSPRAY_MPI_DISTRIBUTED_GPU").value_or(0);
+
+ auto mpiModuleName = OSPRAY_MPI_DISTRIBUTED_GPU ? "mpi_distributed_gpu"
+ : "mpi_distributed_cpu";
+ std::cout << "Loading OSPRay Module: " << mpiModuleName;
+
+ use_mpi = ospLoadModule(mpiModuleName) == OSP_NO_ERROR;
+ if (!use_mpi) {
+ std::cout
+ << "Fatal: ospStudio launched with --mpi, but could not load the OSPRay MPI module."
+ << std::endl;
+ return OSP_UNKNOWN_ERROR;
+ }
+
+ cpp::Device mpiDevice("mpiDistributed");
+ mpiDevice.commit();
+ mpiDevice.setCurrent();
+
+ // set an error callback to catch any OSPRay errors and exit the application
+ ospDeviceSetErrorCallback(
+ mpiDevice.handle(),
+ [](void *, OSPError error, const char *errorDetails) {
+ std::cerr << "OSPRay error: " << errorDetails << std::endl;
+ exit(error);
+ },
+ nullptr);
+ }
return OSP_NO_ERROR;
}
diff --git a/app/widgets/AdvancedMaterialEditor.cpp b/app/widgets/AdvancedMaterialEditor.cpp
index ac84eb17..bdbff8f9 100644
--- a/app/widgets/AdvancedMaterialEditor.cpp
+++ b/app/widgets/AdvancedMaterialEditor.cpp
@@ -17,6 +17,7 @@
#include
+using namespace ospray::sg;
using namespace rkcommon::math;
void AdvancedMaterialEditor::buildUI(
@@ -45,10 +46,22 @@ void AdvancedMaterialEditor::buildUI(
ImGui::Spacing();
ImGui::Text("Replace material");
static int currentMatType = 0;
- const char *matTypes[] = {"principled", "carPaint", "obj", "luminous"};
- ImGui::Combo("Material types", ¤tMatType, matTypes, 4);
+ const char *matTypes[] = {"alloy",
+ "carPaint",
+ "glass",
+ "luminous",
+ "metal",
+ "metallicPaint",
+ // "mix", Mix needs pointers to two existing materials and a blend factor
+ "obj",
+ "plastic",
+ "principled",
+ "thinGlass",
+ "velvet"};
+ constexpr int numMatTypes = sizeof(matTypes) >> 3;
+ ImGui::Combo("Material types", ¤tMatType, matTypes, numMatTypes);
if (ImGui::Button("Replace##material")) {
- auto newMat = ospray::sg::createNode(matName, matTypes[currentMatType]);
+ auto newMat = createNode(matName, matTypes[currentMatType]);
materialRegistry->add(newMat);
}
@@ -80,11 +93,17 @@ void AdvancedMaterialEditor::buildUI(
if (ImGui::Button("Add##materialtexture")) {
std::string paramStr(matTexParamName);
if (!paramStr.empty()) {
- std::shared_ptr sgTex =
- std::static_pointer_cast(
- ospray::sg::createNode(paramStr, "texture_2d"));
+ // color textures are typically sRGB gamma encoded, others prefer linear
+ // texture format may override this preference
+ bool preferLinear = paramStr.find("Color") == paramStr.npos
+ && paramStr.find("kd") == paramStr.npos
+ && paramStr.find("ks") == paramStr.npos;
+
+ auto sgTex = createNodeAs(paramStr, "texture_2d");
+ // Set parameters affecting texture load and usage
+ sgTex->samplerParams.preferLinear = preferLinear;
// If load fails, remove the texture node
- if (!sgTex->load(matTexFileName, true, false))
+ if (!sgTex->load(matTexFileName))
sgTex = nullptr;
else {
auto newMat = copyMaterial(selectedMat, "", paramStr);
diff --git a/app/widgets/FileBrowserWidget.cpp b/app/widgets/FileBrowserWidget.cpp
index 0487d9e5..9933beac 100644
--- a/app/widgets/FileBrowserWidget.cpp
+++ b/app/widgets/FileBrowserWidget.cpp
@@ -29,17 +29,15 @@ bool fileBrowser(FileList &fileList,
ImVec2 maxSize = ImGui::GetIO().DisplaySize;
ImVec2 minSize(maxSize.x * 0.5, maxSize.y * 0.5);
- auto fd = ImGuiFileDialog::Instance();
+ // Allow multiple selections if requested (pass 0 as the countSelectionMax)
+ IGFD::FileDialogConfig fdConfig{};
+ fdConfig.path = defaultPath;
+ fdConfig.fileName = "";
+ fdConfig.countSelectionMax = allowMultipleSelection ? 0 : 1;
+ fdConfig.flags = ImGuiFileDialogFlags_Modal;
- // Allow multiple selections if requested (pass 0 as the vCountSelectionMax)
- fd->OpenDialog(prompt.c_str(),
- prompt.c_str(),
- filters.c_str(),
- defaultPath,
- "",
- allowMultipleSelection ? 0 : 1,
- nullptr,
- ImGuiFileDialogFlags_Modal);
+ auto fd = ImGuiFileDialog::Instance();
+ fd->OpenDialog(prompt.c_str(), prompt.c_str(), filters.c_str(), fdConfig);
if (fd->Display(
prompt.c_str(), ImGuiWindowFlags_NoCollapse, minSize, maxSize)) {
diff --git a/app/widgets/GenerateImGuiWidgets.h b/app/widgets/GenerateImGuiWidgets.h
index d96ec3ba..8b74b6ad 100644
--- a/app/widgets/GenerateImGuiWidgets.h
+++ b/app/widgets/GenerateImGuiWidgets.h
@@ -138,9 +138,11 @@ inline bool generateWidget_float(const std::string &title, Node &node)
return false;
}
+template
inline bool generateWidget_vec2i(const std::string &title, Node &node)
{
- vec2i v = node.valueAs();
+ using v2T = vec_t;
+ vec2i v = node.valueAs();
if (node.readOnly()) {
ImGui::Text("%s",
@@ -151,10 +153,10 @@ inline bool generateWidget_vec2i(const std::string &title, Node &node)
}
if (node.hasMinMax()) {
- const int min = node.minAs();
- const int max = node.maxAs();
+ const int min = node.minAs();
+ const int max = node.maxAs();
if (ImGui::SliderInt2(title.c_str(), v, min, max)) {
- node.setValue(v);
+ node.setValue(v2T(v));
return true;
}
} else {
@@ -564,7 +566,8 @@ static std::map widgetGenerators = {
{"uint32_t", generateWidget_int},
{"long", generateWidget_int},
{"float", generateWidget_float},
- {"vec2i", generateWidget_vec2i},
+ {"vec2i", generateWidget_vec2i},
+ {"vec2ui", generateWidget_vec2i},
{"vec2f", generateWidget_vec2f},
{"vec3i", generateWidget_vec3i},
{"vec3f", generateWidget_vec3f},
@@ -578,6 +581,7 @@ static std::map widgetGenerators = {
{"quaternionf", generateWidget_quaternionf},
{"string", generateWidget_string},
{"filename", generateWidget_filename},
+ {"fileWatcher", generateWidget_bool},
// OSPRay Enum types
{"OSPAMRMethod", generateWidget_int},
@@ -592,10 +596,12 @@ static std::map widgetGenerators = {
{"OSPLogLevel", generateWidget_int},
{"OSPPixelFilterType", generateWidget_int},
{"OSPShutterType", generateWidget_int},
+ {"OSPSphereType", generateWidget_int},
{"OSPStereoMode", generateWidget_int},
{"OSPSubdivisionMode", generateWidget_int},
{"OSPSyncEvent", generateWidget_int},
{"OSPTextureFilter", generateWidget_int},
+ {"OSPTextureWrapMode", generateWidget_int},
{"OSPTextureFormat", generateWidget_int},
{"OSPUnstructuredCellType", generateWidget_int},
{"OSPVolumeFilter", generateWidget_int},
diff --git a/cmake/draco.cmake b/cmake/draco.cmake
index 1ade66aa..8d6bc67b 100644
--- a/cmake/draco.cmake
+++ b/cmake/draco.cmake
@@ -6,7 +6,7 @@
##
if(NOT DEFINED DRACO_VERSION)
- set(DRACO_VERSION 1.5.6)
+ set(DRACO_VERSION 1.5.7)
endif()
##
@@ -27,7 +27,7 @@ if(NOT "${draco_FOUND}")
# Hide advanced options from main CMake list
mark_as_advanced(DRACO_FAST)
- mark_as_advanced(DRACO_GLTF)
+ mark_as_advanced(DRACO_GLTF_BITSTREAM)
mark_as_advanced(DRACO_ANIMATION_ENCODING)
mark_as_advanced(DRACO_BACKWARDS_COMPATIBILITY)
mark_as_advanced(DRACO_DECODER_ATTRIBUTE_DEDUPLICATION)
@@ -45,10 +45,10 @@ if(NOT "${draco_FOUND}")
mark_as_advanced(DRACO_DEBUG_GLTF_BITSTREAM)
mark_as_advanced(DRACO_TRANSCODER_SUPPORTED)
- # draco needs to be build position independent to link with ospray_sg
+ # draco needs to be built position independent to link with ospray_sg
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(DRACO_FAST ON)
- set(DRACO_GLTF ON)
+ set(DRACO_GLTF_BITSTREAM ON)
set(DRACO_ANIMATION_ENCODING ON)
set(DRACO_JS_GLUE OFF)
diff --git a/cmake/glfw.cmake b/cmake/glfw.cmake
index c6200f1d..0dbc76e1 100644
--- a/cmake/glfw.cmake
+++ b/cmake/glfw.cmake
@@ -6,7 +6,7 @@ if(glfw3_FOUND)
endif()
if(NOT DEFINED GLFW_VERSION)
- set(GLFW_VERSION 3.3.8)
+ set(GLFW_VERSION 3.3.9)
endif()
## Look for any available version
diff --git a/cmake/glfw.patch b/cmake/glfw.patch
index d2f58d7c..929fd816 100644
--- a/cmake/glfw.patch
+++ b/cmake/glfw.patch
@@ -1,15 +1,3 @@
-From 8dfd5804447a1f35c15e650737fee3694bc71f26 Mon Sep 17 00:00:00 2001
-From: Florian Reibold
-Date: Mon, 6 Feb 2023 17:29:44 +0100
-Subject: [PATCH] fix LoadLibraryA
-
----
- src/null_platform.h | 2 +-
- src/wgl_context.c | 2 +-
- src/win32_init.c | 12 ++++++------
- src/win32_platform.h | 2 +-
- 4 files changed, 9 insertions(+), 9 deletions(-)
-
diff --git a/src/null_platform.h b/src/null_platform.h
index 708975d1..d916b922 100644
--- a/src/null_platform.h
@@ -24,10 +12,10 @@ index 708975d1..d916b922 100644
#define _glfw_dlsym(handle, name) GetProcAddress((HMODULE) handle, name)
#else
diff --git a/src/wgl_context.c b/src/wgl_context.c
-index 72ad11de..5c42fa81 100644
+index eebf6cd5..8a72d676 100644
--- a/src/wgl_context.c
+++ b/src/wgl_context.c
-@@ -416,7 +416,7 @@ GLFWbool _glfwInitWGL(void)
+@@ -405,7 +405,7 @@ GLFWbool _glfwInitWGL(void)
if (_glfw.wgl.instance)
return GLFW_TRUE;
@@ -95,7 +83,7 @@ index 885f32fa..5e698cc2 100644
{
_glfw.win32.ntdll.RtlVerifyVersionInfo_ = (PFN_RtlVerifyVersionInfo)
diff --git a/src/win32_platform.h b/src/win32_platform.h
-index bf703d7e..55b8425b 100644
+index e729709f..4a7d8068 100644
--- a/src/win32_platform.h
+++ b/src/win32_platform.h
@@ -289,7 +289,7 @@ typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(
@@ -107,6 +95,3 @@ index bf703d7e..55b8425b 100644
#define _glfw_dlclose(handle) FreeLibrary((HMODULE) handle)
#define _glfw_dlsym(handle, name) GetProcAddress((HMODULE) handle, name)
---
-2.38.1.windows.1
-
diff --git a/cmake/openexr.cmake b/cmake/openexr.cmake
index 8525613a..230fbf20 100644
--- a/cmake/openexr.cmake
+++ b/cmake/openexr.cmake
@@ -1,8 +1,36 @@
## Copyright 2020 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
-if(OPENEXR_FOUND)
+if(OpenEXR_FOUND)
return()
endif()
-find_package(OpenEXR 2 REQUIRED)
+# Find package installed OpenEXR (v2.x or v3.x)
+# Imath indicates OpenEXR 3.x
+message(STATUS "Looking for package Imath.")
+find_package(Imath CONFIG)
+if (NOT TARGET Imath::Imath)
+ # Couldn't find Imath::Imath, find IlmBase (OpenEXR 2.x)
+ set(_ASSUME_VERSION 2)
+ message(STATUS "Could not find target Imath::Imath, likely OpenEXR 2.x.")
+ message(STATUS "Looking for package IlmBase")
+ find_package(IlmBase CONFIG)
+ if (NOT TARGET IlmBase_FOUND)
+ message(STATUS "Could not find IlmBase")
+ endif ()
+else ()
+ message(STATUS "Found target Imath::Imath, likely OpenEXR 3.x.")
+ set(_ASSUME_VERSION 3)
+endif ()
+
+message(STATUS "Looking for package OpenEXR, required version ${_ASSUME_VERSION}")
+
+find_package(OpenEXR ${_ASSUME_VERSION} CONFIG REQUIRED)
+
+if(OpenEXR_FOUND)
+ message(STATUS "Found OpenEXR ${_ASSUME_VERSION}.x")
+else()
+ message(STATUS "Could not find OpenEXR ${_ASSUME_VERSION}.x")
+endif ()
+
+unset(_ASSUME_VERSION)
diff --git a/cmake/ospray.cmake b/cmake/ospray.cmake
index 32528845..e625e9fd 100644
--- a/cmake/ospray.cmake
+++ b/cmake/ospray.cmake
@@ -10,24 +10,49 @@ message(STATUS "Looking for OSPRay...")
find_package(ospray QUIET)
if(NOT DEFINED OSPRAY_VERSION)
- set(OSPRAY_VERSION 3.0.0)
+ set(OSPRAY_VERSION 3.1.0)
endif()
if(ospray_FOUND)
message(STATUS "Found OSPRay")
else()
+
+ message(STATUS "OSPRay package not found...")
+
## Download and build if not found
if(WIN32)
set(_ARCHIVE_EXT "windows.zip")
- set(OSPRAY_TAG ".sycl")
elseif(APPLE)
set(_ARCHIVE_EXT "macosx.zip")
else()
set(_ARCHIVE_EXT "linux.tar.gz")
endif()
+ set(_FILENAME "ospray-${OSPRAY_VERSION}.x86_64.${_ARCHIVE_EXT}")
+
+ message(STATUS "Looking for ${_FILENAME}")
+
+ # If a nightly build exists of requested version, use that. Otherwise pull
+ # release version from github.
+ if(DEFINED ENV{STORAGE_PATH})
+ file(TO_CMAKE_PATH "$ENV{STORAGE_PATH}" STORAGE_PATH)
+ set(_NIGHTLIES_DIR "${STORAGE_PATH}/packages/renderkit/")
+ set(_LOCAL_FILE "${_NIGHTLIES_DIR}/${_FILENAME}")
+ message(STATUS "Checking ${_NIGHTLIES_DIR} for nightly ${_LOCAL_FILE}")
+ file(GLOB _nightly_build_files ${_NIGHTLIES_DIR}/*.${_ARCHIVE_EXT})
+ foreach(_file ${_nightly_build_files})
+ message(STATUS " - ${_file}")
+ endforeach()
+ if(EXISTS "${_LOCAL_FILE}")
+ message(STATUS "Using OSPRay nightly build")
+ set(OSPRAY_URL "${_LOCAL_FILE}")
+ else()
+ message(STATUS "OSPRay nightly build not found")
+ endif()
+ endif()
+
if(NOT DEFINED OSPRAY_URL)
- set(OSPRAY_URL "https://github.com/ospray/ospray/releases/download/v${OSPRAY_VERSION}/ospray-${OSPRAY_VERSION}${OSPRAY_TAG}.x86_64.${_ARCHIVE_EXT}")
+ set(OSPRAY_URL "https://github.com/ospray/ospray/releases/download/v${OSPRAY_VERSION}/${_FILENAME}")
endif()
include(FetchContent)
diff --git a/cmake/package.cmake b/cmake/package.cmake
index e8ca4041..d5c7ce22 100644
--- a/cmake/package.cmake
+++ b/cmake/package.cmake
@@ -63,8 +63,7 @@ if (WIN32) # Windows specific settings
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Intel\\\\OSPRay Studio v${PROJECT_VERSION_MAJOR}")
math(EXPR _VERSION_NUMBER "10000*${PROJECT_VERSION_MAJOR} + 100*${PROJECT_VERSION_MINOR} + ${PROJECT_VERSION_PATCH}")
- # XXX Added a 0 before ${_VERSION_NUMBER} until PROJECT_VERSION_MAJOR > 0
- set(CPACK_WIX_PRODUCT_GUID "F71844B9-31BF-4B28-A7B1-5206AB20${_VERSION_NUMBER}")
+ set(CPACK_WIX_PRODUCT_GUID "F71844B9-31BF-4B28-A7B1-5206AB2${_VERSION_NUMBER}")
set(CPACK_WIX_UPGRADE_GUID "F71844B9-31BF-4B28-A7B1-5206AB2${PROJECT_VERSION_MAJOR}0000") # upgrade as long as major version is the same
set(CPACK_WIX_CMAKE_PACKAGE_REGISTRY TRUE)
endif()
diff --git a/cmake/pybind11.cmake b/cmake/pybind11.cmake
index abdcce3d..68b4ff9f 100644
--- a/cmake/pybind11.cmake
+++ b/cmake/pybind11.cmake
@@ -6,7 +6,7 @@
##
if(NOT DEFINED PYBIND11_VERSION)
- set(PYBIND11_VERSION 2.10.3)
+ set(PYBIND11_VERSION 2.11.1)
endif()
##
diff --git a/cmake/rkcommon.cmake b/cmake/rkcommon.cmake
index 6a5e24ca..1589f407 100644
--- a/cmake/rkcommon.cmake
+++ b/cmake/rkcommon.cmake
@@ -13,7 +13,7 @@ message(STATUS "Looking for rkcommon...")
find_package(rkcommon QUIET)
if(NOT DEFINED RKCOMMON_VERSION)
- set(RKCOMMON_VERSION 1.12.0)
+ set(RKCOMMON_VERSION 1.13.0)
endif()
if(rkcommon_FOUND)
diff --git a/cmake/tbb.cmake b/cmake/tbb.cmake
index 1270ed10..bd6d063e 100644
--- a/cmake/tbb.cmake
+++ b/cmake/tbb.cmake
@@ -6,7 +6,7 @@ if(TBB_FOUND)
endif()
if(NOT DEFINED TBB_VERSION)
- set(TBB_VERSION 2021.10.0)
+ set(TBB_VERSION 2021.11.0)
endif()
option(FORCE_TBB_VERSION "Force CMake to find ${TBB_VERSION} (typically for compatibility with pre-built OSPRay)" OFF)
diff --git a/external/cli11/CLI11.hpp b/external/cli11/CLI11.hpp
index 3913fa9c..02b9e0b6 100644
--- a/external/cli11/CLI11.hpp
+++ b/external/cli11/CLI11.hpp
@@ -1,11 +1,11 @@
-// CLI11: Version 2.3.2
+// CLI11: Version 2.4.0
// Originally designed by Henry Schreiner
// https://github.com/CLIUtils/CLI11
//
// This is a standalone header file generated by MakeSingleHeader.py in CLI11/scripts
-// from: v2.3.2
+// from: v2.4.0
//
-// CLI11 2.3.2 Copyright (c) 2017-2022 University of Cincinnati, developed by Henry
+// CLI11 2.4.0 Copyright (c) 2017-2024 University of Cincinnati, developed by Henry
// Schreiner under NSF AWARD 1414736. All rights reserved.
//
// Redistribution and use in source and binary forms of CLI11, with or without
@@ -34,34 +34,40 @@
#pragma once
// Standard combined includes:
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
#include
+#include
#include
#include
-#include
+#include
+#include
+#include