Code Monkey home page Code Monkey logo

paths's Introduction

paths

paths is a software path-tracing renderer written in Rust.

It is purely a hobby-project for me to learn about this technology, and I had no idea how path-tracing worked (other than vague intuition) before starting.

Implementation Checklist

  • Basic path tracing of spheres
  • Point lights
  • Multithreading
  • Collision acceleration (BVH)
  • Textures
  • Triangle meshes
  • Normal smoothing (of triangle meshes)
  • Importance sampling
  • Reflective materials
  • Glossy materials
  • Microfacet specular model
  • Camera lens simulation
  • Next event estimation
  • HDRI Environment maps
  • Translucent materials (refraction)
  • Subsurface scattering
  • Bi-directional path tracing

Examples

[2020/05/23] Support for HDRI environment maps (thanks for HDRI Haven for the HDRIs!) image

[2020/05/15] Support for per-vertex colours baked into meshes (thanks to Artec3D for this awesome model): image

[2020/05/10] Rewritten large parts of the renderer so that the results match a reference renderer (Mitsuba) image image

[2020/05/04] Next event estimation to efficiently simulate point/area light sources image

[2020/04/22] Microfacet model to create shiny, rough teapot material image

[2019/03/14] Teapot model with ~6000 triangles and smoothed normals image

[2019/03/11] 500 randomly generated spheres image

[2019/03/07] Close up of green sphere with strong bokeh on the background image

[2019/03/05] 2 glossy spheres and one perfect mirror sphere on a reflective plane. image

[2019/03/03] 2 Spheres with large off-screen light source image

paths's People

Contributors

rynorris avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

paths's Issues

Implement proper material BRDFs

Right now my Gloss material is really just a frankenstein mashup of a lambertian and a mirror weighted by the fresnel term.

This gives surprisingly pleasant results, but is not able to represent lots of types of surface.

I should implement a "proper" BRDF which takes into account diffuse and specular terms as proper models.
Probably using Oren-nayar reflection for the diffuse component, and something sensible for the specular (take your pick: https://en.wikipedia.org/wiki/Specular_highlight).

Figure out if my random lens points are weighted incorrectly

Right now I just choose a uniformly random point on the lens.
I suspect that's incorrect, and in fact I should be doing a calculation similar to the one done for the lambertian surface, since rays from further out on the lens should contribute less to the pixel.

The slight problem being that the lens does not take up the full hemisphere (far from it). So I have to be careful to get the weights correct.

In addition, to be totally accurate, I should be taking into account the solid angle of the lens when weighting the final radiance values. Right now I'm forgetting about all the "rays" which hit the inside of the camera and die immediately, so I don't get a corresponding decrease in brightness when reducing the aperture size.

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.