diff --git a/hw3/images/example_image.jpg b/hw3/images/example_image.jpg new file mode 100644 index 00000000..4cd77ba1 Binary files /dev/null and b/hw3/images/example_image.jpg differ diff --git a/hw3/images/example_image.png b/hw3/images/example_image.png new file mode 100644 index 00000000..186c627d Binary files /dev/null and b/hw3/images/example_image.png differ diff --git a/hw3/images/image1.png b/hw3/images/image1.png new file mode 100644 index 00000000..a77357ec Binary files /dev/null and b/hw3/images/image1.png differ diff --git a/hw3/images/image10.png b/hw3/images/image10.png new file mode 100644 index 00000000..ca2817a3 Binary files /dev/null and b/hw3/images/image10.png differ diff --git a/hw3/images/image11.png b/hw3/images/image11.png new file mode 100644 index 00000000..69d3db8d Binary files /dev/null and b/hw3/images/image11.png differ diff --git a/hw3/images/image12.png b/hw3/images/image12.png new file mode 100644 index 00000000..9838b81d Binary files /dev/null and b/hw3/images/image12.png differ diff --git a/hw3/images/image13.png b/hw3/images/image13.png new file mode 100644 index 00000000..8b9bb4c3 Binary files /dev/null and b/hw3/images/image13.png differ diff --git a/hw3/images/image14.png b/hw3/images/image14.png new file mode 100644 index 00000000..04e56c77 Binary files /dev/null and b/hw3/images/image14.png differ diff --git a/hw3/images/image15.png b/hw3/images/image15.png new file mode 100644 index 00000000..4acc6079 Binary files /dev/null and b/hw3/images/image15.png differ diff --git a/hw3/images/image16.png b/hw3/images/image16.png new file mode 100644 index 00000000..ea90f8e3 Binary files /dev/null and b/hw3/images/image16.png differ diff --git a/hw3/images/image17.png b/hw3/images/image17.png new file mode 100644 index 00000000..66ba17a3 Binary files /dev/null and b/hw3/images/image17.png differ diff --git a/hw3/images/image18.png b/hw3/images/image18.png new file mode 100644 index 00000000..ce4086f1 Binary files /dev/null and b/hw3/images/image18.png differ diff --git a/hw3/images/image19.png b/hw3/images/image19.png new file mode 100644 index 00000000..6b7d70a5 Binary files /dev/null and b/hw3/images/image19.png differ diff --git a/hw3/images/image2.png b/hw3/images/image2.png new file mode 100644 index 00000000..62dca929 Binary files /dev/null and b/hw3/images/image2.png differ diff --git a/hw3/images/image20.png b/hw3/images/image20.png new file mode 100644 index 00000000..cbb2bddd Binary files /dev/null and b/hw3/images/image20.png differ diff --git a/hw3/images/image21.png b/hw3/images/image21.png new file mode 100644 index 00000000..d51ccb76 Binary files /dev/null and b/hw3/images/image21.png differ diff --git a/hw3/images/image22.png b/hw3/images/image22.png new file mode 100644 index 00000000..a070c0fd Binary files /dev/null and b/hw3/images/image22.png differ diff --git a/hw3/images/image23.png b/hw3/images/image23.png new file mode 100644 index 00000000..58db4219 Binary files /dev/null and b/hw3/images/image23.png differ diff --git a/hw3/images/image24.png b/hw3/images/image24.png new file mode 100644 index 00000000..e2c65502 Binary files /dev/null and b/hw3/images/image24.png differ diff --git a/hw3/images/image25.png b/hw3/images/image25.png new file mode 100644 index 00000000..f6d09024 Binary files /dev/null and b/hw3/images/image25.png differ diff --git a/hw3/images/image26.png b/hw3/images/image26.png new file mode 100644 index 00000000..867b7c2d Binary files /dev/null and b/hw3/images/image26.png differ diff --git a/hw3/images/image27.png b/hw3/images/image27.png new file mode 100644 index 00000000..e6f6716c Binary files /dev/null and b/hw3/images/image27.png differ diff --git a/hw3/images/image28.png b/hw3/images/image28.png new file mode 100644 index 00000000..77bbafc4 Binary files /dev/null and b/hw3/images/image28.png differ diff --git a/hw3/images/image29.png b/hw3/images/image29.png new file mode 100644 index 00000000..b4e2409d Binary files /dev/null and b/hw3/images/image29.png differ diff --git a/hw3/images/image3.png b/hw3/images/image3.png new file mode 100644 index 00000000..9c9c1b29 Binary files /dev/null and b/hw3/images/image3.png differ diff --git a/hw3/images/image30.png b/hw3/images/image30.png new file mode 100644 index 00000000..6ddd754f Binary files /dev/null and b/hw3/images/image30.png differ diff --git a/hw3/images/image4.png b/hw3/images/image4.png new file mode 100644 index 00000000..ef8bd01c Binary files /dev/null and b/hw3/images/image4.png differ diff --git a/hw3/images/image5.png b/hw3/images/image5.png new file mode 100644 index 00000000..b0f8ffdf Binary files /dev/null and b/hw3/images/image5.png differ diff --git a/hw3/images/image6.png b/hw3/images/image6.png new file mode 100644 index 00000000..352e2047 Binary files /dev/null and b/hw3/images/image6.png differ diff --git a/hw3/images/image7.png b/hw3/images/image7.png new file mode 100644 index 00000000..720b5625 Binary files /dev/null and b/hw3/images/image7.png differ diff --git a/hw3/images/image8.png b/hw3/images/image8.png new file mode 100644 index 00000000..8c7a9f6e Binary files /dev/null and b/hw3/images/image8.png differ diff --git a/hw3/images/image9.png b/hw3/images/image9.png new file mode 100644 index 00000000..ce0cd354 Binary files /dev/null and b/hw3/images/image9.png differ diff --git a/hw3/index.html b/hw3/index.html index c30176bc..75f0ba74 100644 --- a/hw3/index.html +++ b/hw3/index.html @@ -1,7 +1,509 @@ - -
- - - Homework 3 index.html here - - \ No newline at end of file + + + + +
+
+ |
All of the text in your write-up should be in your own words. If you need to add additional HTML features to this document, you can search the http://www.w3schools.com/ website for instructions. To edit the HTML, you can just copy and paste existing chunks and fill in the text and image file names appropriately.
+If you are well-versed in web development, feel free to ditch this template and make a better looking page.
+ + +Here are a few problems students have encountered in the past. Test your website on the instructional machines early!
+"./images/image.jpg"+Do NOT use absolute paths, such as
"/Users/student/Desktop/image.jpg"
.png != .jpeg != .jpg != .JPG
Here is an example of how to include a simple formula:
+a^2 + b^2 = c^2+
or, alternatively, you can include an SVG image of a LaTex formula.
+ ++ In this project, the primary focus was on ray training and all the lighting techniques that come with it. We first implement ray generation as well as an efficient algorithm (the BVH) to render the images faster. We next implemented various methods that showcase variations of shadow distribution, clarity, and graininess. The crux of this project focuses on using different illumination methods: direct illumination through uniform sampling over a hemisphere vs importance light sampling which is then used to implement global illumination to create the most realistic renders possible. It was very nice to see niche techniques such as the Russian roulette trick to better estimate light bounces to create better images and was cool to wrap it up with a function that visualizes sampling. Very good project that incurs a lot of information. +
++ To implement ray generation, first loop through ns_aa random samples given pixel. We then update the sample buffers to include the average illumination of each given formula. Transform the ray from image space into camera space the translate the point to the correct ratio. + +
++ To implement triangle intersections, check for intersection (using the formula given), then calculate barycentric coordinates at each point. A similar method is used for sphere intersection in the next part, except use the sphere formulas instead. +
+NOTE: I COMPLETED THE PROJECT BEFORE DOING THE WRITE UP. A HUGE MISTAKE ON MY END, but I still have some saved pictures. Just not when required 3-4 images.
+ +
+
+ |
+
+
+
+ |
+
+ There is almost a whole 5 minute difference between having the BVH acceleration and not having it. We are removing millions of intersection tests thanks to the optimization that BVH acceleration gives us! +
++ Hemisphere: We will be iterating through a number of samples, sampled from the Hemisphere at hit_p. For each sample, we sample the direction of wi_in. Translate this to the world, then we are ready to create a new ray from hit_p to the sample (also have to multiply EPS_F to the direction). If we find an intersection between the ray and the light sample, we add radiance to the L_out given rendering equation. Finally, average L_out by number of samples. + Importance: A bit different here, but should follow the same concept of finding intersection. Instead of a hemisphere, we directly sample from lights. We will iterate over each light in the scene. Within each light, we first check if it is a delta light. If it is, sample once, if not, sample over the light area. Once we have the sample size, we then iterate through each sample like the last. The calculations for each ray will be a bit different. We want variables, distancetolight, pdf, wi, and hit_p. Get through sample_L function. Once we have these we can construct the shadow ray, but only if w_in.z is greater than 0. I checked this because we would not want a ray that intersects the light. Next, construct the ray. I had huge issues here regarding calculations but found that there was heavy importance in setting the ray’s min_t and max_t. Fixed my issue by setting min_t to EPS_F and max_t to distTolight - EPS_F. Next, find the intersection and if found, add radiance (divided by pdf and num_samples) to L_out. + +
+ ++ Uniform Hemisphere Sampling + | ++ Light Sampling + | +
---|---|
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+ As we up the lightrays, we notice that the noise continuously decreases into a smooth (almost no noise) blur. +
++ We can see the difference in the graininess of the rendered images. Sampling uniformly is faster but is less accurate, there is almost too much noise created by uniform sampling. This is shown by how much less smooth the shadows are in these images. +
++ In this section, we will be utilizing the previously built functions but iterating it through multiple bounces. We already have our one bounce radiance function, now we want to calculate more bounces, given depth. The function goes like this: + First calculate the necessary variables, w_out, w_in, pdf, init L_out to one bounce. + We then use these to then generate a new ray, and check for intersections with another object. We would ‘bounce’ or recurse given depth. Add the new ray’s radiance to the next iteration. The calculation is as follows: ‘next ray L_out’ * f * cos / pdf. Almost the same formula as the previous. + However, just iterating given depth levels isn’t enough. It is hard to calculate the ‘actual’ amount of bounces a light should traverse. We then now implement the russian roulette technique that simply adds more recursion loops given probability. + I personally used a 0.7 probability and instead multiplied the PDF with this number at the radiance calculations. (Rather than a 0.3 probability then divide with the probability number instead) This yielded better results for me. I used this because I honestly just couldn't get the math right the other way around lol. + Essentially, rather than a termination policy, I used a continuance policy. (Continue if the probability is hit rather than end if the probability is hit). + There is also another intricate regarding accumulative bounces. We have to set a condition where we don’t calculate the bounce until it is the last bounce if the accumulation is off. + +
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+ With direct illumination we can see that there are no further bounces from the start (light at the top). To show only indirect illumination, I chose to turn off accumulative bounces and show the second bounce only. This highlights the differnce of bouce vs no bounce. +
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+ Note(for these pictures, and for all sections from here, I have already completed part 5 and am using a -4). For the 2nd bounce of light, we notice that the entire scene is dimmed. The second bounce of light is weaker, and the third is even weaker than the second as displayed in the pictures above. +
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+ Note(for these pictures I have already completed part 5 and am using a -4). For the 2nd bounce of light, we notice that the entire scene is dimmed. The second bounce of light is weaker, and the third is even weaker than the second as displayed in the pictures above. +
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+ Note(for some of these pictures I have already completed part 5 and am using 1 samples per patch for adaptive sampling). For the 2nd bounce of light, we notice that the entire scene is dimmed. The second bounce of light is weaker, and the third is even weaker than the second as displayed in the pictures above. +
++ In contrast to the last section, we can see here an accumulation of light bounces, brightening up the scene. +
++ Monte Carlo path tracing is good. We have yielded good results. However, we want to speed up this process as not every pixel needs max sampling size. + To implement this ‘adaptibiilty’ we would like to keep the ns_aa amount samples to cover. However, we add a new policy that checks for convergence if (I <= maxTolerance * mean) given spec. This policy confirms that the pixel has converged and we could simply break the loop for that pixel. + New calculations include: The mean is calculated by getting the total illuminance from the rays stacked from the current total samples. Keep track of current sample count. Other calculations for STD to be used in I. + The rest of the raytracing function is unchanged. + +
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+