Translation layer from ANARI to OSPRay, ANARILibrary and ANARIDevice "ospray".

ANARI-OSPRay

Translation layer from Khronos® ANARI™ to Intel® OSPRay: ANARILibrary and ANARIDevice "ospray".

Status

This is an experimental project, v0.1, implementation of the ANARI API is incomplete.

Features and extensions that should work:

  • Geometries (with explicit primitive.index): triangle, quad, sphere, curve (constant radius only)
  • Materials: matte, transparentMatte, and as extension all OSPRay materials (obj, principled, carPaint, glass, thinGlass, luminous, ...)
  • Spatial Fields: structuredRegular, and as extension all OSPRay volumes (structuredSpherical, amr, unstructured, particle)
  • Lights
  • Cameras
  • Instances
  • KHR_AREA_LIGHT
  • KHR_AUXILIARY_BUFFERS of type FLOAT32_VEC
  • KHR_FRAME_COMPLETION_CALLBACK
  • KHR_STOCHASTIC_RENDERING)
  • KHR_TRANSFORMATION_MOTION_BLUR

Not implemented yet:

  • Geometries: cone, cylinder, primitive.radius of curve, implicit primitive.index, i.e., primitive soups
  • Object introspection
  • Samplers
  • Attribute selection and routing for Materials
  • {color|opacity}.position array of scivis Volume
  • stridede Arrays
  • (un)mapping Arrays
  • KHR_DEVICE_SYNCHRONIZATION
  • ...

Requirements

Building

Build with:

git clone https://github.com/ospray/anari-ospray.git
cd anari-ospray
mkdir build
cd build
cmake ..
cmake --build .

Or using the CMake superbuild in superbuild, which fetches the dependencies.

Using

Run the ANARI examples with selected ospray library, e.g.

