| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Implemented a raytracer by following the Ray Tracing in One Weekend books by Peter Shirley.
My version extends the basic tracer described in Book 1 by adding: 0. Per-pixel variance estimation, early exit if noise if below a certain threshold. This speeds up rendering in the tested scenes by a factor of 3 to 4 while producing similar levels of visual noise. More complex parts of the image will be rendered using up to 20x more samples than simple parts of the scene.
sudo apt install libglm-dev libsfml-dev libpcg-cpp-dev
mkdir build
cd build
cmake ..
makeThen run the executable
./RaytracingWeekend
Caustics and dispersion from a sphere light through a triangle mesh.
Dispersion is visible at the edges of the glass spheres (rainbow colored edges)
Programatically generated scene with concentric glass spheres
Artifacts caused by race conditions between multiple threads which try to write into the image array.
All light rays that travelled through glass are colored in green for debugging purposes.
Rainbow produces by interpolating RGB looks unnatural and would not produce realistic dispersion.
Rainbow produced by simulating the intensity of different wavelengths using the planck spectrum. The wavelengths are convoluted by the sensitivity spectrum of our eyes receptors to get the color we would see. This produces a realistic spectrum image and much better dispersion.
Another advantage of this approach is that we can realistically simulate the color of blackbody radiation by setting the temperature of the object to the desired value.
2000K blackbody radiation
4500K blackbody radiation
8000K blackbody radiation
Image produced by changing the temperature of the lightsource during the render
Testing OBJ file loading
Simplified RGB dispersion model, debug image
Reference image of 3 spheres made from different materials
What happens if we apply a cross product instead of a dot product to the normals?
Debug view showing the BVH traversal cost, when splitting on the longest axis. Red is expensive, blue is cheap.
These three images show the effect of adaptive sampling. The first image is rendered with a constant number of samples per pixel and the second with adaptive sampling. Although the second image has the same total numer of samples as the first one, it has less visible noise (especially on the diffuse areas around the light and in shadows). The third image (black and white) shows which areas were sampled more often. The adaptive sampling algorithm estimates the variance of each pixel at runtime and decides whether to continue sampling or not.
| Back | FazBrowse Home | New Git URL |