Git Product home page Git Product logo

visionaray's Introduction

Build Status Build Status Join the chat at https://gitter.im/visionaray/Lobby

Visionaray

A C++ based, cross platform ray tracing library

Note that the current version of Visionaray is an early preview. At this stage, the framework, including the API, are likely to undergo frequent changes.

Getting Visionaray

Under Linux or Mac OS X, use the following commands to locally clone Visionaray

git clone https://github.com/szellmann/visionaray.git
cd visionaray
git submodule update --init --recursive

Build requirements

  • C++11 compliant compiler (tested with g++-5.4.0 on Ubuntu 16.04 x86_64, tested with clang-900.0.39.2 on Mac OS X 10.13, tested with Microsoft Visual Studio 2015 VC14 for x64)

  • CMake version 2.8.9 or newer

  • Boost

  • OpenGL

  • GLEW

  • NVIDIA CUDA Toolkit version 7.0 or newer (optional)

  • All external dependencies but CMake are required as developer packages containing C/C++ header files

  • In the future we intend to relax the OpenGL and GLEW dependency

  • When targeting NVIDIA CUDA, make sure you have a C++11 compliant version (v7.0 or newer)

  • Visionaray supports Fermi+ NVIDIA GPUs (e.g. >= GeForce 400 series or >= Quadro {4|5|6}000) (Visionaray does not support texturing on Fermi GPUs, bindless texture support is available with Kepler+ GPUs)

Additionally, in order to compile the viewer application and the examples, the following packages are needed:

Building the Visionaray library and viewer application

Linux and Mac OS X

It is strongly recommended that you do a "release build" because otherwise the CPU code path will be "sluggish". It is also recommended to supply an architecture flag that corresponds to the CPU architecture you are targeting. Please ensure that you have C++11 support activated.

cd visionaray
mkdir build
cd build

cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-std=c++11 -msse4.1"
make
make install

The headers, libraries and viewer application will then be located in the standard install path of your operating system (usually /usr/local).

See the Getting Started Guide and the Troubleshooting section in the Wiki for further information.

Visionaray Viewer

Visionaray comes with a viewer application that can process wavefront obj files containing polygons. The viewer application is primarily meant as a developer tool for debugging and testing. After being installed, the viewer application executable can be called using the following command:

vsnray-viewer <filename.obj>

where filename.obj is a wavefront obj file.

Documentation

Thorough documentation can be found in the Wiki.

Source Code Organization

Library

Visionaray is a template library, so that most algorithms are implemented in headers located under include/visionaray.

  • include/visionaray/math: GLSL-inspired math templates, wrappers for SIMD types, geometric primitives
  • include/visionaray/texture: texture management templates and texture access routines
  • include/visionaray: misc. ray tracing templates, BVHs, render targets, etc.

Visionaray can optionally interoperate with graphics and GPGPU APIs. Interoperability with the respective libraries is compiled into the Visionaray library. When not needing GPU interoperability, chances are high that you don't need to link with the library but can just include headers.

  • include/visionaray/cuda/, src/visionaray/cuda: CUDA interoperability classes
  • include/visionaray/gl, src/visionaray/gl: OpenGL(ES) interoperability classes

Headers in ./detail subfolders are not part of the public API. Code in namespace detail contains private implementation. Template class implementations go into files ending with .inl, which are included at the bottom of the public interface header file.

Applications

Visionaray comes with a rudimentary viewer (see above) and a set of example applications. Those are implemented under

  • src/viewer: visionaray viewer application
  • src/examples: visionaray example applications

Common library

The viewer application and the examples statically link with the Visionaray-common library that provides functionality such as windowing classes or mouse interaction. The Visionaray-common library is not part of the public API and interfaces may change between releases.

  • src/common: library private to the viewer and example applications

Third-party libraries

  • src/3rdparty: third-party code goes in here

The viewer application and the examples use the following third-party libraries (the Visionaray library can be built without these dependencies):

  • CmdLine library to handle command line arguments in the viewer and example applications.
  • dear imgui library for GUI elements in the viewer and example applications.
  • RapidJSON library for parsing JSON scene descriptions.
  • tinyply library to load Stanford PLY models.

License

Visionaray is licensed under the MIT License (MIT)

visionaray's People

Contributors

abolz avatar aumuell avatar debsxy avatar feodorfitsner avatar gitter-badger avatar hellmannm avatar schrist2 avatar szellmann avatar tu500 avatar virvo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.