Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 99 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,105 @@ CUDA Denoiser For CUDA Path Tracer

**University of Pennsylvania, CIS 565: GPU Programming and Architecture, Project 4**

* (TODO) YOUR NAME HERE
* Tested on: (TODO) Windows 22, i7-2222 @ 2.22GHz 22GB, GTX 222 222MB (Moore 2222 Lab)
* Xiaoxiao Zou
* [LinkedIn](https://www.linkedin.com/in/xiaoxiao-zou-23482a1b9/)
* Tested on: Windows 11, AMD Ryzen 9 7940HS @ 4.00 GHz, RTX 4060 Laptop

### (TODO: Your README)
Implement Edge avoiding A-Trous wavelet transform and Edge avoiding Guassian filtering

*DO NOT* leave the README to the last minute! It is a crucial part of the
project, and we will not be able to grade you without a good README.
### Performance & Analysis

<table>
<tr>
<td>SPP at original image/noisy image </td>
<td>original images </td>
<td>noisy image at lower spp</td>
<td>denoised image</td>
</tr>
<tr>
<td> 2000spp/204 spp </td>
<td>
<img src="./img/cornell.png" width= 300px >
</td>
<td>
<img src="./img/cornell_n.png" width= 300px >
</td>
<td>
<img src="./img/cornell_d.png" width= 300px >
</td>
</tr>
<tr>
<td> 3500spp/504 spp </td>
<td>
<img src="./img/teapot.png" width= 300px >
</td>
<td>
<img src="./img/teapot_n.png" width= 300px >
</td>
<td>
<img src="./img/teapot_d.png" width= 300px >
</td>
</tr>
<tr>
<td> 5000spp/1140 spp </td>
<td>
<img src="./img/teapot2.png" width= 300px >
</td>
<td>
<img src="./img/teapot2_n.png" width= 300px >
</td>
<td>
<img src="./img/teapot2_d.png" width= 300px >
</td>
</tr>
</table>

Denoising will give an "acceptably smooth" result at lower iteration as shown above, however, the image also get somehow blurred out due to the denoising filter.

#### Denoising Runtime - filter size, resolution

![](./img/filter_size.png)
![](./img/resolution.png)

Denoising will add more time to the renders. For A-Trous, it usually slow down the renderer about 10-20FPS. For Guassian, it slower the renderer a lot especially when the filter size is large. Larger filter size will genuinely add more time to the renders. For A-Trous, it adds slightly more time since number of levels need to compute did not increase much as the filter size goes larger and larger. However, for guassian, FPS get a huge markdown due to increasing size of kernel. For resolution, smaller resolution will give better runtime for both unfiltered and denoised image. Denoising will be a good technique for smaller resolution since the image will be blurry anyway for small image, this gives a better approximation for image.

#### Denoising Visual effect - Filter size, material type, etc.

Denoising visual effect does depends on filter size, however, the visual quality does not scale uniformly with filter size. For image that itself contains a lot of details, when filter size is large, it will lose the smaller details as the filter size get larger. The visual quality scale with image only if it does not exceed the threshold that it will starts to blur out the details. Here are images with filter size 10,20,40,80. Note the details of teapot lower bottom with light reflection starts to fade out when filter size is large.

<div>
<img src="./img/teapot_10_d.png" style="display:inline;" width=200px>
<img src="./img/teapot_20_d.png" style="display:inline;" width=200px>
<img src="./img/teapot_40_d.png" style="display:inline;" width=200px>
<img src="./img/teapot_80_d.png" style="display:inline;" width=200px>
</div>

Denoising filter gives good result when there is huge change in color contrast or object contrast, however, for objects that is smooth and simple color shaded, it will genuinely lose details for small shading in the geometry. For materials such as metallic or glass, it genuinely gives better result. For materials such as diffuse, sometimes, it will lose the details. Same scene as last section but change the material, the glass gives good approximation at around 500spp, whereas the lambert one gives good appromixation around 1000spp.

<div>
<img src="./img/teapot3_n_500.png" style="display:inline;" width=200px>
<img src="./img/teapot3_d_500.png" style="display:inline;" width=200px>
</div>

For scene between cornell.txt and cornell_ceiling_light.txt, denoising filter gives better approximation for cornell_ceiling_light. In the ceiiling_light scene, there is larger ligt object, that allows the scene to be less noisy (larger possibility to hit the light source). Here are images at 21 spp for two scenes with same filter size.

Cornell:

<div>
<img src="./img/C_21_n.png" style="display:inline;" width=300px>
<img src="./img/C_21_d.png" style="display:inline;" width=300px>
</div>

Cornell_ceiling_light:

<div>
<img src="./img/CL_21_n.png" style="display:inline;" width=300px>
<img src="./img/CL_21_d.png" style="display:inline;" width=300px>
</div>

Guassian filter-a Trous filter
As I observed, I did not find any obvious visual difference between these two filters. Image shown with a-Trous and guassian.
<div>
<img src="./img/atrous.png" style="display:inline;" width=300px>
<img src="./img/guassian.png" style="display:inline;" width=300px>
</div>
Binary file added img/CL_21_d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/CL_21_n.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/C_21_d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/C_21_n.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/atrous.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/cornell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/cornell_d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/cornell_n.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/filter_size.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/guassian.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/resolution.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/teapot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/teapot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/teapot2_d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/teapot2_n.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/teapot3_d_500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/teapot3_n_500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/teapot_10_d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/teapot_20_d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/teapot_40_d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/teapot_80_d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/teapot_d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/teapot_n.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mesh/bathroom/10-14-13-Texture-28.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mesh/bathroom/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mesh/bathroom/4839707-black-soil-texture.jpg
Binary file added mesh/bathroom/bathroom.max
Binary file not shown.
Binary file added mesh/bathroom/q.jpg
Binary file added mesh/bathroom/q.tga
Binary file not shown.
Binary file added mesh/bathroom/towel bump.jpg
Binary file added mesh/bathroom/towel.jpg
Binary file added mesh/bathroom/white_wall bump.png
Binary file added mesh/bathroom/white_wall.png
Binary file added mesh/bathroom/wood-texture bump.jpg
Binary file added mesh/bathroom/wood-texture.jpg
5 changes: 5 additions & 0 deletions mesh/cube.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
newmtl initialShadingGroup
illum 4
Kd 1.00 1.00 0.00
Ka 0.00 0.00 0.00
Ni 0.00
Binary file added mesh/cube_diffuse.png
9 changes: 9 additions & 0 deletions mesh/cube_norm.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
newmtl blinn1SG
illum 2
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tr 0.00
//map_Kd cube_diffuse.png
//norm cube_norm.png
Ni 1.00
Ks 0.50 0.50 0.50
Binary file added mesh/cube_norm.png
7 changes: 7 additions & 0 deletions mesh/cube_text2.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
newmtl lambert2SG
illum 2
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tr 0.0
map_Kd cube_text2.png
Ni 1.00
Binary file added mesh/cube_text2.png
Binary file added mesh/default.jpg
Loading