Giter Site home page Giter Site logo

greenlightning / memtracer Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 1.0 2.84 MB

Reconstructing Bounding Volume Hierarchies from Memory Traces of Ray Tracers

CMake 0.19% C++ 86.79% C 12.01% Cuda 1.01%
bvh memory-trace nvbit ray-tracing reverse-engineering

memtracer's Introduction

MemTracer

Source code for my master's thesis (currently not publicly available) and the paper Reconstructing Bounding Volume Hierarchies from Memory Traces of Ray Tracers to be published during PG 2022.

Overview

  • rt example ray tracer
  • mem_trace binary instrumentation tool
  • mem_vis trace analysis tool and gui

Building

Clone recursively (git clone --recursive) or initialize submodules after cloning (git submodule update --init).

Download NVBit (version 1.5.4 or later) and copy the core directory into this directory.

Optionally, install image format libraries for the output of the example ray tracer (pbm is always available):

Debian and Ubuntu: sudo apt-get install libpng-dev libjpeg-dev libopenexr-dev Arch Linux: sudo pacman -S libpng libjpeg openexr Fedora: sudo dnf install libpng-devel libjpeg-devel openexr-devel

Run CMake.

Running

Example configuration file config.toml:

input = 'bun_zipper.ply'
# output = 'output.png'
heuristic = 'sah'
size = [256, 256]

[camera]
position = [-0.0160, 0.1079, 0.2]

# euler rotation angles in degrees
rotation = [10, 20, 30]

# alternatively, rotation matrix
matrix = [
	1, 0, 0,
	0, 1, 0,
	0, 0, 1,
]

vertical_fov = 60

Command line options are:

./rt -config config.toml -width 128 -height 128 -input input.ply -output output.png -heuristic sah
./rt/rt -config ../workspace/data/config.toml -output test.png
TOOL_FILENAME=trace.bin TOOL_STORE_CONTENTS=1 LD_PRELOAD=./mem_trace/libmem_trace.so ./rt/rt -config ../workspace/data/config.toml -output test.png

memtracer's People

Contributors

greenlightning avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

williamwangpeng

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.