export ANARI_LIBRARY=ospray
anariViewer
Owner
OSPRay
Project relating to the OSPRay rendering library
OSPRay
Comments
  • Light intensity should be in W/sr, not W/m^2

    Light intensity should be in W/sr, not W/m^2

    I found that when setting the intensity parameter on lights, anari-ospray would set the intensityQuantity to OSP_INTENSITY_QUANTITY_IRRADIANCE, which would correspond to units of W/m^2. According to the specs, intensity is however supposed to be in W/sr, which would correspond to OSP_INTENSITY_QUANTITY_INTENSITY. Not sure if this is deliberate, or a bug? (With irradiance being used, the light intensity oddly depends on model size, though.)

  • Superbuild

    Superbuild

    These are a couple of fixes to make the superbuild run more smoothly for me. As I'm on ARM Mac, I need to build TBB and Embree from source, so I added cmake options for that.

    I had some issues with adding the (meta) project itself as an external dependency, as is done by the superbuild script. In particular, it would try to build the device library in-source, which is however deactivated by the project. I fixed that by specifying a BINARY_DIR inside the current build dir, but I'm not sure if this is desirable. That way, the project builds successfully for me, but solving the issue this way might be a bit controversial, so just let me know if you want this solved differently / want me to use different paths / naming conventions etc.

    In regards to the latter, the docs say that if SOURCEDIR is specified cmake will deduce the other variables from that (cf. https://cmake.org/cmake/help/latest/module/ExternalProject.html, "If any of the above ..._DIR options are not specified, their defaults are computed as follows. [..]"), but I found that (seemingly) this is not the case, at least with my cmake version (which is 3.20.3).

  • Update README.md

    Update README.md

    Looks like the status has changed on what is implemented in v0.2.

    • Samplers appear to be implemented
    • (un)mapping of Arrays appears to be implemented
    • Anything else that was reported as not implemented yet ?

    Currently in the process of installing the latest anari-ospray and will test the above.

  • Question about setup.

    Question about setup.

    Hello, I am having problems running the anari-ospray back end. I get the following error when I try to run.

    login4.frontera(1070)$ anariTutorialCpp 
    initialize ANARI......loaded debug library!
    #ospray: INVALID device --> could not open module lib ospray_module_cpu: /work2/01197/semeraro/frontera/OpenVKL/buildgcc/install/lib64/libospray_module_cpu.so: cannot open shared object file: No such file or directory
    #ospray: INVALID device --> Could not find device of type: cpu.  Make sure you have the correct OSPRay libraries linked and initialized.
    TERMINATING DUE TO UNCAUGHT ANARI EXCEPTION
    terminate called after throwing an instance of 'std::runtime_error'
      what():  OSPRay not initialized correctly!
    Aborted
    

    I have set ANARI_LIBRARY=ospray. The framework seems to be looking for ospray_module_cpu.so in OpenVKL/buildgcc/install/lib64. This is the wrong directory. I have included the correct location in the LD_LIBRARY_PATH environment variable (OSPRay/buildgcc/install/lib64). I have no idea why it is looking in the OpenVKL directory instead of OSPRay. I must have set up the environment incorrectly. Can you shed some light on the problem.

  • Use a default status func if none was set by the user

    Use a default status func if none was set by the user

    I found that apps using anari-ospray crash when the environment variable OSPRAY_LOG_LEVEL was set. That's because anari-ospray installs a custom (user-settable) status function which is however NULL when the user did not set it as a device parameter. The proposed commit will default-initialize that status function to simply print the status messages to stderr, or to the device's default status function set by the user via anariLoadLibrary (if the latter is not NULL).

  • Build device library as SHARED, not MODULE

    Build device library as SHARED, not MODULE

    On macOS, with add_library(MODULE ...), cmake creates an .so file instead of using the ending .dylib. ANARI-SDK does not parse that correctly on dlopening the device library, but instead expects a .dylib on macOS.

    For some context, also see this issue here: https://gitlab.kitware.com/cmake/cmake/-/issues/21189

    Changing the output target type to SHARED was the easiest fix (also what the ANARI example_device does) . Alternatively, one could also use CMAKE_SHARED_MODULE_SUFFIX.

    As another alternative, I could probably also push for ANARI parsing this correctly in the first place. Just let me know which option you prefer.

Webusb-libusb - Translation layer from libusb to webusb.

webusb-libusb IMPORTANT: This implementation requires a patched version of Emscripten to work properly. This project is a translation layer from libus

Dec 9, 2022
This repository contains the source for the ANARI API SDK

ANARI-SDK This repository contains the source for the ANARI API SDK. This includes: Front-end library API utilties and helpers (mostly for implementat

Dec 11, 2022
Device for ANARI generating USD+Omniverse output

USD device for ANARI Device for ANARI generating USD+Omniverse output Prerequisites If OpenVDB (Volume support) is required: Easiest: build USD from s

Jul 26, 2022
English Translation Mod for Air Nintendo Switch version

AIR-ENX English translation mod for Nintendo Switch version of "Air" 1.0.1 Current status: Alpha Chapters translation status: Dream 100% Summer 100% A

Sep 6, 2022
This is the repo that hosts the code for Mozilla's translation service

Translation service HTTP service that uses bergamot-translator and compressed neural machine translation models for fast inference on CPU. Running loc

Sep 7, 2022
Unofficial upload of ChinesePython, a translation of the Python programming language in Chinese [Provided by UrduPython engineers]

# Downloaded from SourceForge: https://sourceforge.net/projects/chinesepython/ # (Uploaded as is) ---------------------------------------------------

Feb 12, 2022
Support for TrueType (.ttf) font files with Simple Directmedia Layer.

This library is a wrapper around the excellent FreeType 2.0 library

Dec 31, 2022
layer to control the global priority of any vulkan application

vk-force-priority vk-force-priority allows you to control the global priority of any vulkan application. Building from Source Dependencies Before buil

Sep 2, 2021
A data plane framework that supports any layer-7 protocols.
A data plane framework that supports any layer-7 protocols.

中文 meta-protocol-proxy Why MetaProtocol is needed? Almost all open source and commercial Service Meshes currently support only two Layer-7 protocols -

Oct 17, 2022
Application layer for sounding rockets software
Application layer for sounding rockets software

Lynx On-Board Software The on-board software represents the top layer of the rocket's firmware. This includes all the logics needed for a successful f

Apr 13, 2022
Yet another abstraction layer - a general purpose C++ library.

Yet Another Abstraction Layer What yaal is a cross platform, general purpose C++ library. This library provides unified, high level, C++ interfaces an

Jul 27, 2022
Wayfire plugin for handling touchpad gestures globally in a layer-shell surface

wf-globalgestures Global touchpad gestures plugin for Wayfire: implements a special protocol (also in this repo) that lets clients request that a part

Oct 3, 2022
A Direct3D9 to Vulkan layer using the DXVK backend. [Upstreamed to DXVK]

This work has been upstreamed and is continuing development there This repo is only open for the remaining issues on the tracker https://github.com/do

Dec 24, 2022
Dec 31, 2022
PikaScript is an ultra-lightweight Python engine with zero dependencies and zero-configuration, that can run with 4KB of RAM (such as STM32G030C8 and STM32F103C8), and is very easy to deploy and expand.
PikaScript is an ultra-lightweight Python engine with zero dependencies and zero-configuration, that can run with 4KB of RAM (such as STM32G030C8 and STM32F103C8), and is very easy to deploy and expand.

PikaScript 中文页| Star please~ 1. Abstract PikaScript is an ultra-lightweight Python engine with zero dependencies and zero-configuration, that can run

Dec 29, 2022
Signed - a 3D modeling and construction language based on Lua and SDFs. Signed will be available for macOS and iOS and is heavily optimized for Metal.
Signed - a 3D modeling and construction language based on Lua and SDFs. Signed will be available for macOS and iOS and is heavily optimized for Metal.

Signed - A 3D modeling language Abstract Signed is a Lua based 3D modeling language, it provides a unique way to create high quality 3D content for yo

Nov 21, 2022
ESP32 firmware to read and control EMS and Heatronic compatible equipment such as boilers, thermostats, solar modules, and heat pumps
ESP32 firmware to read and control EMS and Heatronic compatible equipment such as boilers, thermostats, solar modules, and heat pumps

EMS-ESP is an open-source firmware for the Espressif ESP8266 and ESP32 microcontroller that communicates with EMS (Energy Management System) based equipment from manufacturers like Bosch, Buderus, Nefit, Junkers, Worcester and Sieger.

Jan 8, 2023
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.

SynnixOS Epic Hobby OS targeting x86_64 CPUs, it includes some hacked together functionality for most essential OSs although, with interactivity via Q

Oct 28, 2022
🎮 Plants vs. Zombies multiplayer battle, developed via reverse engineering, inline hook and dynamic-link library injection. Two online players defend and attack as the plant side and zombie side respectively.
🎮 Plants vs. Zombies multiplayer battle, developed via reverse engineering, inline hook and dynamic-link library injection. Two online players defend and attack as the plant side and zombie side respectively.

Plants vs. Zombies Online Battle This project has two original repositories: https://github.com/czs108/Plants-vs.-Zombies-Online-Battle https://github

Oct 14, 2021