Skip to content

Sample code for the paper "A Practical Guide to Implementing Off-Axis Stereo Projection Using Existing Ray Tracing Libraries"

License

Notifications You must be signed in to change notification settings

szellmann/anari-offaxis-sample-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Offaxis camera with ANARI

This is the sample code for the paper: S. Zellmann, J. Amstutz: "A Practical Guide to Implementing Off-Axis Stereo Projection Using Existing Ray Tracing Libraries"

Sample code

The sample app runs on the command line and executes the three camera strategies described in the paper. The output are .png images for each of the three strategies. On success, the projection generated by the three strategies should match.

Building

Building requires v0.8.0 (or newer) of the ANARI SDK (we use the next_release branch).

The sample app was tested on macOS and on Ubuntu 22.04 and can be built like this:

mkdir build
CMAKE_PREFIX_PATH=<anari-root-dir> cmake <sources>
make

Running

To run it, you need an ANARI device. Any compliant device will work, but to run Strategy 1 from the paper the anari-visionaray device is required, which provides the ANARI_VSNRAY_CAMERA_MATRIX extension. ANARI devices must be set using the environment variable ANARI_LIBRARY:

ANARI_LIBRARY=visionaray anari-offaxis-sample

Code organization

The relevant parts of the code are found in Projection.h where the the three strategies are implemented, and in main.cpp where they are executed. The implementation of Strategy 1 (camera rays are directly created using OpenGL-style projection and model/viewing matrices) is delegated to an external ANARI device implementation (currently, the required extension is implemented only by the anari-visionaray device).

License

Apache 2

About

Sample code for the paper "A Practical Guide to Implementing Off-Axis Stereo Projection Using Existing Ray Tracing Libraries"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published