You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
# CUDA Pathtracer
2
2
**A physically based renderer using CUDA**
3
3
4
-

5
-

6
-

4
+

5
+

6
+

7
7
*Scenes inspired by [Yining Karl Li's and Peter Kutz' GPU Pathtracer](https://www.yiningkarlli.com/projects/gpupathtracer.html)*
8
8
9
9
## Overview
@@ -35,13 +35,13 @@ I developed the application on a system with Ubuntu 18.04, an Nvidia GeForce GTX
35
35
36
36
The editor has basic functionality for placing and transforming objects and lights in the scene, creating and assigning materials, controlling the camera viewpoint in the OpenGL viewport and starting the renderer. Objects and materials are listed in the *Scene* and *Materials* tabs respectively and can be selected for further editing or deletion. Scene changes can be made during an active render and will be reflected in the progressively updated viewport. The editor has controls for enabling and disabling caustics and light sampling as well as for setting the maximum number of bounces. Light shape visibility during rendering can be set on a per light basis.
37
37
38
-

38
+

39
39

40
40
41
41
## Depth of Field
42
42
43
43
The extent of the focus area can be set with aperture and focus distance controls in the GUI. The effect is achieved by sampling the camera ray origin over a disc and setting its direction so that it would intersect the ideal ray going through a pinhole opening at the focus distance.
44
-

44
+

45
45
46
46
## Stratified Sampling
47
47
@@ -51,21 +51,21 @@ By randomly jittering the position of an image sample within a pixel, anti-alias
51
51
52
52
The renderer is capable of rendering fresnel modulated specular reflection and refraction. The rendering of caustics is a direct result of specular materials.
53
53
54
-

55
-

54
+

55
+

56
56
57
57
58
58
## Light Sampling
59
59
60
60
A path tracer that only relies on random outgoing directions to shade points on surfaces with diffuse materials will produce noisy images if the light sources in the scene are small or far away from a shading point (i.e. the light source has a low probabilty of being hit by a random outgoing direction). Directly sampling the direct lighting contribution for diffuse points can increase the convergence speed of a render enormously. To enable light sampling the renderer has to sample a point on a light source and then cast a shadow ray towards that point, only adding the radiance contribution if the ray between the shading point and the point on the light source is unoccluded.
61
61
62
-

63
-

62
+

63
+

64
64
*Approximately equal time comparison between no light sampling (top) and enabled light sampling (bottom)*
65
65
66
66
The quality of the light shape sampling method can have a great effect on the noise with respect to that light source. A good sampling algorithm will only sample points on the shape which can be potentially seen from the shading point (i.e. that are not occluded by the emitter shape itself, like points on the back of a sphere are for example). For the sphere and cube emitter shape sampling I uniformly sample over the entire surface area of the shape, which is not optimal. The above comparison shows all light shapes in one scene. The areas lit by the sphere and cube lights show much higher variance than those lit by the disc and plane lights, since there is no self occlusion with the latter shapes. The performance of sphere light sampling is especially bad when the light is very close to the shading point, since in this case only a fraction of the surface is visible from the point. Still for most use cases the improvement over an image without light sampling is enourmous.
67
67
68
-

68
+

69
69
*Light sampling with a spherical emitter. Note how areas closer to the light source resolve much less efficiently.*
0 commit comments