Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project 4: Jacky Lu #8

Open
wants to merge 7 commits into
base: base-code
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Finished project
jackylu0124 committed Oct 10, 2020
commit 1d665705a7bd7cfd0e7ae6e692217c2958212d7a
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -8,8 +8,36 @@ CUDA Path Tracer


# README
## Features
### * Path Continuation/Termination With Stream Compaction
### * Material Sorting And Contiguous Material Memory
### * First Bounce Caching
### * Probabilistic BSDF
### * Physically-Based Depth Of Field
### * OBJ File Loading
### * Bounding Box Intersection Culling
### * Stratified Sampling
### * Stochastic Sampled Antialiasing

## Result (Default Scene File Settings):
=================================================================
## Results
### Ray Depth: 32 | Samples Per Pixel: 100,000 | Resolution: 1080 x 1080
![](img/cornell.2020-10-09_13-28-10z.100000samp.png)

### Ray Depth: 32 | Samples Per Pixel: 100,000 | Resolution: 1080 x 1080
### Depth of field enabled:
### Focal Distance: 8.5 | Lens Radius: 0.5
![](img/cornell.2020-10-09_06-40-36z.100000samp.png)

### Interactive Demo
### Ray Depth: 8 | Samples Per Pixel: 5,000 | Resolution: 800 x 800
![](img/gpu_pathtracer.gif)

