### OspRay Rendering Examples Source: https://github.com/renderkit/ospray/blob/devel/doc/images.md Visual examples demonstrating various rendering scenarios and features within the OspRay framework. These include different lighting conditions, camera setups, and material applications. ```APIDOC Image: tutorial_firstframe.png Description: First frame of a tutorial rendering. ``` ```APIDOC Image: tutorial_accumulatedframe.png Description: Accumulated frame in a tutorial rendering. ``` ```APIDOC Image: renderSunSky.png Description: Rendering with Sun Sky lighting. { width=90% } ``` ```APIDOC Image: ospExamples.png Description: General examples of OspRay rendering capabilities. { width=90% } ``` ```APIDOC Image: ospMPIDistribTutorial_firstFrame.jpg Description: First frame of an MPI distributed rendering tutorial. { width=60% } ``` ```APIDOC Image: ospMPIDistribTutorial_accumulatedFrame.jpg Description: Accumulated frame of an MPI distributed rendering tutorial. { width=60% } ``` ```APIDOC Image: ospMPIDistribTutorialSpheres.jpg Description: MPI distributed rendering tutorial showcasing spheres. { width=60% } ``` ```APIDOC Image: ospMPIDistribTutorialVolume.jpg Description: MPI distributed rendering tutorial showcasing volumes. { width=60% } ``` ```APIDOC Image: c-gamma_coords.fig Description: Coordinate system visualization for C-Gamma. { width=60% } ``` ```APIDOC Image: spot_light.fig Description: Visualization of a spot light. { width=60% } ``` ```APIDOC Image: quad_light.fig Description: Visualization of a quad light. { width=60% } ``` ```APIDOC Image: hdri_light.fig Description: Visualization of an HDRI light. { width=60% } ``` ```APIDOC Image: camera_perspective.jpg Description: Rendering with a perspective camera. { width=60% } ``` ```APIDOC Image: camera_architectural.jpg Description: Rendering with an architectural camera. { width=60% } ``` ```APIDOC Image: camera_stereo.jpg Description: Rendering with a stereo camera setup. { width=90% } ``` ```APIDOC Image: camera_orthographic.jpg Description: Rendering with an orthographic camera. { width=60% } ``` ```APIDOC Image: camera_panoramic.jpg Description: Rendering with a panoramic camera. { width=90% } ``` ```APIDOC Image: diffuse_rooms.png Description: Rendering of diffuse rooms. { width=80% } ``` ```APIDOC Image: normalmap_frustum.png Description: Rendering demonstrating normal mapping within a frustum. { width=60% } ``` ```APIDOC Image: material_OBJ.jpg Description: Rendering of a material exported from OBJ format. { width=60% } ``` ```APIDOC Image: material_Principled.jpg Description: Rendering of a principled material. { width=60% } ``` ```APIDOC Image: material_CarPaint.jpg Description: Rendering of a car paint material. { width=60% } ``` ```APIDOC Image: material_Metal.jpg Description: Rendering of a metallic material. { width=60% } ``` ```APIDOC Image: material_Alloy.jpg Description: Rendering of an alloy material. { width=60% } ``` ```APIDOC Image: material_Glass.jpg Description: Rendering of a glass material. { width=60% } ``` ```APIDOC Image: material_ThinGlass.jpg Description: Rendering of a thin glass material. { width=60% } ``` ```APIDOC Image: material_MetallicPaint.jpg Description: Rendering of a metallic paint material. { width=60% } ``` ```APIDOC Image: material_Luminous.jpg Description: Rendering of a luminous material. { width=60% } ``` ```APIDOC Image: ColoredWindow.jpg Description: Rendering of a colored window. { width=60% } ``` ```APIDOC Image: structured_spherical_coords.svg Description: Visualization of structured spherical coordinates. { width=60% } ``` ```APIDOC Image: vdb_structure.svg Description: Visualization of VDB structure. { width=80% } ``` ```APIDOC Image: shadowcatcher.jpg Description: Rendering with shadow catcher enabled. { width=80% } ``` ```APIDOC Image: shadowcatcher_envonly.jpg Description: Rendering with shadow catcher enabled, environment only. { width=80% } ``` ```APIDOC Image: shadowcatcher_alpha.png Description: Rendering with shadow catcher, showing alpha channel. { width=80% } ``` -------------------------------- ### Download OSPRay Binaries Source: https://github.com/renderkit/ospray/blob/devel/doc/getting_ospray.md Provides direct download links for OSPRay precompiled binary packages for different operating systems and architectures. These packages include necessary dependencies for most use cases. ```bash # Linux x86_64 curl -L -O https://github.com/RenderKit/OSPRay/releases/download/v/ospray-.x86_64.linux.tar.gz # Linux ARM64 curl -L -O https://github.com/RenderKit/OSPRay/releases/download/v/ospray-.aarch64.linux.tar.gz # macOS x86_64 curl -L -O https://github.com/RenderKit/OSPRay/releases/download/v/ospray-.x86_64.macosx.zip # macOS ARM64 curl -L -O https://github.com/RenderKit/OSPRay/releases/download/v/ospray-.arm64.macosx.zip # Windows x86_64 (MSI Installer) curl -L -O https://github.com/RenderKit/OSPRay/releases/download/v/ospray-.x86_64.windows.msi # Windows x86_64 (ZIP Archive) curl -L -O https://github.com/RenderKit/OSPRay/releases/download/v/ospray-.x86_64.windows.zip ``` -------------------------------- ### Download OSPRay Source Code Source: https://github.com/renderkit/ospray/blob/devel/doc/getting_ospray.md Provides direct download links for the OSPRay source code archives, allowing users to build OSPRay from source. ```shell # OSPRay Source Code (ZIP) curl -L -O https://github.com/RenderKit/OSPRay/archive/v.zip # OSPRay Source Code (tar.gz) curl -L -O https://github.com/RenderKit/OSPRay/archive/v.tar.gz ``` -------------------------------- ### Running the Pluggable Geometry Example Source: https://github.com/renderkit/ospray/blob/devel/modules/pluggableGeometryExample/README.md Provides the command to build OSPRay with the necessary module enabled and then run the example viewer. This command loads a specific patch file and sets the renderer type. ```sh ./ospExampleViewer --sg:module bilinear_patches ../modules/pluggableGeometryExample/examples/shadows.patches --renderer pt ``` -------------------------------- ### OSPRay Examples and Support Source: https://github.com/renderkit/ospray/blob/devel/doc/links.md Links to OSPRay example applications, tutorials, and information on how to report bugs or seek support. ```APIDOC example applications: tutorials.html#tutorials tutorial: tutorials.html#osptutorial ospExamples: tutorials.html#ospexamples report bugs: index.html#ospray-support-and-contact ``` -------------------------------- ### Install OSPray Tutorials Source: https://github.com/renderkit/ospray/blob/devel/apps/ospTutorial/CMakeLists.txt Installs the built OSPray tutorial executables (ospTutorial, ospTutorialCpp, ospTutorialAsync) to the application binary directory, categorized under the 'apps' component. ```cmake install(TARGETS ospTutorial ospTutorialCpp ospTutorialAsync DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT apps ) ``` -------------------------------- ### Install GPU Drivers on Windows Source: https://github.com/renderkit/ospray/blob/devel/doc/getting_ospray.md Instructions for installing the latest GPGPU drivers for Intel GPUs on Windows systems. This is a prerequisite for running OSPRay on Intel GPUs. ```powershell # Download and install the latest drivers from the Intel website: # https://www.intel.com/content/www/us/en/download/785597/intel-arc-iris-xe-graphics-windows.html ``` -------------------------------- ### OspRay Test Suite Setup Source: https://github.com/renderkit/ospray/blob/devel/apps/ospTestSuite/CMakeLists.txt Configures the main test suite executable for OSPRay. It includes setting up dependencies, linking libraries, defining compile-time options, and installing the executable. This snippet covers the core build process for the test suite. ```cmake if (NOT OSPRAY_ENABLE_APPS_TESTING) return() endif() # Note: CMake provides FindGTest which defines target GTest::GTest find_package(GTest REQUIRED CONFIG) ospray_disable_compiler_warnings() add_library(ospray_gtest_utils environment.cpp test_tools.cpp test_fixture.cpp ) target_link_libraries(ospray_gtest_utils PUBLIC arcball_camera ospray_testing GTest::gtest stb_image ) target_include_directories(ospray_gtest_utils PUBLIC $ ) add_executable(ospTestSuite ${OSPRAY_RESOURCE} environment.cpp # potentially compile with SYCL, overriding non-SYCL ospray_gtest_utils test_geometry.cpp test_volumetric.cpp test_appearance.cpp test_assigned_data.cpp test_sharedusm_data.cpp test_light.cpp test_enums.cpp $:test_glm_compat.cpp> test_camera.cpp test_motionblur.cpp test_framebuffer.cpp test_interpolation.cpp test_imageop.cpp test_shadowcatcher.cpp ospTestSuite.cpp ) # We need to know if volumes are enabled at compile time so that # we can enable/disable the VKL-dependent tests for enum values # Same for OIDN tests target_compile_definitions(ospTestSuite PRIVATE $:OSPRAY_ENABLE_VOLUMES> $:OSPRAY_MODULE_DENOISER> ) target_include_directories(ospTestSuite PRIVATE $:$> $:$> ) target_link_libraries(ospTestSuite PRIVATE ospray_testing ospray_gtest_utils embree $:${GLM_TARGET}> ) if (OSPRAY_MODULE_GPU) ospray_add_sycl_target(ospTestSuite) endif() ospray_sign_target(ospTestSuite) install(TARGETS ospTestSuite DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT apps ) ``` -------------------------------- ### Build ospMPIDistributedExamples Source: https://github.com/renderkit/ospray/blob/devel/modules/mpi/tutorials/CMakeLists.txt Builds the `ospMPIDistributedExamples` executable using the `ospray_create_mpi_tutorial` macro. This example likely showcases various distributed rendering techniques with OSPRay, linking against `ospray_testing`. The target is signed after installation. ```cmake ospray_create_mpi_tutorial(ospMPIDistributedExamples ospMPIDistributedExamples.cpp ) ospray_sign_target(ospMPIDistributedExamples) target_link_libraries(ospMPIDistributedExamples PUBLIC ospray_testing ) ``` -------------------------------- ### Run ospExamples Application Source: https://github.com/renderkit/ospray/blob/devel/doc/tutorials.md Shows how to execute the ospExamples application, which serves as an elaborate tutorial for various OSPRay features. It can be run with optional command-line parameters. ```bash ./ospExamples ``` -------------------------------- ### MultiDevice Initialization Example Source: https://github.com/renderkit/ospray/blob/devel/doc/api.md Demonstrates how to enable and configure the experimental MultiDevice feature in OSPRay using environment variables and command-line arguments. ```bash # Set the number of subdevices to use export OSPRAY_NUM_SUBDEVICES=6 # Load the multidevice_cpu extension and set the device to 'multidevice' ./ospTutorial --osp:load-modules=multidevice_cpu --osp:device=multidevice ``` -------------------------------- ### Build OSPray Examples Executable Source: https://github.com/renderkit/ospray/blob/devel/apps/ospExamples/CMakeLists.txt Configures the CMake build system to create the 'ospExamples' executable. It includes conditional compilation based on 'OSPRAY_ENABLE_APPS_EXAMPLES' and links essential libraries for rendering and testing. ```cmake if (NOT OSPRAY_ENABLE_APPS_EXAMPLES) return() endif() add_executable(ospExamples ${OSPRAY_RESOURCE} GLFWOSPRayWindow.cpp ospExample.cpp ) target_link_libraries(ospExamples PRIVATE arcball_camera ospray_testing ospray_imgui ${OPENGL_LIBRARIES} ) ospray_sign_target(ospExamples) install(TARGETS ospExamples DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT apps ) ``` -------------------------------- ### Install GPU Drivers on Linux Source: https://github.com/renderkit/ospray/blob/devel/doc/getting_ospray.md Instructions for installing the latest GPGPU drivers for Intel GPUs on Linux systems. This is a prerequisite for running OSPRay on Intel GPUs. ```shell # Refer to the official Intel documentation for the most up-to-date instructions: # https://dgpu-docs.intel.com/ ``` -------------------------------- ### Install Dependencies (apt-get) Source: https://github.com/renderkit/ospray/blob/devel/README.md Commands to install OSPRay dependencies on Linux distributions using apt-get. ```sh sudo apt-get install cmake-curses-gui sudo apt-get install libtbb-dev ``` -------------------------------- ### Build ospMPIDistribTutorialPartialRepl Source: https://github.com/renderkit/ospray/blob/devel/modules/mpi/tutorials/CMakeLists.txt Builds the `ospMPIDistribTutorialPartialRepl` executable using the `ospray_create_mpi_tutorial` macro. This example likely demonstrates partial replication in an MPI distributed rendering scenario. The target is signed after installation. ```cmake ospray_create_mpi_tutorial(ospMPIDistribTutorialPartialRepl ospMPIDistribTutorialPartialRepl.cpp ) ospray_sign_target(ospMPIDistribTutorialPartialRepl) ``` -------------------------------- ### Create MPI Tutorial Macro Source: https://github.com/renderkit/ospray/blob/devel/modules/mpi/tutorials/CMakeLists.txt Defines a CMake macro `ospray_create_mpi_tutorial` to simplify the creation and installation of MPI tutorial executables. It takes a tutorial name and source files as arguments, links against `mpi_tutorial_common`, and installs the target. ```cmake macro(ospray_create_mpi_tutorial tutorial_name) add_executable(${tutorial_name} ${OSPRAY_RESOURCE} ${ARGN}) target_link_libraries(${tutorial_name} PRIVATE mpi_tutorial_common) install(TARGETS ${tutorial_name} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT mpi ) endmacro() ``` -------------------------------- ### Build ospTutorial.c with CMake Source: https://github.com/renderkit/ospray/blob/devel/doc/tutorials.md Demonstrates how to build the C version of ospTutorial using CMake. It outlines the necessary steps and commands for a Linux environment. ```bash gcc -std=c99 ../apps/ospTutorial/ospTutorial.c \ -I ../ospray/include -L . -lospray -Wl,-rpath,. -o ospTutorial ``` -------------------------------- ### Build ospTutorial.c manually on Windows Source: https://github.com/renderkit/ospray/blob/devel/doc/tutorials.md Provides instructions for manually building the C version of ospTutorial on Windows using the MSVC compiler. ```powershell cl ..\..\apps\ospTutorial\ospTutorial.c -I ..\..\ospray\include -I ..\.. ospray.lib ``` -------------------------------- ### Build ospMPIDistribTutorialReplicated Source: https://github.com/renderkit/ospray/blob/devel/modules/mpi/tutorials/CMakeLists.txt Builds the `ospMPIDistribTutorialReplicated` executable using the `ospray_create_mpi_tutorial` macro. This example likely demonstrates replicated rendering strategies in an MPI distributed environment, linking against `ospray_testing`. The target is signed after installation. ```cmake ospray_create_mpi_tutorial(ospMPIDistribTutorialReplicated ospMPIDistribTutorialReplicated.cpp ) ospray_sign_target(ospMPIDistribTutorialReplicated) target_link_libraries(ospMPIDistribTutorialReplicated PUBLIC ospray_testing ) ``` -------------------------------- ### Compile ospMPIDistribTutorial (Linux) Source: https://github.com/renderkit/ospray/blob/devel/doc/tutorials.md Command to compile the C version of the ospMPIDistribTutorial on Linux using mpicc. It includes necessary include paths and links against the OSPRay library. ```c mpicc -std=c99 ../modules/mpi/tutorials/ospMPIDistribTutorial.c \ -I ../ospray/include -L . -lospray -Wl,-rpath,. -o ospMPIDistribTutorial ``` -------------------------------- ### Osprey Build Configuration Source: https://github.com/renderkit/ospray/blob/devel/apps/common/external/CMakeLists.txt Configures the Osprey build process, including disabling compiler warnings and conditionally adding subdirectories for application examples and image loading libraries. ```cmake # Copyright 2009 Intel Corporation # SPDX-License-Identifier: Apache-2.0 ospray_disable_compiler_warnings() if (OSPRAY_ENABLE_APPS_EXAMPLES) add_subdirectory(imgui) endif() add_subdirectory(stb_image) ``` -------------------------------- ### Compile ospMPIDistribTutorial (Windows) Source: https://github.com/renderkit/ospray/blob/devel/doc/tutorials.md Command to compile the C version of the ospMPIDistribTutorial on Windows using the cl compiler. It specifies include paths and links against the OSPRay library. ```cpp cl ..\..\modules\mpi\tutorials\ospMPIDistribTutorial.c -I ..\..\ospray\include -I ..\.. ospray.lib ``` -------------------------------- ### Find and Link OSPRay with CMake Source: https://github.com/renderkit/ospray/blob/devel/doc/compilation.md Example of how to find an installed OSPRay library in a client CMake project using `find_package` and link it to a target using `target_link_libraries`. ```cmake find_package(ospray 3.0.0 REQUIRED) target_link_libraries(${client_target} ospray::ospray) ``` -------------------------------- ### GLFW Build Option Source: https://github.com/renderkit/ospray/blob/devel/scripts/superbuild/CMakeLists.txt Determines whether to build GLFW for OSPRay examples or use an existing installation. ```cmake option(BUILD_GLFW "Build glfw for OSPRay examples or use one in existing environment?" ON) ``` -------------------------------- ### Build ospMPIDistribTutorialSpheres Source: https://github.com/renderkit/ospray/blob/devel/modules/mpi/tutorials/CMakeLists.txt Builds the `ospMPIDistribTutorialSpheres` executable using the `ospray_create_mpi_tutorial` macro. This example likely demonstrates sphere rendering in an MPI distributed environment. The target is signed after installation. ```cmake ospray_create_mpi_tutorial(ospMPIDistribTutorialSpheres ospMPIDistribTutorialSpheres.cpp ) ospray_sign_target(ospMPIDistribTutorialSpheres) ``` -------------------------------- ### Build ospMPIDistribTutorialVolume Source: https://github.com/renderkit/ospray/blob/devel/modules/mpi/tutorials/CMakeLists.txt Builds the `ospMPIDistribTutorialVolume` executable using the `ospray_create_mpi_tutorial` macro. This example likely demonstrates volume rendering in an MPI distributed environment. The target is signed after installation. ```cmake ospray_create_mpi_tutorial(ospMPIDistribTutorialVolume ospMPIDistribTutorialVolume.cpp ) ospray_sign_target(ospMPIDistribTutorialVolume) ``` -------------------------------- ### OSPRay API Initialization Source: https://github.com/renderkit/ospray/blob/devel/README.md Demonstrates the basic steps for initializing the OSPRay API by creating and configuring a device. OSPRay must be initialized before using its API functions. ```APIDOC ospInit(int argc, const char **argv) Initializes OSPRay using command line arguments to configure the device. ospNewDevice(const char *rendererType) Creates a new device with the specified renderer type (e.g., "default", "gl", "cpu"). osdDeviceSetParam(OSPDevice device, const char *name, OSPDataType type, const void *value) Sets a parameter on the given OSPDevice. osdDeviceCommit(OSPDevice device) Commits the changes made to the device parameters. ospShutdown() Shuts down OSPRay and releases all resources. ``` -------------------------------- ### OSPRay ISPCDevice Specific Choices Source: https://github.com/renderkit/ospray/blob/devel/STYLEGUIDE.md Recommendations for using Embree C API, exception handling during commit, setting ISPC-side values efficiently, and minimizing alias names. ```APIDOC ISPCDevice: commit() - Throws exceptions if objects are found invalid during commit. set(name: str, value: any) - Prefer setting ISPC-side values in a single 'set()' call over many single value setting functions. Usage: - Prefer to use Embree C API bindings over ISPC where possible. - Minimize the number of alias names given to both object types and parameters. ``` -------------------------------- ### Launch ospExamples with MPI Offload Source: https://github.com/renderkit/ospray/blob/devel/doc/api.md Demonstrates how to launch the `ospExamples` application using `mpirun` to distribute rendering tasks across multiple nodes with the MPI Offload device. ```sh mpirun -n ./ospExamples --osp:load-modules=mpi_offload --osp:device=mpiOffload ``` -------------------------------- ### Installation Directory Options Source: https://github.com/renderkit/ospray/blob/devel/scripts/superbuild/CMakeLists.txt Configures installation behavior, allowing libraries to be installed in their own subdirectories or installing OSPRay dependencies. ```cmake option(INSTALL_IN_SEPARATE_DIRECTORIES "Install libraries into their own directories under CMAKE_INSTALL_PREFIX" ON ) option(INSTALL_DEPENDENCIES "Install OSPRay dependencies" ON) ``` -------------------------------- ### OSPRay Initialization and Shutdown Source: https://github.com/renderkit/ospray/blob/devel/doc/api.md This section covers the OSPRay API initialization and shutdown procedures. It details the `ospInit` function for command-line initialization and mentions manual device instantiation. ```APIDOC OSPRay API Initialization and Shutdown ======================================== To use the API, OSPRay must be initialized with a "device". A device is the object which implements the API. Creating and initializing a device can be done in either of two ways: command line arguments using `ospInit` or manually instantiating a device and setting parameters on it. ### Command Line Arguments The first is to do so by giving OSPRay the command line from `main()` by calling: OSPError ospInit(int *argc, const char **argv); OSPRay parses (and removes) its known command line parameters from your application's `main` function. For an example see the [tutorial]. For possible error codes see section [Error Handling and Status Messages]. It is important to note that the arguments passed to `ospInit` are processed in order they are listed. The following parameters (which are prefixed by convention with "`--osp:`") are understood: -------------------------------------------- ----------------------------------------------------- Parameter Description -------------------------------------------- ----------------------------------------------------- `--osp:debug` enables various extra checks and debug output, and disables multi-threading `--osp:num-threads=` use `n` threads instead of per default using all detected hardware threads `--osp:log-level=` set logging level; valid values (in order of severity) are `none`, `error`, `warning`, `info`, and `debug` `--osp:warn-as-error` send `warning` and `error` messages through the error callback, otherwise send `warning` messages through the message callback; must have sufficient `logLevel` to enable warnings `--osp:verbose` shortcut for `--osp:log-level=info` and enable debug output on `cout`, error output on `cerr` `--osp:vv` shortcut for `--osp:log-level=debug` and enable debug output on `cout`, error output on `cerr` `--osp:load-modules=[,...]` load one or more modules during initialization; equivalent to calling `ospLoadModule(name)` `--osp:log-output=` convenience for setting where status messages go; valid values for `dst` are `cerr` and `cout` `--osp:error-output=` convenience for setting where error messages go; valid values for `dst` are `cerr` and `cout` `--osp:device=` use `name` as the type of device for OSPRay to create; e.g., `--osp:device=cpu` gives you the default `cpu` device; Note if the device to be used is defined in a module, remember to pass `--osp:load-modules=` first `--osp:set-affinity=` if `1`, bind software threads to hardware threads; `0` disables binding; default is `0` `--osp:device-params=:[,...]` set one or more other device parameters; equivalent to calling `ospDeviceSet*(param, value)` -------------------------------------------- ----------------------------------------------------- : Command line parameters accepted by OSPRay's `ospInit`. ``` -------------------------------- ### SDK Header Installation Source: https://github.com/renderkit/ospray/blob/devel/modules/cpu/CMakeLists.txt Configures the installation of Osprey SDK headers. It iterates through subdirectories, installing `.h` and `.ih` files to the SDK modules directory. It also installs ISPC-generated headers (`_ispc.h`) while excluding build-related directories. ```cmake # Install SDK headers # get_subdirectories(SUBDIRS ${CMAKE_CURRENT_LIST_DIR}) foreach(dir . ${SUBDIRS}) install(DIRECTORY ${dir} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ospray/SDK/modules/cpu COMPONENT devel FILES_MATCHING PATTERN *.h PATTERN *.ih ) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${dir} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ospray/SDK/modules/cpu COMPONENT devel FILES_MATCHING PATTERN *_ispc.h PATTERN CMakeFiles EXCLUDE ) endforeach() ``` -------------------------------- ### Install Osprey ImGui Library Source: https://github.com/renderkit/ospray/blob/devel/apps/common/external/imgui/CMakeLists.txt This CMake command installs the 'ospray_imgui' shared library. The 'ospray_install_library' function is used, indicating that the library should be installed in the 'apps' directory. ```cmake ospray_install_library(ospray_imgui apps) ``` -------------------------------- ### Create OSPRay Device Source: https://github.com/renderkit/ospray/blob/devel/README.md Demonstrates the creation of an OSPRay device using the `ospNewDevice` function. This is the first step in manually initializing an OSPRay device. ```cpp OSPDevice ospNewDevice(const char *type); ``` -------------------------------- ### Build OSPray Tutorial (C) Source: https://github.com/renderkit/ospray/blob/devel/apps/ospTutorial/CMakeLists.txt Builds the ospTutorial executable using C. It links against the 'ospray' library and signs the target. This is a demonstration and API testing executable. ```cmake if (NOT OSPRAY_ENABLE_APPS_TUTORIALS) return() endif() # build ospTutorial, for demonstration and API testing add_executable(ospTutorial ${OSPRAY_RESOURCE} ospTutorial.c) target_link_libraries(ospTutorial PRIVATE ospray) ospray_sign_target(ospTutorial) ``` -------------------------------- ### Install Dependencies (yum) Source: https://github.com/renderkit/ospray/blob/devel/README.md Commands to install OSPRay dependencies on Linux distributions using yum. ```sh sudo yum install cmake.x86_64 sudo yum install tbb.x86_64 tbb-devel.x86_64 ``` -------------------------------- ### Install Dependencies (MacPorts) Source: https://github.com/renderkit/ospray/blob/devel/README.md Commands to install OSPRay dependencies on Mac OS X using MacPorts. ```sh sudo port install cmake tbb ``` -------------------------------- ### Apache License 2.0 Boilerplate Source: https://github.com/renderkit/ospray/blob/devel/third-party-programs-OIDN.txt This snippet provides the standard boilerplate text for applying the Apache License, Version 2.0, to a project. It includes instructions for copyright owners to fill in their specific details and guidance on how to include the license text. ```text Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ``` -------------------------------- ### GNU Modula-2 Examples Source: https://github.com/renderkit/ospray/blob/devel/third-party-programs-ISPC.txt This section outlines the licensing for the examples provided with GNU Modula-2. It is a mix of LGPL-2.1 and GPL-3.0 licenses. ```Modula-2 /* Copyright (C) 2005-2015 Free Software Foundation, Inc. Mix of LGPL-2.1 and GPL-3.0. */ ``` -------------------------------- ### Loading GPU Module and Device Source: https://github.com/renderkit/ospray/blob/devel/README.md Demonstrates how to load the 'gpu' module and select the 'gpu' device for rendering using OSPRay. This can be done via command-line arguments or programmatically within an application. ```sh ./ospExamples --osp:load-modules=gpu --osp:device=gpu ``` -------------------------------- ### CMake Configuration for OSPRay Integration Source: https://github.com/renderkit/ospray/blob/devel/apps/ospTutorial/ospTutorialFindospray/CMakeLists.txt This snippet configures a CMake project to find and link against the OSPRay library. It specifies the minimum CMake version, project name, C standard, runtime output directory, and links the executable to the 'ospray::ospray' target. ```cmake cmake_minimum_required(VERSION 3.5) project(ospTutorialFindospray LANGUAGES C) set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD_REQUIRED ON) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) find_package(ospray 3.0.0 REQUIRED) add_executable(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/../ospTutorial.c) target_link_libraries(${PROJECT_NAME} ospray::ospray) ``` -------------------------------- ### Vulkan C++ Examples and Demos Source: https://github.com/renderkit/ospray/blob/devel/third-party-programs-Embree.txt This section refers to Vulkan C++ examples and demos, specifically mentioning 'dome light texture filtering'. The code is distributed under the MIT License. ```APIDOC Vulkan C++ Examples: Feature: Dome light texture filtering License: The MIT License (MIT) Copyright: (c) 2016 Sascha Willems Permissions: Grants broad usage rights including copy, modify, merge, publish, distribute, sublicense, and sell. Disclaimer: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. ``` -------------------------------- ### Install OSPRay Dependencies on macOS (MacPorts) Source: https://github.com/renderkit/ospray/blob/devel/doc/prerequisites.md Installs required dependencies for building OSPRay on macOS using the MacPorts package manager. This includes CMake and TBB (Threading Building Blocks). ```shell sudo port install cmake tbb ``` -------------------------------- ### Third-Party Library Acknowledgments Source: https://github.com/renderkit/ospray/blob/devel/third-party-programs-OpenVKL.txt Lists the third-party libraries used in the project, including Embree, Google Benchmark, OSPRay, and Threading Building Blocks (oneTBB), along with their copyright holders. ```APIDOC Embree Copyright 2009 Intel Corporation Google Benchmark Copyright 2014 Google Inc. All rights reserved. OSPRay Copyright 2009 Intel Corporation Threading Building Blocks (oneTBB) Copyright 2005 Intel Corporation ``` -------------------------------- ### Metal Refractive Index Examples Source: https://github.com/renderkit/ospray/blob/devel/README.md Provides example RGB coefficients for the 'eta' (real part) and 'k' (imaginary part) of the complex refractive index for various metals, based on published measurements. ```APIDOC Metal Properties: - Ag, Silver: eta=(0.051, 0.043, 0.041), k=(5.3, 3.6, 2.3) - Al, Aluminium: eta=(1.5, 0.98, 0.6), k=(7.6, 6.6, 5.4) - Au, Gold: eta=(0.07, 0.37, 1.5), k=(3.7, 2.3, 1.7) - Cr, Chromium: eta=(3.2, 3.1, 2.3), k=(3.3, 3.3, 3.1) - Cu, Copper: eta=(0.1, 0.8, 1.1), k=(3.5, 2.5, 2.4) ``` -------------------------------- ### Initialize MPI Distributed Device Source: https://github.com/renderkit/ospray/blob/devel/README.md Demonstrates how to load the MPI distributed module and initialize the `mpiDistributed` device for CPU rendering. This involves creating a new device, committing it, and setting it as the current device. ```cpp ospLoadModule("mpi_distributed_cpu"); OSPDevice mpiDevice = ospNewDevice("mpiDistributed"); ospDeviceCommit(mpiDevice); ospSetCurrentDevice(mpiDevice); ``` -------------------------------- ### Metal Material Index of Refraction Examples Source: https://github.com/renderkit/ospray/blob/devel/doc/api.md Provides example RGB approximations for the complex index of refraction (eta and k) for various metals, useful for configuring the Metal material. ```APIDOC Metal Material Properties: Metal | eta | k -----------|---------------------|----------------- Ag, Silver | (0.051, 0.043, 0.041) | (5.3, 3.6, 2.3) Al, Aluminium | (1.5, 0.98, 0.6) | (7.6, 6.6, 5.4) Au, Gold | (0.07, 0.37, 1.5) | (3.7, 2.3, 1.7) Cr, Chromium | (3.2, 3.1, 2.3) | (3.3, 3.3, 3.1) Cu, Copper | (0.1, 0.8, 1.1) | (3.5, 2.5, 2.4) ``` -------------------------------- ### Apache License Version 2.0 Terms and Conditions Source: https://github.com/renderkit/ospray/blob/devel/third-party-programs-OpenVKL.txt Provides the full text of the Apache License Version 2.0, detailing definitions, copyright license grants, and patent license grants for software usage, reproduction, and distribution. ```APIDOC Apache License Version 2.0 January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, ``` -------------------------------- ### Build OSPray Tutorial (Async C) Source: https://github.com/renderkit/ospray/blob/devel/apps/ospTutorial/CMakeLists.txt Builds the ospTutorialAsync executable using C for asynchronous operations. It links against the 'ospray' library and signs the target, enabling asynchronous rendering capabilities. ```cmake # async version add_executable(ospTutorialAsync ${OSPRAY_RESOURCE} ospTutorialAsync.c) target_link_libraries(ospTutorialAsync PRIVATE ospray) ospray_sign_target(ospTutorialAsync) ``` -------------------------------- ### Install OSPRay Dependencies on Linux (apt-get) Source: https://github.com/renderkit/ospray/blob/devel/doc/prerequisites.md Installs necessary dependencies for building OSPRay on Linux distributions that use the APT package manager. This includes CMake and TBB (Threading Building Blocks). ```bash sudo apt-get install cmake-curses-gui sudo apt-get install libtbb-dev ``` -------------------------------- ### OSPRay Build Options Source: https://github.com/renderkit/ospray/blob/devel/doc/prerequisites.md Demonstrates how to configure OSPRay build options using CMake variables. This includes enabling/disabling modules like volumes and denoiser, and specifying the tasking system for rkcommon. ```cmake # Enable optional modules -DOSPRAY_MODULE_DENOISER=ON -DOSPRAY_MODULE_MPI=ON # Configure rkcommon tasking system -DRKCOMMON_TASKING_SYSTEM=OpenMP -DRKCOMMON_TASKING_SYSTEM=Internal ``` -------------------------------- ### Install OSPRay Dependencies on Linux (yum) Source: https://github.com/renderkit/ospray/blob/devel/doc/prerequisites.md Installs necessary dependencies for building OSPRay on Linux distributions that use the YUM package manager. This includes CMake and TBB (Threading Building Blocks). ```bash sudo yum install cmake.x86_64 sudo yum install tbb.x86_64 tbb-devel.x86_64 ```