HW #3

Hello everybody.

In this phase I have implemented depth of field, motion blur, soft shadows, glossy reflections, transformations and instancing(partially).

I started with depth of field since it was the least complicated feature and implemented it without any trouble. Similarly, transformations were not very painful to implement. However, when I rendered killeroo_glass, I noticed that the bug I mentioned in HW#2 was manifesting itself. So, I tried to fix it and failed, again. Interestingly, killeroo is rendered brighter but science tree is rendered darker compared to reference images.

Motion blur in my ray tracer is based on a random time value which is between 0 and 1. It mostly works great but there is a strange looking region around the yellow sphere in cornellbox_dynamic. Soft shadows were also pretty straightforward and works great but glossy reflections may have a problem. The noisy look that we have discussed in the class is present in my output, too.

The last feature, instancing, is partially implemented. What that means is that all of the meshes (i.e. both <Mesh> and <MeshInstance> elements in XML) are treated as mesh instances. However, <MeshInstance> elements are not read from XML, for now. Before doing that, I wanted to implement my ply parser but I could not finish it yet. So, that part is incomplete and dragon_dynamic is not rendered and cornellbox_boxes_dynamic does not look correct.

Finally, I was allocating memory for each color sample in order to prevent threads from waiting each other in the sampling phase. Considering that a sample is 20 bytes and we have 640K pixels on average, it is a disastrous idea. As a result of that horrible decision, I had to decrease the number of samples for some scenes. I will update the post when I fix those problems and share my results for dragon_dynamic and cornellbox_boxes_dynamic.

Here are the results with their sample counts.

spheres_dof (800x800, 100 spp)

Rendered in 24.92s

killeroo_glass (800x800, 16spp)

Rendered in 575.12s (9.58m)

metal_plates_area (800x800, 36spp)

Rendered in 101.70s

cornellbox_dynamic (800x800, 400spp)

Rendered in 244.28s (4.07m)

cornellbox_boxes_dynamic (750x600, 36spp)

Rendered in 16.35s

Thanks for reading.

UPDATE: I finished the ply parser and instancing part. Here are my results for cornellbox_boxes_dynamic and dragon_dynamic:

cornellbox_boxes_dynamic (750x600, 400spp)

Rendered in 251.05s

dragon_dynamic (800x480, 100spp)

Rendered in 5276.08s (87.93m)

Results look nice and mostly accurate. However, dragon_dynamic takes quite a lot time to render. I also updated my glossy reflection code slightly and it generates less noisy output right now:

metal_plates_area (800x800, 36spp)

Rendered in 134.36s

Comments

Post a Comment