Giter Club home page Giter Club logo

kiraray's Introduction

KiRaRay

KiRaRay is a simple interactive ray-tracing renderer using optix.

Features

Working in progress (?) project
This toy renderer is purposed for learning and only with limited features.

  • GPU path tracing (megakernel/wavefront).
  • GPU volumetric rendering (wavefront).
  • Spectral or tristimulus (RGB) rendering.
  • Post processing passes (e.g. denoising).
  • Basic support for scene animation (glTF).

Build and run

Windows (MSVC) Build

Requirements

This project is developed with on Windows (MSVC). It cannot compile on Linux.

KiRaRay now uses Vulkan for better interoperability with CUDA, and extensibility to rasterization-based render passes. If Vulkan is not desired, check the legacy-GL branch that instead depends on OpenGL.

Cloning the repository

KiRaRay uses thirdparty dependencies as submodules so fetch them recursively when cloning:

git clone --recursive https://github.com/cuteday/KiRaRay.git

Building

This project uses cmake to build, Make sure cuda is installed and added to PATH, and OptiX_INSTALL_DIR environment variable points to the OptiX installation directory.

Running

Specify the json configuration file as command line argument to start the renderer, as the example below. Check the example configurations for some test scenes, including volumetric rendering and animated scenes.

build/src/kiraray.exe common/configs/example_cbox.json

The two necessary entries in the configuration are model (specifying the relative path to the scene file) and passes (describing the render pipeline). Once compiled, directly run kiraray without specifying configuration (this example configuration will be used) to get a feel for this toy renderer.

Usage

Camera controlling. Dragging LeftMouse for orbiting, dragging Scroll or Shift+LeftMouse for panning. Scroll for zooming in/out.

Python binding. Several simple interfaces are exposed to python scripting via pybind11, see scripts for details.

Galleries

Additional Information

Performance

Currently, the renderer runs extremely slow on Debug build for unknown reasons. Please switch to Release build for normal performance.

Writing new render passes.

It is possible to write your own render pass, see the examples here. Check bindless render pass (rasterization) or the post-processing passes for more working examples.

Scene loading

Kiraray provided limited support for importing scenes like OBJ, glTF2 using Assimp. Animations in glTF2 models could be correctly imported, but skeleton animation is not yet supported. pbrt-parser is used to import pbrt-v3 scenes (get some here, modify the file url to download the pbrt-v3 format models).

Epilogue

Although the main purpose of this project is to let me (a beginner) learn c++ and optix, I really wish to add more features and make it a fully-functional renderer with support for both ray-tracing and rasterization based techniques, combined via vulkan-cuda interopration. However, it may be a long process and I don't know if I will continue to do it. Since in reality i am so lazy, trying to sleep as more as possible (*/ω\*).

Credits

kiraray's People

Contributors

cuteday avatar hineven avatar

Stargazers

Zike Xu 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.