{"id":544,"date":"2024-09-06T20:48:36","date_gmt":"2024-09-06T18:48:36","guid":{"rendered":"https:\/\/heikkili.kapsi.fi\/blog\/?p=544"},"modified":"2024-09-06T20:48:38","modified_gmt":"2024-09-06T18:48:38","slug":"cse168-computer-graphics-ii-rendering","status":"publish","type":"post","link":"http:\/\/heikkili.kapsi.fi\/blog\/?p=544","title":{"rendered":"CSE168 Computer Graphics II: Rendering"},"content":{"rendered":"\n<p>Notes and learning diary for CSE168 rendering course on Edx that is  part to of CSE167 Computer Graphics course on Edx by Ravi Ramamoorthi.<br>https:\/\/learning.edx.org\/course\/course-v1:UCSanDiegoX+CSE168X+3T2024\/<\/p>\n\n\n\n<p>Course projects \/ homeworks:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>RayTracing<\/li>\n\n\n\n<li>Direct Lighting<\/li>\n\n\n\n<li>Indirect Path Tracer<\/li>\n\n\n\n<li>Importance Sampling<\/li>\n<\/ol>\n\n\n\n<p>Systems write modern 3d image synthesis program.<br>(path tracer with importance sampling)<\/p>\n\n\n\n<p><strong>RAYTRACING 1: RAY CASTING<\/strong><\/p>\n\n\n\n<p>Effects needed for realism<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>soft shadows<\/li>\n\n\n\n<li>reflections (mirrors and glossy)<\/li>\n\n\n\n<li>transparency<\/li>\n\n\n\n<li>Interreflections (color bleeding)<\/li>\n\n\n\n<li>Complex illumination (natural, area light)<\/li>\n<\/ul>\n\n\n\n<p>raytracing: pixel by pixel instead of object by object<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>recursive raytracing<\/li>\n\n\n\n<li>primitives<\/li>\n\n\n\n<li>acceleration structures<\/li>\n<\/ul>\n\n\n\n<p>Ray Casting<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>visibility per pixel instead of Z-buffer<\/li>\n\n\n\n<li>Find nearest object by shooting rays into scene<\/li>\n\n\n\n<li>Shade it as in standard OpenGL<\/li>\n<\/ul>\n\n\n\n<p><strong>RAYTRACING 1: SHADOWS AND REFLECTIONS<\/strong><\/p>\n\n\n\n<p><strong>shadows <\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>shoot a ray from the camera after hit shoot a ray from there towards the light source<\/li>\n\n\n\n<li>if hit light source i&#8217;ts unblocked and visible to the light source<\/li>\n\n\n\n<li>if hit object then ray to the light source is blocked and the object is in shadow.<\/li>\n\n\n\n<li>shadows: numerical issues. because of numerical errors first ray from camera can go below surface. -> move shadow ray little towards light source before shooting.<\/li>\n<\/ul>\n\n\n\n<p><strong>Mirror reflections\/Refractions<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>generate reflected ray in mirror direction<\/li>\n\n\n\n<li>Get reflections and refractions of objects<\/li>\n\n\n\n<li>where reflected ray hits get that objects color so that will give the reflection.<\/li>\n<\/ul>\n\n\n\n<p><strong>Recursive ray tracing:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>for each pixel\n<ul class=\"wp-block-list\">\n<li>trace primary Eye Ray, find intersection<\/li>\n\n\n\n<li>trace secondary shadow rays(s) to all lights\n<ul class=\"wp-block-list\">\n<li>color = visible ? illumination model : 0<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>trace reflected ray\n<ul class=\"wp-block-list\">\n<li>color += reflectivity * color of reflected ray<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>Project work done:<\/p>\n\n\n\n<p>Reviewed my final ray tracing project from CSE167 and updated to run on new Visual Studio version.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Notes and learning diary for CSE168 rendering course on Edx that is part to of CSE167 Computer Graphics course on Edx by Ravi Ramamoorthi.https:\/\/learning.edx.org\/course\/course-v1:UCSanDiegoX+CSE168X+3T2024\/ Course projects \/ homeworks: Systems write modern 3d image synthesis program.(path tracer with importance sampling) RAYTRACING 1: RAY CASTING Effects needed for realism raytracing: pixel by pixel instead of object by&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_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":""},"categories":[6,43,7],"tags":[10,42,12,11,31],"class_list":["post-544","post","type-post","status-publish","format-standard","hentry","category-computer-graphics","category-cse168","category-raytracing","tag-computer-graphics","tag-cse168","tag-edx","tag-ray-tracing","tag-study"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p7k3DT-8M","_links":{"self":[{"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=\/wp\/v2\/posts\/544"}],"collection":[{"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=544"}],"version-history":[{"count":4,"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=\/wp\/v2\/posts\/544\/revisions"}],"predecessor-version":[{"id":548,"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=\/wp\/v2\/posts\/544\/revisions\/548"}],"wp:attachment":[{"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=544"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=544"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/heikkili.kapsi.fi\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}