{"id":278,"date":"2018-06-16T04:56:18","date_gmt":"2018-06-16T01:56:18","guid":{"rendered":"http:\/\/kadircenk.com\/blog\/?p=278"},"modified":"2022-03-15T00:25:48","modified_gmt":"2022-03-14T21:25:48","slug":"trace-the-ray-part-7-object-lights-and-path-tracing","status":"publish","type":"post","link":"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/","title":{"rendered":"Trace the Ray \u2013 Part 7 (Object Lights and Path Tracing)"},"content":{"rendered":"<p>Hello trace-masters!<\/p>\n<p>I am back with my last assignment, in which I have implemented:<\/p>\n<ul>\n<li>Object Lights\n<ul>\n<li>Mesh lights<\/li>\n<li>Spherical (also ellipsoid) lights<\/li>\n<li>Spherical environment lights<\/li>\n<\/ul>\n<\/li>\n<li>Path Tracing<\/li>\n<\/ul>\n<p>In this post, we will examine those topics in detail.<\/p>\n<p><!--more--><\/p>\n<p><strong>Note:<\/strong>\u00a0All the scenes in this assignment are HDR scenes. Thanks to my perfectly implemented (!) tonemapping procedure, some of my tonemapped .PNG files render dark, and some render too enlightened images at the end of the raytracing operation; though all my .exr renders have correct colors. <strong>EXR Outputs<\/strong> section at the end of this post provides links to visualize my .exr renders.<\/p>\n<h4>Mesh and Spherical Lights<\/h4>\n<p>As you know, meshes are composed of triangles. When a mesh is defined as a light, we first randomly choose a triangle on the mesh by weighting their chance to be chosen with their areas. Then, we choose a point\u00a0<strong>p<\/strong> inside the chosen triangle uniformly, by applying the formulas below, where\u00a0<strong>p\u00a0<\/strong>is provided to the rest of the raytracer code as the position of that mesh light:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"279\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/meshlight_choose_p_in_tri\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/meshlight_choose_p_in_tri.jpeg\" data-orig-size=\"684,256\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"meshlight_choose_p_in_tri\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/meshlight_choose_p_in_tri.jpeg\" class=\"aligncenter wp-image-279 size-full\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/meshlight_choose_p_in_tri.jpeg\" alt=\"\" width=\"684\" height=\"256\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/meshlight_choose_p_in_tri.jpeg 684w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/meshlight_choose_p_in_tri-300x112.jpeg 300w\" sizes=\"auto, (max-width: 684px) 100vw, 684px\" \/><\/p>\n<p>Spherical lights require special treatment. We need to uniformly sample a point\u00a0<strong>Plight<\/strong> on the visible surface of the spherical light, so that we can declare the light direction and distance from the point <strong>p<\/strong> our ray hit in the scene. The image below explains the procedure in detail:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"289\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/sphericallight_anlatim\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/sphericallight_anlatim.jpeg\" data-orig-size=\"927,479\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"sphericallight_anlatim\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/sphericallight_anlatim.jpeg\" class=\"aligncenter wp-image-289 size-full\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/sphericallight_anlatim.jpeg\" alt=\"\" width=\"927\" height=\"479\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/sphericallight_anlatim.jpeg 927w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/sphericallight_anlatim-300x155.jpeg 300w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/sphericallight_anlatim-768x397.jpeg 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<p>Below are my mesh and spherical light outputs:<\/p>\n<p><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"282\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/cornellbox_jaroslav_diffuse\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse.png\" data-orig-size=\"512,512\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"cornellbox_jaroslav_diffuse\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse.png\" class=\"aligncenter wp-image-282 size-full\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse.png\" alt=\"\" width=\"512\" height=\"512\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse.png 512w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse-150x150.png 150w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse-300x300.png 300w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse-100x100.png 100w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/p>\n<pre>cornellbox_jaroslav_diffuse.xml\n(512x512)\n\/w 8 thrd, 36 MSAA\nA point light on the ceiling (50 Watts).<\/pre>\n<p><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse_area.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"281\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/cornellbox_jaroslav_diffuse_area\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse_area.png\" data-orig-size=\"512,512\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"cornellbox_jaroslav_diffuse_area\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse_area.png\" class=\"aligncenter wp-image-281 size-full\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse_area.png\" alt=\"\" width=\"512\" height=\"512\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse_area.png 512w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse_area-150x150.png 150w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse_area-300x300.png 300w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_diffuse_area-100x100.png 100w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/p>\n<pre>cornellbox_jaroslav_diffuse_area.xml\n(512x512)\n\/w 8 thrd, 100 MSAA\nCeiling is 2-triangle mesh light.<\/pre>\n<p><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"283\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/cornellbox_jaroslav_glossy\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy.png\" data-orig-size=\"512,512\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"cornellbox_jaroslav_glossy\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy.png\" class=\"aligncenter wp-image-283 size-full\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy.png\" alt=\"\" width=\"512\" height=\"512\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy.png 512w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy-150x150.png 150w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy-300x300.png 300w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy-100x100.png 100w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/p>\n<pre>cornellbox_jaroslav_glossy.xml\n(512x512)\n\/w 8 thrd, 36 MSAA\nA point light on the ceiling (50 Watts).<\/pre>\n<p><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"284\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/cornellbox_jaroslav_glossy_area\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area.png\" data-orig-size=\"512,512\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"cornellbox_jaroslav_glossy_area\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area.png\" class=\"aligncenter wp-image-284 size-full\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area.png\" alt=\"\" width=\"512\" height=\"512\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area.png 512w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area-150x150.png 150w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area-300x300.png 300w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area-100x100.png 100w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/p>\n<pre>cornellbox_jaroslav_glossy_area.xml\n(512x512)\n\/w 8 thrd, 100 MSAA\nCeiling is 2-triangle mesh light.<\/pre>\n<p><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_ellipsoid.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"285\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/cornellbox_jaroslav_glossy_area_ellipsoid\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_ellipsoid.png\" data-orig-size=\"512,512\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"cornellbox_jaroslav_glossy_area_ellipsoid\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_ellipsoid.png\" class=\"aligncenter wp-image-285 size-full\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_ellipsoid.png\" alt=\"\" width=\"512\" height=\"512\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_ellipsoid.png 512w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_ellipsoid-150x150.png 150w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_ellipsoid-300x300.png 300w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_ellipsoid-100x100.png 100w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/p>\n<pre>cornellbox_jaroslav_glossy_area_ellipsoid.xml\n(512x512)\n\/w 8 thrd, 100 MSAA\nA (5, 1, 1)-scaled sphere (ellipsoid)\nlight on the ceiling.<\/pre>\n<p><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_small.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"288\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/cornellbox_jaroslav_glossy_area_small\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_small.png\" data-orig-size=\"512,512\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"cornellbox_jaroslav_glossy_area_small\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_small.png\" class=\"aligncenter wp-image-288 size-full\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_small.png\" alt=\"\" width=\"512\" height=\"512\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_small.png 512w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_small-150x150.png 150w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_small-300x300.png 300w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_small-100x100.png 100w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/p>\n<pre>cornellbox_jaroslav_glossy_area_small.xml\n(512x512)\n\/w 8 thrd, 100 MSAA\nA cube mesh light on the ceiling.<\/pre>\n<p><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_sphere.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"291\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/cornellbox_jaroslav_glossy_area_sphere\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_sphere.png\" data-orig-size=\"512,512\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"cornellbox_jaroslav_glossy_area_sphere\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_sphere.png\" class=\"aligncenter wp-image-291 size-full\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_sphere.png\" alt=\"\" width=\"512\" height=\"512\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_sphere.png 512w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_sphere-150x150.png 150w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_sphere-300x300.png 300w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_glossy_area_sphere-100x100.png 100w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/p>\n<pre>cornellbox_jaroslav_glossy_area_sphere.xml\n(512x512)\n\/w 8 thrd, 100 MSAA\nA non-transformed sphere light\non the ceiling.<\/pre>\n<p><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_nobrdf.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"292\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/cornellbox_jaroslav_nobrdf\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_nobrdf.png\" data-orig-size=\"512,512\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"cornellbox_jaroslav_nobrdf\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_nobrdf.png\" class=\"aligncenter wp-image-292 size-full\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_nobrdf.png\" alt=\"\" width=\"512\" height=\"512\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_nobrdf.png 512w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_nobrdf-150x150.png 150w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_nobrdf-300x300.png 300w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_jaroslav_nobrdf-100x100.png 100w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/a><\/p>\n<pre>cornellbox_jaroslav_nobrdf.xml\n(512x512)\n\/w 8 thrd, 36 MSAA\nA no-BRDF scene with point light\non the ceiling.<\/pre>\n<h4>Spherical Environment Lights<\/h4>\n<p>In this light type, an infinitely large sphere is assumed to envelope all the scene. Every element of the scene (including the camera) is inside that giant sphere (an abstract sphere, no real object). An HDR latitude-longitute texture is mapped to that giant sphere, and it operates as follows:<\/p>\n<ul>\n<li>If a ray (whose direction is unit\u00a0<strong>L<\/strong>)<strong>\u00a0<\/strong>does not hit any object in the scene, calculate\u00a0<strong>u<\/strong> and\u00a0<strong>v <\/strong>texture\u00a0coordinates by using\u00a0<strong>Theta\u00a0<\/strong>and\u00a0<strong>Phi<\/strong> angles, which are found as:\n<ul>\n<li>Theta = acos(L.y);<\/li>\n<li>Phi = atan2(L.z, L.x);<\/li>\n<li>u = (-Phi + pi) \/ (2*pi);<\/li>\n<li>v = Theta \/ pi;<\/li>\n<\/ul>\n<\/li>\n<li>If a ray hits an object in the scene, create an ONB on that hit point which is oriented in the direction of the normal vector of the hit point,\u00a0 and choose a uniform random direction\u00a0<strong>L<\/strong>. Cast a new ray using\u00a0<strong>L\u00a0<\/strong>as ray direction. If the newly cast ray does not hit any object, use the method above.<\/li>\n<li>Using the\u00a0<strong>u\u00a0<\/strong>and\u00a0<strong>v<\/strong> coordinates, fetch color from the texture image of the spherical environment light (giant enveloping abstract sphere) and use that value as the light radiance.<\/li>\n<\/ul>\n<p>This light type grants us the ability of blending surrounding environmental color into the surfaces of the objects inside the scene.<\/p>\n<p>Spherical environment light renders are provided below, see that the left side of the face mesh blends yellowish color due to the nearby yellow wall texture:<\/p>\n<p><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"293\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/head_env_light_uploadet\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet.png\" data-orig-size=\"1600,900\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"head_env_light_uploadet\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet-1024x576.png\" class=\"aligncenter wp-image-293 size-large\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet-1024x576.png\" alt=\"\" width=\"525\" height=\"295\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet-1024x576.png 1024w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet-300x169.png 300w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet-768x432.png 768w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet.png 1600w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/a><\/p>\n<pre>head_env_light.xml\n(1600x900)\n\/w 8 thrd, 900 MSAA\nDarkness due to a bug in my tonemapping\nimplementation.\nBelow is a lightened version of the\nsame .png (using Shotwell application)\nAlso, .exr render of this scene can be\nchecked out to see my actual (correct)\nHDR (.exr) output.<\/pre>\n<p><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet_shotwellparlatildi.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"294\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/head_env_light_uploadet_shotwellparlatildi\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet_shotwellparlatildi.png\" data-orig-size=\"1600,900\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"head_env_light_uploadet_shotwellparlatildi\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet_shotwellparlatildi-1024x576.png\" class=\"aligncenter wp-image-294 size-large\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet_shotwellparlatildi-1024x576.png\" alt=\"\" width=\"525\" height=\"295\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet_shotwellparlatildi-1024x576.png 1024w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet_shotwellparlatildi-300x169.png 300w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet_shotwellparlatildi-768x432.png 768w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_uploadet_shotwellparlatildi.png 1600w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/a><\/p>\n<pre>head_env_light.xml\n(1600x900)\n\/w 8 thrd, 900 MSAA\n22 minutes 17 secs to render.<\/pre>\n<h4>Bonus Scene<\/h4>\n<p>Below is a basic scene (levitating_dragon.xml) that I have created by editing the head_env_light.xml scene file (the scene file is available as a 50.6 MB .zip file\u00a0<a href=\"http:\/\/user.ceng.metu.edu.tr\/~kadircenk\/rtscenes\/levitating_dragon_scene.zip\" target=\"_blank\" rel=\"noopener\">here<\/a>).<\/p>\n<p>I have removed the head mesh, and then added 1 mirror sphere\u00a0 and 1 reddish-glass dragon with some basic tranformations. The lightning is still spherical environment light with the same enveloping HDR texture:<\/p>\n<p><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon-1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"295\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/head_env_light_dragon-2\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon-1.png\" data-orig-size=\"1600,900\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"head_env_light_dragon\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon-1-1024x576.png\" class=\"aligncenter wp-image-295 size-large\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon-1-1024x576.png\" alt=\"\" width=\"525\" height=\"295\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon-1-1024x576.png 1024w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon-1-300x169.png 300w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon-1-768x432.png 768w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon-1.png 1600w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/a><\/p>\n<pre>levitating_dragon.xml\n(1600x900)\n\/w 8 thrd, 4 MSAA, 5 MaxRecursionDepth,\nMirror sphere (0.9, 0.9, 0.9) reflectance,\nDragon mesh (0.99, 0, 0) transparency\nand 2.0 refractive index.\nSee the yellowish color reflectance\non the back of the dragon.<\/pre>\n<p><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon100msaa1920x1080depth4.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"359\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/head_env_light_dragon100msaa1920x1080depth4\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon100msaa1920x1080depth4.png\" data-orig-size=\"1920,1080\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"head_env_light_dragon100msaa1920x1080depth4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon100msaa1920x1080depth4-1024x576.png\" class=\"aligncenter wp-image-359 size-large\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon100msaa1920x1080depth4-1024x576.png\" alt=\"\" width=\"525\" height=\"295\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon100msaa1920x1080depth4-1024x576.png 1024w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon100msaa1920x1080depth4-300x169.png 300w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon100msaa1920x1080depth4-768x432.png 768w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/head_env_light_dragon100msaa1920x1080depth4.png 1920w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/a><\/p>\n<pre>levitating_dragon.xml\n(1920x1080)\n\/w 8 thrd, 100 MSAA, 4 MaxRecursionDepth,\nSphere was placed a bit far away in this one.<\/pre>\n<h4>Path Tracing<\/h4>\n<p>In this assignment, we calculate both the direct and indirect lightning and use them together to illuminate the pixels if path tracing is used on the scene. By doing so, we aim to get a nice illumination in the path traced scenes. So, we first run the direct illumination computation (diffuse, specular, reflectance etc.), and then we create a ONB at the hit point, oriented towards the hit point normal; then create and send a random ray (using uniform or importance sampling) into the scene from the hit point, and sum the illumination contribution of that ray chain (a path of rays is created until MaxRecursionDepth) to the total color of the pixel we&#8217;re currently working on.<\/p>\n<p>Below are my outputs. Check the caustic effect below the glass sphere (which is a natural result of path tracing, and an effect that almost makes me shed tears of joy); and the color blend of the side walls onto the ceiling, floor, and the back wall:<\/p>\n<p><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"298\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/cornellbox_path_uniform_100\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100.png\" data-orig-size=\"750,600\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"cornellbox_path_uniform_100\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100.png\" class=\"aligncenter wp-image-298 size-full\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100.png\" alt=\"\" width=\"750\" height=\"600\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100.png 750w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100-300x240.png 300w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/a><\/p>\n<pre>cornellbox_path_uniform_100.xml\n(750x600)\n\/w 8 thrd, 100 MSAA\nPath tracing,\nUniform sampling.\nCaustic effect is formed by\nrandomly cast rays from the point\nof the caustic effect towards the\nglass sphere, which at the end hit\nthe area light on the ceiling.<\/pre>\n<p><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_importance_100.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"299\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/cornellbox_path_importance_100\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_importance_100.png\" data-orig-size=\"750,600\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"cornellbox_path_importance_100\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_importance_100.png\" class=\"aligncenter wp-image-299 size-full\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_importance_100.png\" alt=\"\" width=\"750\" height=\"600\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_importance_100.png 750w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_importance_100-300x240.png 300w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/a><\/p>\n<pre>cornellbox_path_importance_100.xml\n(750x600)\n\/w 8 thrd, 100 MSAA\nPath tracing,\nImportance sampling.\nResults in a bit denoised image\nthan uniform sampling.<\/pre>\n<h4>Sponza Scene<\/h4>\n<p>As I thought the sponza scene is a scene that is provided by our instructor outside the context of this assignment, I have had postponed the rendering of it after I complete this last assignment and also the project.<\/p>\n<p>I will implement the parsing of the sponza scene file, and render it. As the rendering time of this scene is high, I will be able to add my outputs here in a few days.<\/p>\n<p><strong>Weird Renders<\/strong><\/p>\n<p>During the implementation phase of the assignment, I have (let&#8217;s say accidentally \ud83d\ude42 ) rendered some crazy images:<\/p>\n<figure id=\"attachment_296\" aria-describedby=\"caption-attachment-296\" style=\"width: 750px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100cilginr1siz.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"296\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/cornellbox_path_uniform_100cilginr1siz\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100cilginr1siz.png\" data-orig-size=\"750,600\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"cornellbox_path_uniform_100cilginr1siz\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100cilginr1siz.png\" class=\"wp-image-296 size-full\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100cilginr1siz.png\" alt=\"\" width=\"750\" height=\"600\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100cilginr1siz.png 750w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100cilginr1siz-300x240.png 300w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/a><figcaption id=\"caption-attachment-296\" class=\"wp-caption-text\">Pink outrun-style borders (a big shout-out to <a href=\"https:\/\/www.reddit.com\/r\/outrun\/\" target=\"_blank\" rel=\"noopener\">\/r\/outrun\/<\/a>) are caused by big shadow test epsilon value.<\/figcaption><\/figure>\n<figure id=\"attachment_297\" aria-describedby=\"caption-attachment-297\" style=\"width: 750px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100funny.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"297\" data-permalink=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/_cornellbox_path_uniform_100funny\/\" data-orig-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100funny.png\" data-orig-size=\"750,600\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"_cornellbox_path_uniform_100funny\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100funny.png\" class=\"wp-image-297 size-full\" src=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100funny.png\" alt=\"\" width=\"750\" height=\"600\" srcset=\"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100funny.png 750w, https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/cornellbox_path_uniform_100funny-300x240.png 300w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/a><figcaption id=\"caption-attachment-297\" class=\"wp-caption-text\">I swear I wasn&#8217;t drunk while implementing the assignment \ud83d\ude42 Big thanks to my wrong implementation of the Path Tracing algorithm.<\/figcaption><\/figure>\n<h4>EXR Outputs<\/h4>\n<p>You can visualize my .exr outputs by following the links below (move the handles of the slider to right step by step, while \u201cGamma 2.0\u201d option is selected):<\/p>\n<ul>\n<li><a href=\"http:\/\/kadircenk.com\/hdr\/exrvisualizer?exrname=cornellbox_jaroslav_diffuse\" target=\"_blank\" rel=\"noopener\">cornellbox_jaroslav_diffuse.exr<\/a><\/li>\n<li><a href=\"http:\/\/kadircenk.com\/hdr\/exrvisualizer?exrname=cornellbox_jaroslav_diffuse_area\" target=\"_blank\" rel=\"noopener\">cornellbox_jaroslav_diffuse_area.exr<\/a><\/li>\n<li><a href=\"http:\/\/kadircenk.com\/hdr\/exrvisualizer?exrname=cornellbox_jaroslav_glossy\" target=\"_blank\" rel=\"noopener\">cornellbox_jaroslav_glossy.exr<\/a><\/li>\n<li><a href=\"http:\/\/kadircenk.com\/hdr\/exrvisualizer?exrname=cornellbox_jaroslav_glossy_area\" target=\"_blank\" rel=\"noopener\">cornellbox_jaroslav_glossy_area.exr<\/a><\/li>\n<li><a href=\"http:\/\/kadircenk.com\/hdr\/exrvisualizer?exrname=cornellbox_jaroslav_glossy_area_ellipsoid\" target=\"_blank\" rel=\"noopener\">cornellbox_jaroslav_glossy_area_ellipsoid.exr<\/a><\/li>\n<li><a href=\"http:\/\/kadircenk.com\/hdr\/exrvisualizer?exrname=cornellbox_jaroslav_glossy_area_small\" target=\"_blank\" rel=\"noopener\">cornellbox_jaroslav_glossy_area_small.exr<\/a><\/li>\n<li><a href=\"http:\/\/kadircenk.com\/hdr\/exrvisualizer?exrname=cornellbox_jaroslav_glossy_area_sphere\" target=\"_blank\" rel=\"noopener\">cornellbox_jaroslav_glossy_area_sphere.exr<\/a><\/li>\n<li><a href=\"http:\/\/kadircenk.com\/hdr\/exrvisualizer?exrname=cornellbox_jaroslav_nobrdf\" target=\"_blank\" rel=\"noopener\">cornellbox_jaroslav_nobrdf.exr<\/a><\/li>\n<li><a href=\"http:\/\/kadircenk.com\/hdr\/exrvisualizer?exrname=cornellbox_path_importance_100\" target=\"_blank\" rel=\"noopener\">cornellbox_path_importance_100.exr<\/a><\/li>\n<li><a href=\"http:\/\/kadircenk.com\/hdr\/exrvisualizer?exrname=cornellbox_path_uniform_100\" target=\"_blank\" rel=\"noopener\">cornellbox_path_uniform_100.exr<\/a><\/li>\n<li><a href=\"http:\/\/kadircenk.com\/hdr\/exr\/head_env_light.exr\" target=\"_blank\" rel=\"noopener\">head_env_light.exr<\/a>\u00a0(too big to visualize on the web browser, download only)<\/li>\n<li><a href=\"http:\/\/kadircenk.com\/hdr\/exr\/levitating_dragon.exr\" target=\"_blank\" rel=\"noopener\">levitating_dragon.exr<\/a>\u00a0(too big to visualize on the web browser, download only)<\/li>\n<\/ul>\n<p>That&#8217;s the end of the seventh assignment!<\/p>\n<p>Hope to see you in the term project post!<\/p>\n<p>Happy tracing!<\/p>\n<h4>Credits<\/h4>\n<p>The scenes that contain &#8220;jaroslav&#8221; tag in their names are taken from\u00a0<a href=\"http:\/\/cgg.mff.cuni.cz\/~jaroslav\/teaching\/2015-npgr010\/index.html\" target=\"_blank\" rel=\"noopener\">http:\/\/cgg.mff.cuni.cz\/~jaroslav\/teaching\/2015-npgr010\/index.html<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello trace-masters! I am back with my last assignment, in which I have implemented: Object Lights Mesh lights Spherical (also ellipsoid) lights Spherical environment lights Path Tracing In this post, we will examine those topics in detail.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4],"tags":[],"class_list":["post-278","post","type-post","status-publish","format-standard","hentry","category-ray-tracing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Trace the Ray \u2013 Part 7 (Object Lights and Path Tracing) - kadircenk<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Trace the Ray \u2013 Part 7 (Object Lights and Path Tracing) - kadircenk\" \/>\n<meta property=\"og:description\" content=\"Hello trace-masters! I am back with my last assignment, in which I have implemented: Object Lights Mesh lights Spherical (also ellipsoid) lights Spherical environment lights Path Tracing In this post, we will examine those topics in detail.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/\" \/>\n<meta property=\"og:site_name\" content=\"kadircenk\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/kadircenk3\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/kadircenk3\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-16T01:56:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-14T21:25:48+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/meshlight_choose_p_in_tri.jpeg\" \/>\n<meta name=\"author\" content=\"kadircenk\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/kadircenkalpay\" \/>\n<meta name=\"twitter:site\" content=\"@kadircenkalpay\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"kadircenk\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/trace-the-ray-part-7-object-lights-and-path-tracing\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/trace-the-ray-part-7-object-lights-and-path-tracing\\\/\"},\"author\":{\"name\":\"kadircenk\",\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d9546d987c40be9d6ff61c6512b3a25\"},\"headline\":\"Trace the Ray \u2013 Part 7 (Object Lights and Path Tracing)\",\"datePublished\":\"2018-06-16T01:56:18+00:00\",\"dateModified\":\"2022-03-14T21:25:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/trace-the-ray-part-7-object-lights-and-path-tracing\\\/\"},\"wordCount\":1000,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d9546d987c40be9d6ff61c6512b3a25\"},\"image\":{\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/trace-the-ray-part-7-object-lights-and-path-tracing\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/kadircenk.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/06\\\/meshlight_choose_p_in_tri.jpeg\",\"articleSection\":[\"Ray Tracing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/kadircenk.com\\\/blog\\\/trace-the-ray-part-7-object-lights-and-path-tracing\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/trace-the-ray-part-7-object-lights-and-path-tracing\\\/\",\"url\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/trace-the-ray-part-7-object-lights-and-path-tracing\\\/\",\"name\":\"Trace the Ray \u2013 Part 7 (Object Lights and Path Tracing) - kadircenk\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/trace-the-ray-part-7-object-lights-and-path-tracing\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/trace-the-ray-part-7-object-lights-and-path-tracing\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/kadircenk.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/06\\\/meshlight_choose_p_in_tri.jpeg\",\"datePublished\":\"2018-06-16T01:56:18+00:00\",\"dateModified\":\"2022-03-14T21:25:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/trace-the-ray-part-7-object-lights-and-path-tracing\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kadircenk.com\\\/blog\\\/trace-the-ray-part-7-object-lights-and-path-tracing\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/trace-the-ray-part-7-object-lights-and-path-tracing\\\/#primaryimage\",\"url\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/06\\\/meshlight_choose_p_in_tri.jpeg\",\"contentUrl\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/06\\\/meshlight_choose_p_in_tri.jpeg\",\"width\":684,\"height\":256},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/trace-the-ray-part-7-object-lights-and-path-tracing\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Trace the Ray \u2013 Part 7 (Object Lights and Path Tracing)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/\",\"name\":\"kadircenk.com\",\"description\":\"Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d9546d987c40be9d6ff61c6512b3a25\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d9546d987c40be9d6ff61c6512b3a25\",\"name\":\"kadircenk\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/ss.png\",\"url\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/ss.png\",\"contentUrl\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/ss.png\",\"width\":696,\"height\":696,\"caption\":\"kadircenk\"},\"logo\":{\"@id\":\"https:\\\/\\\/kadircenk.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/ss.png\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/kadircenk3\",\"https:\\\/\\\/www.instagram.com\\\/kadircenkalpay\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/kadir-cenk-alpay\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/kadircenkalpay\",\"https:\\\/\\\/www.youtube.com\\\/kadircenkalpay\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Trace the Ray \u2013 Part 7 (Object Lights and Path Tracing) - kadircenk","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/","og_locale":"en_US","og_type":"article","og_title":"Trace the Ray \u2013 Part 7 (Object Lights and Path Tracing) - kadircenk","og_description":"Hello trace-masters! I am back with my last assignment, in which I have implemented: Object Lights Mesh lights Spherical (also ellipsoid) lights Spherical environment lights Path Tracing In this post, we will examine those topics in detail.","og_url":"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/","og_site_name":"kadircenk","article_publisher":"https:\/\/www.facebook.com\/kadircenk3","article_author":"https:\/\/www.facebook.com\/kadircenk3","article_published_time":"2018-06-16T01:56:18+00:00","article_modified_time":"2022-03-14T21:25:48+00:00","og_image":[{"url":"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/meshlight_choose_p_in_tri.jpeg","type":"","width":"","height":""}],"author":"kadircenk","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/kadircenkalpay","twitter_site":"@kadircenkalpay","twitter_misc":{"Written by":"kadircenk","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/#article","isPartOf":{"@id":"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/"},"author":{"name":"kadircenk","@id":"https:\/\/kadircenk.com\/blog\/#\/schema\/person\/8d9546d987c40be9d6ff61c6512b3a25"},"headline":"Trace the Ray \u2013 Part 7 (Object Lights and Path Tracing)","datePublished":"2018-06-16T01:56:18+00:00","dateModified":"2022-03-14T21:25:48+00:00","mainEntityOfPage":{"@id":"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/"},"wordCount":1000,"commentCount":2,"publisher":{"@id":"https:\/\/kadircenk.com\/blog\/#\/schema\/person\/8d9546d987c40be9d6ff61c6512b3a25"},"image":{"@id":"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/#primaryimage"},"thumbnailUrl":"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/meshlight_choose_p_in_tri.jpeg","articleSection":["Ray Tracing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/","url":"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/","name":"Trace the Ray \u2013 Part 7 (Object Lights and Path Tracing) - kadircenk","isPartOf":{"@id":"https:\/\/kadircenk.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/#primaryimage"},"image":{"@id":"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/#primaryimage"},"thumbnailUrl":"http:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/meshlight_choose_p_in_tri.jpeg","datePublished":"2018-06-16T01:56:18+00:00","dateModified":"2022-03-14T21:25:48+00:00","breadcrumb":{"@id":"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/#primaryimage","url":"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/meshlight_choose_p_in_tri.jpeg","contentUrl":"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2018\/06\/meshlight_choose_p_in_tri.jpeg","width":684,"height":256},{"@type":"BreadcrumbList","@id":"https:\/\/kadircenk.com\/blog\/trace-the-ray-part-7-object-lights-and-path-tracing\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kadircenk.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Trace the Ray \u2013 Part 7 (Object Lights and Path Tracing)"}]},{"@type":"WebSite","@id":"https:\/\/kadircenk.com\/blog\/#website","url":"https:\/\/kadircenk.com\/blog\/","name":"kadircenk.com","description":"Blog","publisher":{"@id":"https:\/\/kadircenk.com\/blog\/#\/schema\/person\/8d9546d987c40be9d6ff61c6512b3a25"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kadircenk.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/kadircenk.com\/blog\/#\/schema\/person\/8d9546d987c40be9d6ff61c6512b3a25","name":"kadircenk","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2023\/02\/ss.png","url":"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2023\/02\/ss.png","contentUrl":"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2023\/02\/ss.png","width":696,"height":696,"caption":"kadircenk"},"logo":{"@id":"https:\/\/kadircenk.com\/blog\/wp-content\/uploads\/2023\/02\/ss.png"},"sameAs":["https:\/\/www.facebook.com\/kadircenk3","https:\/\/www.instagram.com\/kadircenkalpay","https:\/\/www.linkedin.com\/in\/kadir-cenk-alpay","https:\/\/x.com\/https:\/\/twitter.com\/kadircenkalpay","https:\/\/www.youtube.com\/kadircenkalpay"]}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9NbhO-4u","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/kadircenk.com\/blog\/wp-json\/wp\/v2\/posts\/278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kadircenk.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kadircenk.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kadircenk.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kadircenk.com\/blog\/wp-json\/wp\/v2\/comments?post=278"}],"version-history":[{"count":28,"href":"https:\/\/kadircenk.com\/blog\/wp-json\/wp\/v2\/posts\/278\/revisions"}],"predecessor-version":[{"id":653,"href":"https:\/\/kadircenk.com\/blog\/wp-json\/wp\/v2\/posts\/278\/revisions\/653"}],"wp:attachment":[{"href":"https:\/\/kadircenk.com\/blog\/wp-json\/wp\/v2\/media?parent=278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kadircenk.com\/blog\/wp-json\/wp\/v2\/categories?post=278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kadircenk.com\/blog\/wp-json\/wp\/v2\/tags?post=278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}