Homework 7 - Object Lights, Spherical Environment Mapping, Path Tracing

In the last assignment of CENG795, we are expected to introduce many new features to the ray tracer, such as:

  • Object Lights
  • Spherical Environment Mapping
  • Path Tracing
Object Lights

As object lights, I introduced sphere lights and mesh lights to my ray tracer. Multiple inheritance of C++ helped me a lot. We describe object lights with their radiance. While sampling, we use radiance of the light over probability of choosing sample for lighting computations. There are some outputs for object light. All of them are rendered in acceptable short times, I didn't check the exact timings for object lights. Increasing number of samples helps a lot to get better results.

The scenes that contain "jaroslav" in them are adapted from http://cgg.mff.cuni.cz/~jaroslav/teaching/2015-npgr010/index.html.
cornellbox_jaroslav_nobrdf.png(for reference)
cornellbox_jaroslav_glossy.png(for reference)
cornellbox_jaroslav_diffuse.png (for reference)
cornellbox_jaroslav_diffuse_area.png
cornellbox_jaroslav_glossy_area.png
(increasing sample size may help to spaces between white zones)
cornellbox_jaroslav_glossy_area_small.png
cornellbox_jaroslav_glossy_area_sphere.png
cornellbox_jaroslav_glossy_area_ellipsoid.png

Spherical Environmental Lights
For implementing environmental lights, we basically need two things to do:
  • If we intersect an object, we sample hemisphere constructed around normal of the intersection. After that, we divide contribution of the sample by probability of the sample
  • If there is no intersection, we take direction of the ray as the sample ray.
head_env_light.png (1spp)
head_env_light.png (100spp)
 head_env_light.png (900spp rendered in 10 minutes)
dragon_env_light.png(Thanks to Kadir Cenk Alpay)

Path Tracing

Path tracing is an unbiased rendering method. We introduced path tracing for the intersection points that are not illuminated directly. This helped getting diffuse bounces and improved image quality with adding caustics and soft shadows. 
  • Thanks to Furkan Kucukdemir for mentioning negative effect of Gaussian filter on path traced images)
  • Thanks to Associate Professor Ahmet Oguz Akyuz for providing such a detailed scene, which is Sponza.

cornellbox_path_uniform.png(100 spp
cornellbox_path_importance.png (100spp)
cornellbox_path_importance.png (900spp rendered in 28 minutes)
sponza_direct.png(direct light, only ray tracing)
sponza_path.png(4spp)
sponza_path.png(400 spp rendered in 2 hours and 15 minutes)

Exr outputs and notes:

Yorumlar

Yorum Gönder

Bu blogdaki popüler yayınlar

Homework 3 - Transformations, Instancing, Distribution Ray Tracing

Homework 4 - All About Textures (Textures, Perlin Texture, Bump Mapping)