Git Product home page Git Product logo

ospray-module-pkd's Introduction

OSPRay Particle-K-D Tree (PKD Tree) Module

This project is a module for the OSPRay ray tracer (http://www.ospray.org) that implements the Particle K-D Tree Technique as described in the paper I. Wald, A. Knoll, G. P. Johnson, W. Usher, V. Pascucci, M. E. Papka. โ€œCPU Ray Tracing Large Particle Data using Particle K-D Trees,โ€ IEEE Visweek, 2015.

This code was mostly authored by Ingo Wald and Aaron Knoll (with help by several others); this code is experimental, and is hereby release without any warranty (implied or expressed) as to correctness, performance, etcpp.

Building the PKD Tree module

To build the PKD module, you first have to have a version of OSPRay in source. Let us assume that you have already checked that out (into ~/Projects/ospray), that you already have created a cmake build directory (say, in ~/Projects/ospray/build), and that you have already properly configured and built ospray.

Now, first go to ospray's module subdirectory, and check out the pkd module into this directory:

cd ~/Projects/ospray/modules
git clone <this module>

Now, go into your ospray build directory, do a 'ccmake', enable the pkd module, and rebuild

cd ~/Projects/ospray/build
ccmake .
# enable PKD module in cmake dialog, then 'c'onfigure and 'g'enerate
make

You should now have a properly built libospray_module_pkd.so, as well as a ospPartiKD binary.

Building for LiDAR Data

To build the PKD module for LiDAR data you'll need LAStools to read LAS and LAZ files, then can enable OPTION_MODULE_PARTIKD_LIDAR in CMake. If LAStools is installed in some non-standard location you can pass -DLASTOOLS=<path to LAStools root>. Warning: This will break support for any non-LiDAR data due to how the attributes are handled.

Using the PKD Module

Once built, using the PKD module consists of two steps:

  1. converting a particle model to pkd format

  2. rendering the resulting pkd file with ospray's sample qt viewer

1) Converting a particle model to pkd format

To convert a particle model to our internal format (which includes building the tree), you use the ospPartiKD tool. PartiKD supports several file format (TODO: more doc needed here!), and is run as follows:

./ospPartiKD <inputFile> --radius <particleRadius> -o outFileName.pkd

Example: To convert the cosmic web particle data set I use

./ospPartiKD ~/cosmic_web/6k-cubed/0.000/particles/0.000xv00*dat --radius 1 -o ~/scratch/cosmic_web.pkd

This step should create two files: a cosmic_web.pkd, and a cosmic_web.pkdbin

2) Rendering a pkd file

Given a ".pkd" file (assuming ~/scratch/cosmic_web.pkd) you can render this with the ospray qt modelviewer as follows:

./ospQTViewer --module pkd ~/scratch/cosmic_web.pkd

Make sure you specify the "--module pkd", as this is required for the QT viewer to recognize the respective PKD scene graph nodes contained in the ".pkd" file.

Assuming you have an mpi install ready, can also run that mpi-parallel via

mpirun -perhost 1 -np <numprocs> -f <hostsfile> ./ospQTViewer --module pkd ~/scratch/cosmic_web.pkd --osp:mpi

More Information:

ospray-module-pkd's People

Contributors

ingowald avatar jeffamstutz avatar johguenther avatar knolla avatar twinklebear avatar

Watchers

 avatar  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.