Giter Site home page Giter Site logo

knightcrawler25 / optix-pathtracer Goto Github PK

View Code? Open in Web Editor NEW
311.0 13.0 36.0 130.17 MB

Simple physically based path tracer based on Nvidia's Optix Ray Tracing Engine

Python 0.06% CMake 2.63% C 56.59% C++ 13.82% Cuda 1.03% CSS 0.38% HTML 23.50% JavaScript 0.46% Objective-C 1.42% Shell 0.01% SWIG 0.01% Less 0.10%
optix raytracing pathtracing gpu cuda disney brdf

optix-pathtracer's Introduction

OptixPathTracer

Dining Room Dining Room

โš ๏ธ Warning

Code in this repo was written for an older version of OptiX (5.x) and the repo is not maintained anymore. I would recommend using the newer OptiX 7.x API. Have a look at the following repos:

https://github.com/NVIDIA/OptiX_Apps
https://github.com/owl-project/owl
https://github.com/shocker-0x15/OptiX_Utility

If you're specifically looking for an implementation of the Disney BSDF then have a look at PBRT-v3 or my other repo

A physically based path tracer with support for Disney BRDF.

This was created by putting together bits and pieces from the Nvidia's Optix Advanced Samples Introduction tutorials. The feature set is very basic since this is just a learning excercise, so if you see horribly written code or things that can be done in a much better way please do share :)

Features

( Almost all were part of existing code from the Nvidia's Optix Advanced Samples Repository on Github )

  • Unidirectional Path Tracing
  • Disney BRDF
  • Simple Glass BTDF
  • Sphere and Rect lights
  • Multiple Importance Sampling
  • Mesh Loading
  • Simple Scene File (Basically stolen from Miles Macklin's excellent Tinsel renderer ) so all credits go to him.

For the modified .obj files that go with the scene files, unzip the data.rar file in src/data/ into the same folder

Following are some scenes rendered with the path tracer

Bedroom Bedroom

Spaceship (Render Time: ~6 minutes on a GTX 750ti) Spaceship

Stormtrooper (Render Time: ~4 minutes) Stormtrooper

Coffee Pot (Render Time: 4 minutes. 1k spp) Coffee Pot

Remake of the Disney Hyperion Scene (Render Time: Quite long) Hyperion Scene

Dragon closeup

Thanks to Simon Kallweit for helping me out with the importance sampling code. He also has a nice write up of his implementation

Models are from Benedikt Bitterli's Rendering Resources.

optix-pathtracer's People

Contributors

aidinabedi avatar knightcrawler25 avatar mmirman avatar

Stargazers

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

Watchers

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

optix-pathtracer's Issues

About Anti-aliasing

The result of Optix-PathTracer is amazing!

But it seems that the window of the scene bedroom is serrated, is there something error about anti-aliasing?

aliasing

Unknown option -s

How can I give input to the program? I have downloaded a blend file (scene?) and here is the command I use

$ ./optixPathTracer -s ../../samples/grey.white.room.03.bs.blend
Unknown option '-s'

Usage: ./optixPathTracer [options]
App Options:
  -h | --help                  Print this usage message and exit.
  -f | --file <output_file>    Save image to file and exit.
  -n | --nopbo                 Disable GL interop for display buffer.
  -s | --scene                 Provide a scene file for rendering.
App Keystrokes:
  q  Quit
  s  Save image to 'optixPathTracer.png'
  f  Re-center camera

RT_CALLABLE_PROGRAM??

I run sample I was caught exception as follows.
OptiX Error: 'Invalid context (Details: Function "_rtProgramGetId" caught exception: Validation error: _Z6SampleR17MaterialParameterR5StateR19PerRayData_radiance function with semantic type BINDLESS_CALLABLE_PROGRAM accesses the rtCurrentRay semantic variable.)'

What's up??

I Develop under Optix 6.0,0.

How can I debug cu files?

I'm very glad to see this awesome project. But when I try to write some different shaders, I fail to set breakpoint in neither the .cu files nor the compiled ptx files with cuda-gdb. Could you please give me some guidance about the debug?

About scene Dinning-room

Hi!
Thanks for your amazing job!
Could you please tell me how you convert the dining-room.blend file to many separate obj files? I use blender to read dining-room.blend and then export to obj, but I could only get one big obj file.
Thanks for your help!

Segmentation fault at ilInit()

Couple of question:
1- Is it fine to load a render over ssh with X11 forwarding?
2- Should OpenGL driver be installed with the Nvidia driver?

Currently, I am sshing to a node with "ssh -Y". The segmentation fault I receive is at:

$ ./optixPathTracer -scene ../../src/data/bedroom.scene
material Boxes
material PlasticCable
material LampEmitter
material Blankets
material Bedsheets
material Window
material PictureBacking
material Picture
material Rocks1
material Rocks2
material Rocks3
material DecoPlant
material Painting1
material Painting2
material Painting3
material Carpet
material Matress
material WoodFloor
material Walls
material Walls2
material WoodFurniture
material Mirror
material Aluminium
material BookCover
material BookPages
material LampMetal
material Vase
material Glass
material PictureFrame
material CurtainRod
material Curtains
material StainlessSmooth
        material Curtains
        material Curtains
Segmentation fault (core dumped)

I built the Debug binary and with gdb, I see

material StainlessSmooth
        material Curtains
        material Curtains

Program received signal SIGSEGV, Segmentation fault.
0x000000000026737c in ?? ()
(gdb) bt
#0  0x000000000026737c in ?? ()
#1  0x0000555555588b3a in main (argc=3, argv=0x7fffffffe7a8)
    at /mnt/local/mnaderan/op/Optix-PathTracer/src/optixPathTracer/optixPathTracer.cpp:669

That line is here.

Is seems that IL (or DevIL) is needed here. I am not sure what may cause this error?
DevIL, OpenGL, X11 forwarding, ...

Any feedback?

Question about subsurface scattering

Hi,

I tried the SSS material provided by the Disney BRDF in this path tracer, but I couldn't achieve the nice translucency effect of subsurface scattering.

Below is a description of the SSS material

material sss
{
color 0.79 0.8 0.04
roughness 0.17
specular 0.5
subsurface 1.0
clearcoat 1.0
clearcoatGloss 0.93
}

sss_optix
For comparison, the same scene in Blender:
sss_blender

Any tips on how to achieve this effect?

is not working on the latest update

I have tried to build the project with latest optix 7.3 and cuda 11.3 with visual studio 2019. However it did not work. Is there any upgradation plan for this project?

Where to set DevIL

At the end of build I see some messages related to DevIl

[100%] Linking CXX executable ../bin/optixPathTracer
/usr/bin/x86_64-linux-gnu-ld: /home/mahmood/Optix-PathTracer/src/support/DevIL/lib/x64/Release/DevIL.lib(DevIL.dll): Recognised but unhandled machine type (0x8664) in Import Library Format archive

I didn't find any variable for DevIL. I have that but don't know how to tell Optix-PathTracer.

Animation

Hi, it is a very nice project!!
I want to add some animation to the objects, I tried to add transform node to the GeometryGroup, similar as Optix sample "optixDynamicGeometry", the object did move, but it seems the shading and reflection are not correct, do you know why? Thanks!
00000

00001
00002

How to load a scene

Hi,

can you briefly explain how to load the scenes after extracting data.rar into src/data?

Thanks!

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.