Giter Site home page Giter Site logo

agerasev / hypertrace Goto Github PK

View Code? Open in Web Editor NEW
14.0 3.0 1.0 1.2 MB

Real-time hyperbolic space ray tracer

Home Page: https://www.youtube.com/playlist?list=PL5hx3kPoaYlbnLfm3DHvHKgr0Y14CdiPT

License: Apache License 2.0

C 0.21% CMake 0.72% C++ 47.07% Rust 52.00%
lobachevsky opencl raytracing gpu hyperbolic

hypertrace's Introduction

Hypertrace

Physically-based non-Euclidean ray tracer powered by OpenCL.

This project is done mostly for educational purpose.

Supported geometries

  • Euclidean geometry.
  • Lobachevsky (or hyperbolic) geometry.
  • Spherical geometry (planning).

Requirements

  • Rustc and Cargo
  • OpenCL 1.2 support
  • SDL2 (used by interactive viewer)

How to use

To build and run example:

cd main
cargo run --example hy

You may use a name of another example instead of hy as well.

To select specific OpenCL platform and device:

cargo run --example <example_name> -- <platform_no> <device_no>

To list all available platforms and devices:

cargo run --example <example_name> -- --list

Control

In some examples you may fly around the scene using your keyboard and mouse.

  • Use your mouse to look around.
  • W, A, S, D - move forward, left, backward and right respectively.
  • Space, C - move up and down.
  • Q, E - tilt counter- and clockwise.
  • Tab - release/grab mouse pointer.
  • Esc - exit application.

hypertrace's People

Contributors

agerasev avatar danieldeankon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

danieldeankon

hypertrace's Issues

Troubles building from the master branch on Linux

Operating system is Linux Mint 19.2, installed on my computer about a year ago.
I ran the following commands:
gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
make --version
GNU Make 4.1
cmake --version
cmake version 3.10.2

sudo apt install *-opencl-dev *-opencl-icd

I then checked out and cd'd into the git repo with master branch active, and ran ./script/run.sh main. I got the output:

CMake Error at CMakeLists.txt:85 (target_link_libraries):
  Object library target "hypertrace" may not link to anything.


-- Configuring incomplete, errors occurred!
See also "/home/daniel/git/hypertrace/build/CMakeFiles/CMakeOutput.log".

The line CMakeLists.txt in question is target_link_libraries(${PROJECT_NAME} OpenCL SDL2 SDL2_image)

Log: CMakeOutput.log

By poking around a bit in the script folder and downloading a more recent version of cmake, I was able to get further by running the command /home/daniel/Downloads/cmake-3.19.3-Linux-x86_64/bin/cmake . inside of the hypertrace directory. I then ran make main from the same directory, which failed. Here is the terminal output: temp.txt

Googling the g++ error messages got me to https://stackoverflow.com/questions/31215971/non-trivial-designated-initializers-not-supported

Troubles building from the rust branch on Linux

See #1 for computer specifications

Switched to the rust branch of this repository, made nightly (1.51 at time of writing) the default toolchain. Then:

git submodule init
git submodule update
cargo test

Output: temp.txt
I then run sudo apt-get install libgtest-dev to install gtest. Installs without a hitch, and running cargo test eventually sees all 96 tests pass.

The instructions in the readme in the rust branch are incorrect, e.g. ./script/run.sh hyperbolic main refers to a script that has been moved into another directory. I was not able to get it to run using the script, and neither was I able to make the rust project produce an executable (but cargo build did compile things). Not clear where to proceed from here.

Information about platform support

Hello. This project looks great. I noticed there is no information about which platforms/environments this is expected to run in, and there seems to lack information on dependencies. I know that OpenGL has been deprecated on MacOS, but I'm not sure about OpenCL. Whether it is Linux or Unix, which packages do I need? Obviously I need stuff for Rust and OpenCL, but anything else? This information would be very nice.

cargo run fail

while running cargo run --example hy
it outputs:
error: process didn't exit successfully: `rustc -vV` (signal: 11, SIGSEGV: invalid memory reference)
i just git cloned the whole thing
i am on ubuntu 22.04.4LTS

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.