Skip to content

PhilipPragerUrbina/DOGERAY2

Repository files navigation

DOGERAY2

DOGERAY2 is an unbiased interactive GPU path tracer written in CUDA C++ that opens GLTF 2.0 files.

icon

Gallery

Find the full size gallery in the wiki

Features

Capable of 4k rendering a few samples per second. Here is a scene with over 15 million triangles: 15mil glb

Some of the current features:

  • Responsive GUI with many controls and live render window
  • Fully path traced fast GPU accelerated rendering
  • Multiple JPG image saving
  • Window resizing and image scaling
  • Interactve and BVH preview
  • BVH acceleration structure stackless BVH traversal
  • Depth of field
  • PBR and emissive materials with textures
  • Smooth shading
  • Background images
  • Opens GLTF files with cameras and transformations
  • Multithreaded UI

User interface: gui

Interactive render preview: preview

Bounding volume hierarchy view: sanfoeerd3 glb

Glossy and emissive materials, Depth of field: helmet2 glb_ MetalRoughSpheres glb

Quick video demo

Quick usage guide:

  1. To open a file, just right click on a GLTF or GLB file and open with DOGERAY2.
  2. To add a background just put an image file named "background" in the same directory where you are opening the file from.
  3. If your model is not rendering correctly, make sure the scale of the model is not overly huge (>1000 units wide). Check out the Wiki for more info on file formats, common issues, usage, and decisions.

Dependencies:

  1. CUDA
  2. SDL2 (Included in release)

(Also requires a fairly recent Nvidia GPU to run)

Some learnings from this project:

  • Polymorphism and serialization
  • Power of compiler optimization
  • Using specifications to figure out how to utilize industry standard files
  • Casting types and working with raw image data
  • Organizing Object oriented c++
  • Using GUI toolkits
  • Managing program lifecycle and memory
  • Matrix and Vector transformations
  • Common code writing practices
  • Markdown and Licencing on Github
  • Extreme debugging

Licenses:

Full licenses can also be found in libraries folder.

  • Tinygltf: Copyright (c) 2017 Syoyo Fujita, Aurélien Chatelain and many contributors
    • json.hpp : Copyright (c) 2013-2017 Niels Lohmann. MIT license.
    • base64 : Copyright (C) 2004-2008 René Nyffenegger
  • Imgui: Copyright (c) 2014-2022 Omar Cornut

Other Libraries:

  • CUDA
  • STB_image and STB_image_write
  • SDL2
  • Linalg

Links to the libraries can be found in the wiki page.

References

The rendering algorithm is based on Ray Tracing in One Weekend which is amazing for learning about computer graphics. The stackless BVH traversal algorithm at the heart of the engine is based on Hachisuka's amazing work.

Why the name?

DOGERAY2 is a completely new piece of software from the original Dogeray that I wrote a very long time ago. It only keeps the name since I could not come up with a better one.