Skip to content

danieldeankon/hypertrace

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HyperTrace

Lobachevsky (hyperbolic) space ray tracer powered by OpenCL.

Requirements

  • OpenCL 1.2
  • SDL2
  • SDL2_Image

Setup

Linux

  • Install GCC, Make and CMake.
  • Install some of *-opencl-dev and *-opencl-icd for your device.

The *-opencl-dev and *-opencl-icd means that you need to install only a pair of packages which names end with -opencl-dev and -opencl-icd.

Don't run apt-get install *-opencl-dev *-opencl-icd. This command will install all packages with matching names and this is not what you need.

The actual packages depends on your GPU. For example, if you use Nvidia GPU, you probably need to install nvidia-opencl-dev and nvidia-opencl-icd.

Windows

  • Install MSYS2.

  • With MSYS2 install required packages:

pacman -S \
    gcc \
    make \
    cmake \
    git \
    mingw64/mingw-w64-x86_64-opencl-headers \
    mingw64/mingw-w64-x86_64-opencl-icd-git \
    mingw-w64-x86_64-SDL2 \
    mingw-w64-x86_64-SDL2_image

How to use

To build and run example:

./script/run.sh main

You may use name of another example instead of main as well.

To select the OpenCL platform and device:

./script/run.sh <example-name> [platform-no] [device-no]

To list all available platforms and devices enter -1 as [platform-no].

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.

TODO

Basics

  • Euclidean geometry
  • Lobachevsky (hyperbolic) geometry
  • Spherical geometry

Materials

  • Specular material
  • Lambertian material
  • Transparent material
  • Refraction
  • Diffusion on fog
  • Arbitrary BRDF

Surface tiling

Euclidean plane and horosphere

  • Square tiling
  • Hexagonal tiling

Hyperbolic plane

  • Pentagonal tiling
  • Heptagonal tiling
  • Apeirogonal tiling

Effects

  • Lens blur (depth of field)
  • Motion blur
  • Motion blur on moving objects

Post-processing

  • Gamma correction
  • Noise reduction (maybe using DL)

Other improvements

  • Same RNG seed for work group to reduce divergence

Releases

No releases published

Packages

No packages published

Languages

  • C++ 93.0%
  • C 4.3%
  • CMake 2.1%
  • Shell 0.6%