#### Bunny Model Credit:
Low Poly Stanford Bunny (http://www.thingiverse.com/thing:151081) by johnny6 is licensed under the Creative Commons - Attribution - Non-Commercial license.
http://creativecommons.org/licenses/by-nc/3.0/

![](img/cornell.2020-10-01_03-36-20z.5000samp.png)
![](img/cornell.2020-10-01_03-36-20z.5000samp.png)

### Performance Analysis (Default Scene File Settings):
Binary file added img/cornell.2020-10-08_15-19-23z.100000samp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/gpu_pathtracer.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
337 changes: 337 additions & 0 deletions scenes/Low_Poly_Stanford_Bunny/LICENSE.txt

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions scenes/Low_Poly_Stanford_Bunny/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.: :,
,:::::::: ::` ::: :::
,:::::::: ::` ::: :::
.,,:::,,, ::`.:, ... .. .:, .:. ..`... ..` .. .:, .. :: .::, .:,`
,:: ::::::: ::, ::::::: `:::::::.,:: ::: ::: .:::::: ::::: :::::: .::::::
,:: :::::::: ::, :::::::: ::::::::.,:: ::: ::: :::,:::, ::::: ::::::, ::::::::
,:: ::: ::: ::, ::: :::`::. :::.,:: ::,`::`::: ::: ::: `::,` ::: :::
,:: ::. ::: ::, ::` :::.:: ::.,:: :::::: ::::::::: ::` :::::: :::::::::
,:: ::. ::: ::, ::` :::.:: ::.,:: .::::: ::::::::: ::` :::::::::::::::
,:: ::. ::: ::, ::` ::: ::: `:::.,:: :::: :::` ,,, ::` .:: :::.::. ,,,
,:: ::. ::: ::, ::` ::: ::::::::.,:: :::: :::::::` ::` ::::::: :::::::.
,:: ::. ::: ::, ::` ::: :::::::`,:: ::. :::::` ::` :::::: :::::.
::, ,:: ``
::::::::
::::::
`,,`


http://www.thingiverse.com/thing:151081
Low Poly Stanford Bunny by johnny6 is licensed under the Creative Commons - Attribution - Non-Commercial license.
http://creativecommons.org/licenses/by-nc/3.0/

# Summary

Stanford Bunny on a polygon budget!
Polycount: 292
Points: 148
3 changes: 3 additions & 0 deletions scenes/Low_Poly_Stanford_Bunny/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Sources for Low Poly Stanford Bunny

Stanford Bunny -- Digitized! (http://www.thingiverse.com/thing:88208)
41 changes: 41 additions & 0 deletions scenes/Low_Poly_Stanford_Bunny/attribution_card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!-- from http://www.thingiverse.com/thing:8174 by whosawhatsis, used with permission -->
<style type="text/css">
#tagback {padding: 50px;background: white;}
.tag {position: relative;border: 1px solid #eeeeee;width: 450px;height: 150px;margin: 0px;padding: 10px 10px 10px 120px;}
.tag .qrcode-sidebar {float: right;margin: 0px;padding: 0px;}
.tag a {color: black;text-decoration: none;}
.tag h1 {font: bold 18px Arial,sans-serif;margin: 0px;padding: 0px;}
.tag h2 {font: 14px Arial,sans-serif;margin: 0px;padding: 0px;}
.tag h3 {font: 12px Courier,monospace;margin: 0px;padding: 0px;}
.tag h4 {font: 9px Arial,sans-serif;position: absolute;bottom: 0px;left: 0px;margin: 0px 150px 0px 0px;padding: 0px;}
.tag h4 div {float: left;margin: 0px 5px 15px 125px;height: 40px;}
.tag h4 div img {height: 40px;}
</style>

<div id="tagback"><div class="tag">
<div class="qrcode-sidebar">
<img src="http://chart.apis.google.com/chart?chs=150x150&cht=qr&chl=thingiverse.com/thing:151081&choe=UTF-8&chld=Q|1">
</div>
<h1>Low Poly Stanford Bunny by johnny6</h1>
<h2>Published on September 15, 2013</h2>
<h3>www.thingiverse.com/thing:151081</h3>
<h4>
<div class="row-fluid cc-licenses">
<span class="span4">
<img src="http://www.thingiverse.com/img/cc/chooser_cc.png" />
</span>
<span class="span4">
<img src="http://www.thingiverse.com/img/cc/chooser_by.png" />
</span>
<span class="span4">
<img src="http://www.thingiverse.com/img/cc/chooser_nc.png" />
</span>
</div>
Creative Commons - Attribution - Non-Commercial<br /></h4>
</div></div>

<script>
window.onload = function(){
document.getElementById('tagback').appendChild(document.getElementById('tagback').firstChild.cloneNode(true));
};
</script>
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
95 changes: 76 additions & 19 deletions scenes/cornell_test.txt → scenes/bunny_demo.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Emissive material (light)
MATERIAL 0
RGB 1 1 1
RGB 1 0.96 0.92
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
EMITTANCE 10
EMITTANCE 18

// Diffuse white
MATERIAL 1
@@ -58,14 +58,54 @@ REFR 1
REFRIOR 1.5
EMITTANCE 0

// Glass Pink
MATERIAL 6
RGB 0.98 0.62 0.77
SPECEX 0
SPECRGB 0.98 0.62 0.77
REFL 0
REFR 1
REFRIOR 1.5
EMITTANCE 0

// Diffuse light blue
MATERIAL 7
RGB .72 .89 .95
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
EMITTANCE 0

// Diffuse dark blue
MATERIAL 8
RGB 0 .65 .72
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
EMITTANCE 0

// Glass Green
MATERIAL 9
RGB 0.89 1.0 0.84
SPECEX 0
SPECRGB 0.89 1.0 0.84
REFL 0
REFR 1
REFRIOR 1.5
EMITTANCE 0

// Camera
CAMERA
RES 800 800
FOVY 45
ITERATIONS 5000
DEPTH 8
FILE cornell
EYE 0.0 5 10.5
EYE 0.0 5 8.5
LOOKAT 0 5 0
UP 0 1 0

@@ -81,55 +121,72 @@ SCALE 3 .3 3
// Floor
OBJECT 1
cube
material 1
material 8
TRANS 0 0 0
ROTAT 0 0 0
SCALE 10 .01 10
SCALE 20 .01 20

// Ceiling
OBJECT 2
cube
material 1
TRANS 0 10 0
ROTAT 0 0 90
SCALE .01 10 10
SCALE .01 20 20

// Back wall
OBJECT 3
cube
material 1
TRANS 0 5 -5
ROTAT 0 90 0
SCALE .01 10 10
SCALE .01 20 20

// Left wall
OBJECT 4
cube
material 2
material 1
TRANS -5 5 0
ROTAT 0 0 0
SCALE .01 10 10
SCALE .01 20 20

// Right wall
OBJECT 5
cube
material 3
TRANS 5 5 0
material 5
TRANS 10 5 0
ROTAT 0 0 0
SCALE .01 10 10
SCALE .01 20 20

// Sphere
// Sphere metal
OBJECT 6
sphere
material 4
TRANS -1 4 -1
TRANS 4.2 1 0.75
ROTAT 0 0 0
SCALE 3 3 3
SCALE 2 2 2

// Sphere
// Front wall
OBJECT 7
sphere
cube
material 1
TRANS 0 5 10
ROTAT 0 -90 0
SCALE .01 20 20

// Right wall 2
OBJECT 8
cube
material 5
TRANS 1 4 2
TRANS 9 5 0
ROTAT 0 0 0
SCALE .01 20 20


// Sphere glass
OBJECT 9
sphere
material 9
TRANS 1.8 1 2.3
ROTAT 0 0 0
SCALE 3 3 3
SCALE 2 2 2
Loading