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 3: Di Lu #22

Open
wants to merge 105 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
cdfb96e
add images and complete base code with bsdf
dluisnothere Sep 24, 2022
b593d27
Update README.md
dluisnothere Sep 24, 2022
30fa181
first attempt specular surface
dluisnothere Sep 26, 2022
88ee1f0
add better glass
dluisnothere Sep 27, 2022
0342bd4
Finish glass shader
dluisnothere Sep 27, 2022
ff45051
add tinyObj
dluisnothere Sep 28, 2022
c07d401
Finish intersection cache
dluisnothere Sep 28, 2022
2ca7bfc
Finish obj loading with pictures
dluisnothere Sep 29, 2022
877c00d
Bounding box logic start
dluisnothere Sep 30, 2022
0ac75ca
fix bounding box issue 1
dluisnothere Sep 30, 2022
fbaeb34
Complete bounding box with OBJ.
dluisnothere Sep 30, 2022
a93b45d
Bound box add proper intersection
dluisnothere Sep 30, 2022
a49ab93
Finish Anti Aliasing
dluisnothere Oct 1, 2022
b2c5c5f
complete fix bounding box
dluisnothere Oct 1, 2022
9b9ec15
Refactor BOUND_BOX name to OBJ
dluisnothere Oct 1, 2022
75df745
Remove unnecessary comments
dluisnothere Oct 1, 2022
063597f
Change var names for readability
dluisnothere Oct 1, 2022
a4550f0
complete depth of field
dluisnothere Oct 2, 2022
465e8c8
remove unnecessary parameters from loadObj
dluisnothere Oct 2, 2022
31955a3
start texturing
dluisnothere Oct 5, 2022
f5dddf8
Direct lighting implementation and add cudaFree for member vars.
dluisnothere Oct 5, 2022
f2f75a5
complete RGBA texturing
dluisnothere Oct 6, 2022
1d69689
convert 24 bit depth to 32 bit depth textures
dluisnothere Oct 6, 2022
3e5a967
Add more textures
dluisnothere Oct 6, 2022
5a544d3
Complete texture and bogus bump mapping
dluisnothere Oct 7, 2022
ca0a92c
Update README.md
dluisnothere Oct 7, 2022
40a7ec8
Update README.md
dluisnothere Oct 7, 2022
f4768f2
Update README.md
dluisnothere Oct 7, 2022
9e173e7
change image name
dluisnothere Oct 7, 2022
84914e1
Update README.md
dluisnothere Oct 7, 2022
a2468c6
more descriptive specular name
dluisnothere Oct 7, 2022
89439e6
Update README.md
dluisnothere Oct 7, 2022
cad7cb7
Update README.md
dluisnothere Oct 7, 2022
c1d3435
crop mario photo
dluisnothere Oct 7, 2022
ad614f1
clean code
dluisnothere Oct 7, 2022
69338b3
forgot imperfect specular and new images
dluisnothere Oct 8, 2022
66d330a
change name
dluisnothere Oct 8, 2022
60cd5df
Update README.md
dluisnothere Oct 8, 2022
90df5f7
new image
dluisnothere Oct 8, 2022
8473c5b
Update README.md
dluisnothere Oct 8, 2022
4c659c2
Update README.md
dluisnothere Oct 8, 2022
f538010
Update README.md
dluisnothere Oct 8, 2022
141193f
Update README.md
dluisnothere Oct 8, 2022
697c1fd
add procedural texture and image
dluisnothere Oct 8, 2022
8804114
Update README.md
dluisnothere Oct 8, 2022
a07ef90
Link image add
dluisnothere Oct 8, 2022
863aa3b
Update README.md
dluisnothere Oct 8, 2022
a3a38ef
Update README.md
dluisnothere Oct 8, 2022
1855c5c
main renders
dluisnothere Oct 9, 2022
fbe0827
Update README.md
dluisnothere Oct 9, 2022
f79e70f
Update README.md
dluisnothere Oct 9, 2022
aee5437
Update README.md
dluisnothere Oct 9, 2022
09ada31
Update README.md
dluisnothere Oct 9, 2022
d189453
Update README.md
dluisnothere Oct 9, 2022
9aecfa0
Update README.md
dluisnothere Oct 9, 2022
f4d1f78
Update README.md
dluisnothere Oct 9, 2022
34f62a8
Update README.md
dluisnothere Oct 9, 2022
d338710
Update README.md
dluisnothere Oct 9, 2022
56b0eae
Update README.md
dluisnothere Oct 9, 2022
8f35780
Update README.md
dluisnothere Oct 9, 2022
b44ff41
Update README.md
dluisnothere Oct 9, 2022
989cf1b
Update README.md
dluisnothere Oct 9, 2022
8f17817
Update README.md
dluisnothere Oct 9, 2022
cc96641
Update README.md
dluisnothere Oct 9, 2022
fdb6b4d
Update README.md
dluisnothere Oct 9, 2022
7e79e89
Update README.md
dluisnothere Oct 9, 2022
dac2879
Update README.md
dluisnothere Oct 9, 2022
7c3084a
Update README.md
dluisnothere Oct 9, 2022
e1644b2
Update README.md
dluisnothere Oct 9, 2022
e8b92d9
Update README.md
dluisnothere Oct 9, 2022
03df6d9
Update README.md
dluisnothere Oct 9, 2022
3cde1ca
Update README.md
dluisnothere Oct 9, 2022
c3b2ba2
Update README.md
dluisnothere Oct 9, 2022
7a197ef
Update README.md
dluisnothere Oct 9, 2022
3f1762d
Update README.md
dluisnothere Oct 9, 2022
9056045
Update README.md
dluisnothere Oct 9, 2022
e861677
Update README.md
dluisnothere Oct 9, 2022
2e7a769
add more renders
dluisnothere Oct 9, 2022
586335f
Update README.md
dluisnothere Oct 9, 2022
ccc7d22
Update README.md
dluisnothere Oct 9, 2022
b205bc1
Update README.md
dluisnothere Oct 9, 2022
692156b
Update README.md
dluisnothere Oct 9, 2022
c0b8670
Update README.md
dluisnothere Oct 9, 2022
5b8f07f
Update README.md
dluisnothere Oct 9, 2022
13cdd6a
Update README.md
dluisnothere Oct 9, 2022
324b9e2
Update README.md
dluisnothere Oct 9, 2022
5d0b551
Update README.md
dluisnothere Oct 9, 2022
ab5c1eb
Update README.md
dluisnothere Oct 9, 2022
0235f6e
Update README.md
dluisnothere Oct 9, 2022
c6ff09d
Update README.md
dluisnothere Oct 9, 2022
56029f4
update img
dluisnothere Oct 9, 2022
eeebc77
Update README.md
dluisnothere Oct 9, 2022
127c293
Update README.md
dluisnothere Oct 10, 2022
13625df
add more images
dluisnothere Oct 10, 2022
1b03ddd
Update README.md
dluisnothere Oct 10, 2022
70a3652
Update README.md
dluisnothere Oct 10, 2022
8c9cc2b
rename cat
dluisnothere Oct 10, 2022
e8cb51c
Update README.md
dluisnothere Oct 10, 2022
3e6ac9f
performance measurements
dluisnothere Oct 10, 2022
5858783
Update README.md
dluisnothere Oct 10, 2022
4a221ac
Update README.md
dluisnothere Oct 10, 2022
15a8283
Update README.md
dluisnothere Oct 10, 2022
1325e42
Update README.md
dluisnothere Oct 10, 2022
84420c0
Update README.md
dluisnothere Oct 10, 2022
563d452
Update README.md
dluisnothere Oct 10, 2022
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ set(headers
src/sceneStructs.h
src/preview.h
src/utilities.h
src/ImGui/imconfig.h
src/tiny_obj_loader.h

src/ImGui/imgui.h
src/ImGui/imconfig.h
Expand Down
180 changes: 175 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,181 @@ CUDA Path Tracer

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

* (TODO) YOUR NAME HERE
* Tested on: (TODO) Windows 22, i7-2222 @ 2.22GHz 22GB, GTX 222 222MB (Moore 2222 Lab)
* Di Lu
* [LinkedIn](https://www.linkedin.com/in/di-lu-0503251a2/)
* [personal website](https://www.dluisnothere.com/)
* Tested on: Windows 11, i7-12700H @ 2.30GHz 32GB, NVIDIA GeForce RTX 3050 Ti

### (TODO: Your README)
## Introduction

*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.
In 3D rendering, Pathtracing is a technique that generates realistic looking scenes/images by simulating light ray bounces. For this project, I implemented a CUDA path tracer for the GPU. In order to get the least noisy final output, 5000 calls to pathtrace are made whenever the camera is moved. The result of all 5000 pathtrace calls are then averaged to produce the final output. For each call to pathtrace, the light rays in the scene will bounce a maximum of 8 times.

For this pathtracer, we parallelize operations by Rays (AKA Path Segments), and made sure to sync all threads before moving on to the next parallel operation.

Overall, this project is a continuation of learning how to write CUDA kernel functions, optimize performance by adding memory coalescence, and very simple acceleration structures. The second part of the project introduced me to using TinyObjLoader, CudaTextureObjects, and various rendering techniques to get specific visual effects.

![](img/main2.png)

_OBJ credit goes to SketchFab:_
* _Toon Link: [ThatOneGuyWhoDoesThings](https://sketchfab.com/3d-models/ssbb-toon-link-c4737326bee4445ab2a565952ad32eab) I painted over the model in Blender_
* _Stones: [Michael Hooper](https://sketchfab.com/3d-models/low-poly-rocks-9823ec262054408dbe26f6ddb9c0406e)_
* _Quartz: [Vergil190202](https://sketchfab.com/3d-models/crystalpack-25ff46fd33624c91b36307575b000891)_
* _Bottle: modified from [Steva_](https://sketchfab.com/3d-models/simple-low-poly-potion-bottles-a13c6858e8174bebbd58babc52f769c0)_

[Core Features](https://github.com/dluisnothere/Project3-CUDA-Path-Tracer#core-features):
* Simple Diffuse, Specular, and Imperfect Specular BSDF shading
* Path continuation/termination using stream compaction
* Continugous arrangement of materials based on materialId
* First-bounce-cache for a specific camera angle.

[Additional Features](https://github.com/dluisnothere/Project3-CUDA-Path-Tracer#additional-features)
* Refractive materials using Schlick's approximation
* Depth of Field
* Direct Lighting
* Stochastic-sampled antialiasing
* Arbitrary Mesh Loader with TinyObjLoader
* UV Texturing, Procedural Texturing, and Bump Mapping

## Scene File Description

The scene files used in this project are laid out as blocks of text in this order: Materials, Textures (if any), and Objects in the scene. Each Object has a description of its translation, scale, and rotation, as well as which material it's using, and if it's a basic shape (such as sphere or cube), then that is also specified. If not a basic shape, then it specifies a path to its obj. If the Object also has a texture, then it will refer to the Id of the texture. Using Ids to keep track of scene attributes prevent over-copying of shared data between Objects.

## Core Features
**Shading kernel with BSDF Evaluation for Diffuse and Perfect/Imperfect Specular.**

Each Object in the scene has a reference to its material. Each material has attributes representing Reflection, Refraction, Specular, Index of Refraction, Color, and Emittance. For each ray, once it has gotten information about the object it has hit, I use a random number generate to generate a float between 0 and 1. Using this number, each ray will behave in a probabilistic manner and will either reflect, refract, or completely diffuse randomly in a cosine-weighted hemisphere (for lambertian reflection) based on the Reflection and Refraction material values in the scene file.

**Path continuation/termination using Stream Compaction**

In order to avoid processing any unnecessary information, all paths which do not hit any of the Objects in the scene are removed from the list of active paths. This is done through the thrust library's built in stream-compaction function. Stream Compaction takes an array, runs a predicate on each element, and returns another list containing all the elements for which the predicate is true.

**Contiguous arrangement of materials based on materialId**

For scenes which have a lot of different materials, sorting materials based on materialId makes sense to make reading from global memory faster.

**First bounce caching**

Since we restart rendering the scene whenever the camera moves, we know that the first bounce for each call to pathtrace for one particular camera angle will always be constant. We know exactly which object our first rays will hit and where. This way, we can avoid re-computing the first intersections for each of the 5000 calls to pathtrace.

**Results of Core Features**

_All Materials Diffuse_ | _Specular Sphere_ | _Imperfect Specular_
:-------------------------:|:-------------------------:|:--------------------:
![](img/part1Final.png) | ![](img/part1FinalSpecular.png) | ![](img/imperfectSpecular.png)

## Additional Features
### Refractive Material

My implementation for refractive materials comes from [Physically Based Rendering](https://www.pbr-book.org/). If a ray decides it will refract, then I first get the material properties of material 1 and material 2 (in most cases, material 1 is air, which means it has an IOR of 1.003). Then, I obtain the incidence angle of my ray and the normal of the intersection point. Using this information, I can figure out if the angle is a critical angle or not. If it's a critical angle, then the light ray will simply bounce off the surface. Otherwise, it will refract. If the ray is inside the Object and a critical angle is hit, tjhen there will be total internal reflection.

This is the result of my refraction implementation:

_View 1_ | _View 2 without specular sphere_
:-------------------------:|:-------------------------:
![](img/Refractive.png) | ![](img/cornell.2022-09-28_22-10-45z.5000samp.png)

### Depth of Field

In order to obtain a depth of field effect, I referenced this online article: [Depth of Field in Path Tracing](https://medium.com/@elope139/depth-of-field-in-path-tracing-e61180417027#:~:text=Implementing%20depth%20of%20field%20in,out%20of%20focus%20will%20appear). Essentially, we determine two variables: FOCAL_LENGTH and APERTURE. FOCAL_LENGTH specifies how far away your focus point is (where the object becomes sharp). APERTURE is a proxy for how blurry everything out of focus should be. Once we know where the focal point P is in the scene, we can blur the rest of the scene by shifting our ray's origin and then recalculate direction such that it starts at the new origin and goes towards the focal point. These are my results:

_No Depth of Field_ | _Depth of Field_
:-------------------------:|:-------------------------:
![](img/noDepthOfField.png) | ![](img/depthFieldFinal.png)

### Stochastic Sampled Anti-Aliasing

Stochastic Sampled Anti-Aliasing can be implemented by applying a slight amount of random noise to the camera ray so that the direction of the ray gets information from its neighbors and can average out the color between neighbors, providing a softer transition. However, this means the first intersection will not always be determinant between pathtrace calls, which renders cache first bounce useless.

_No Antialiasing_ | _Antialiasing_
:-------------------------:|:-------------------------:
![](img/NoDirectLighting.png) | ![](img/antialiasing5000samp.png)
:-------------------------:|:-------------------------:
_No Antialiasing Closeup_ | _Antialiasing Closeup_
:-------------------------:|:-------------------------:
![](img/noAntialiasingCloseup.png) | ![](img/antialiasingCloseup.png)

### Direct Lighting

Direct Lighting was implemented by sending every ray with only 1 bounce left directly to a randomly selected lightsource in the scene. Here are the implementation results:

_No Direct Lighting_ | _Direct Lighting_
:-------------------------:|:-------------------------:
![](img/NoDirectLighting.png) | ![](img/DirectLighting.png)

### Arbitrary Mesh Loading with TinyObjLoader

In order to parse through an obj file, I used [tinyobjloader](https://github.com/tinyobjloader/tinyobjloader). After parsing, I created triangles and stored points within these triangles, alongside the normal and any other useful information like uv. If the bounding box is turned on, then the Obj geom would contain an array of triangles (host and device). This way, if there is only one obj, we only loop over triangles if the bounding box is hit. If the bounding box is turned off, then each triangle becomes its own geom, meaning we will iterate over all of them check for intersections, potentially wasting loops.

In order to initialize the device pointers for triangles, I cudaMalloc'd each geom's list of device triangles. To cudaFree them, I performed a cudaMemcpy for the outer pointers (geom pointers) and used those host-accessible pointers to cudaFree the member device vectors.

Here is the result:

![](img/refractKat.png)

_OBJ credit goes to [volkanongun](https://sketchfab.com/3d-models/low-poly-cat-1e7143dfafd04ff4891efcb06949a0b4) on SketchFab!_

### UV Texture, Procedural Texture and Bump Mapping

In order to read UV values and map them to a texture file (png, bmp, etc), I used CudaTextureObject (Documentation). First, I used stbi_loader to parse pixel information from a given png file. Then, I sent pixel information to an array of cudaArray objects, where each cudaArray object contains all pixels associated with a specific texture. I also have an array of cudaTextureObjects, where each cudaTextureObject acts as a "wrapper" for the pixel information so that sampling functions can be called on the pixel information. (However, as a result of using this, I have had to flip my textures vertically to work properly).

![](img/completeMario2.png)

![](img/myLink.png)

![](img/procedural.png)

I also implemented bump mapping for uv textures. I followed these slides for instructions on bump map calculations: https://www.ics.uci.edu/~majumder/VC/classes/BEmap.pdf

![](img/nobump.png)

![](img/yesBumpmap.png)

## Performance Analysis

**Stream compaction helps most after a few bounces. Print and plot the effects of stream compaction within a single iteration (i.e. the number of unterminated rays after each bounce) and evaluate the benefits you get from stream compaction.**

![](img/streamCompactionBasic.png)

![](img/depthVsTime.png)

From the above, I printed out the number of remaining paths after each iteration of the while loop inside pathtrace(). It shows Stream Compaction filtering out paths that don't hit anything. Similarly, the second graph shows that since the number of paths decrease on each loop, the runtime also decreases.

**Compare scenes which are open (like the given cornell box) and closed (i.e. no light can escape the scene). Again, compare the performance effects of stream compaction! Remember, stream compaction only affects rays which terminate, so what might you expect?**

My hypothesis is that since the scene is closed, all rays will hit something on each bounce. If the user starts within the cornell box, this means stream compaction won't remove any rays unless the light is hit or the path has run through its entire depth, since rays shot out of the camera cannot escape the box and "not hit" anything.

![](img/pathsNoCompaction.png)

![](img/runtimeClosedScene.png)

The results fit my origial hypothesis.

**Material Sorting Performance**

Implementing material sorting actually decreased the performance for scenes with 7 different types of materials and 27 different types of materials both. My understanding is that sorting the materials would make sense if the scene had a lot of materials (we could see a performance improvement if we had over 100 materials in one scene). However, compared between the performance with material sorting in 7Mat Scene vs. 27 Mat Scene, we can curiously see that 27 materials generally has lower runtime than 7 materials once we get to trace depth 4 and above.


***LOWER IS BETTER***
![](img/matSort.png)

**First Bounce Caching**

As explained earlier, first bounce caching is useful when we have one camera angle and running 5000 calls of pathtrace() on that one camera angle, because the first intersections by shooting rays from the camera to each pixel is deterministic. Based on the results below, we can see a slight increase in FPS by using first bounce cache.

![](img/cacheComparison.png)

**Bounding Box for OBJ**

Based on the results below, using a bounding box for OBJ will generally decrease the Runtime requried for the program overall. In this case, I recorded the output of the first 17 iterations. It can be observed that each iteration's runtime has the bound box scene running much faster than the non bound box scene.

![](img/boundbox.png)

## Bloopers! :)

Too much antialiasing: me without my contacts

![](img/antialiasing1.png)

Cursed Black Hole Wahoo

![](img/wtfWahoo.png)
Binary file added img/DirectLighting.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/NoDirectLighting.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/Refractive.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/antialiasing1.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/antialiasing2.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/antialiasing5000samp.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/antialiasingCloseup.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/boundbox.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/cacheComparison.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/cat2.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/catBoundBox.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/catscale2.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/completeMario.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/completeMario2.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.2022-09-24_19-16-48z.5000samp.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.2022-09-28_22-10-45z.5000samp.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.2022-10-09_22-31-51z.5000samp.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/cornellNoShadingNoStream.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/cornellNoShadingStream.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/cornellWtfShadingStream.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/cubeNormal.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/depth2NoDivideByIters.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/depthFieldFinal.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/depthOfField.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/depthOfField2.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/depthVsTime.png
Binary file added img/finalHD.png
Binary file added img/firstAttempt.png
Binary file added img/firstAttemptGlass.png
Binary file added img/firstCat.png
Binary file added img/fixedPart1Noisy.png
Binary file added img/freakyWahoo.png
Binary file added img/givenLambertDepth2.png
Binary file added img/givenLambertDepth3.png
Binary file added img/givenLambertDepth4.png
Binary file added img/glass2.png
Binary file added img/glass3.png
Binary file added img/imperfectSpecular.png
Binary file added img/kitty3.png
Binary file added img/kittyNormal.png
Binary file added img/kittyscale2.png
Binary file added img/main.png
Binary file added img/main2.png
Binary file added img/main3.png
Binary file added img/mainAntialiasing.png
Binary file added img/matSort.png
Binary file added img/more refract.png
Binary file added img/myLink.png
Binary file added img/newRaysOnlyDirectionNormal.png
Binary file added img/newRaysOnlyDirectionNormal2depth.png
Binary file added img/noAntialiasing.png
Binary file added img/noAntialiasingCloseup.png
Binary file added img/noDepthOfField.png
Binary file added img/noDivideByIters.png
Binary file added img/nobump.png
Binary file added img/part1Depth13.png
Binary file added img/part1Final.png
Binary file added img/part1FinalSpecular.png
Binary file added img/pathsNoCompaction.png
Binary file added img/procedural.png
Binary file added img/refractKat.png
Binary file added img/refractiveKittyMirror.png
Binary file added img/runtimeClosedScene.png
Binary file added img/start.png
Binary file added img/startCornell.png
Binary file added img/streamCompactionBasic.png
Binary file added img/tryingToSetColor.png
Binary file added img/usingGivenLambertFunction.png
Binary file added img/wtfWahoo.png
Binary file added img/yesBumpmap.png
Binary file added objs/.mayaSwatches/boxTex.png_hcm.swatch
Binary file not shown.
Binary file added objs/Trimm_Curvature.png
23 changes: 23 additions & 0 deletions objs/Trimm_Textures_Map.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Blender MTL File: 'Trimm_Textures_Map.blend'
# Material Count: 2

newmtl Dark
Ns 225.000000
Ka 0.791045 0.791045 0.791045
Kd 0.015995 0.015995 0.015995
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 3

newmtl Unity_Material
Ns 162.623844
Ka 0.732459 0.732459 0.732459
Kd 0.173025 0.173025 0.173025
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 3
map_Bump -bm 2.000000 Trimm_Normal_OpenGL.png
7 changes: 7 additions & 0 deletions objs/box.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
newmtl initialShadingGroup
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd boxOutline.png
Ni 1.00
Binary file added objs/boxOutline.png
Binary file added objs/boxTex.png
Binary file added objs/boxTex.tx
Binary file not shown.
6 changes: 6 additions & 0 deletions objs/cat.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
newmtl cat:lambert1
illum 4
Kd 1.00 0.64 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
16 changes: 16 additions & 0 deletions objs/crystals/crystal1.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
newmtl crystal1:BaseCrystal
illum 4
Kd 0.02 0.02 0.01
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 32.00
newmtl crystal1:Crystal
illum 4
Kd 0.00 0.00 0.00
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 250.00
32 changes: 32 additions & 0 deletions objs/crystals/crystal2.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
newmtl crystal1:BaseCrystal
illum 4
Kd 0.02 0.02 0.01
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 32.00
newmtl crystal1:Crystal
illum 4
Kd 0.00 0.00 0.00
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 250.00
newmtl crystal2:BaseCrystal
illum 4
Kd 0.02 0.02 0.01
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 32.00
newmtl crystal2:Crystal
illum 4
Kd 0.00 0.00 0.00
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 250.00
6 changes: 6 additions & 0 deletions objs/cube.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
newmtl cube:initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
6 changes: 6 additions & 0 deletions objs/cylinder.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
newmtl initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
94 changes: 94 additions & 0 deletions objs/dirt.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
newmtl crystal1:BaseCrystal
illum 4
Kd 0.02 0.02 0.01
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 32.00
newmtl crystal1:Crystal
illum 4
Kd 0.00 0.00 0.00
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 250.00
newmtl crystal2:BaseCrystal
illum 4
Kd 0.02 0.02 0.01
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 32.00
newmtl crystal2:Crystal
illum 4
Kd 0.00 0.00 0.00
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 250.00
newmtl initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl openBottle:Blue
illum 4
Kd 0.19 0.28 0.80
Ka 0.17 0.17 0.17
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 360.00
newmtl openBottle:Green
illum 4
Kd 0.25 0.80 0.14
Ka 0.17 0.17 0.17
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 360.00
newmtl openBottle:Pampur
illum 4
Kd 0.23 0.14 0.08
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 0.00
newmtl openBottle:Purple
illum 4
Kd 0.51 0.01 0.80
Ka 0.17 0.17 0.17
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 360.00
newmtl openBottle:White
illum 4
Kd 0.71 0.71 0.71
Ka 0.17 0.17 0.17
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 360.00
newmtl openBottle:Yellow
illum 4
Kd 0.80 0.80 0.80
Ka 0.17 0.17 0.17
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 360.00
newmtl openBottle:material
illum 4
Kd 0.80 0.09 0.07
Ka 0.17 0.17 0.17
Tf 1.00 1.00 1.00
Ni 1.50
Ks 0.50 0.50 0.50
Ns 360.00
Loading