Skip to content

Commit

Permalink
Merge branch 'release-1.0.x'
Browse files Browse the repository at this point in the history
Bruce Cherniak committed Feb 24, 2024
2 parents d2c83a6 + da370f7 commit 15f87e4
Showing 90 changed files with 18,902 additions and 13,887 deletions.
60 changes: 12 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
18 changes: 3 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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,33 +131,21 @@ 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
project: OSPRay Studio
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
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:<br>
- 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
<br><br>

- 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
16 changes: 15 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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")
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
15 changes: 12 additions & 3 deletions app/Batch.cpp
Original file line number Diff line number Diff line change
@@ -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()
26 changes: 7 additions & 19 deletions app/GUIContext.cpp
Original file line number Diff line number Diff line change
@@ -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<Texture2D>("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>("framebuffer");

optDisplayBuffer = whichBuffer;
optDisplayBufferInvert = invert;
optDisplayBufferInvert = invert && framebuffer.isFloatFormat();

// Only enabled if they exist
auto &framebuffer = frame->childAs<FrameBuffer>("framebuffer");
if (!framebuffer.hasDepthChannel())
optDisplayBuffer &= ~OSP_FB_DEPTH;
if (!framebuffer.hasAccumChannel())
4 changes: 3 additions & 1 deletion app/MainWindow.cpp
Original file line number Diff line number Diff line change
@@ -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);
}
Loading

0 comments on commit 15f87e4

Please sign in to comment.