{"id":665,"date":"2005-08-19T00:16:55","date_gmt":"2005-08-19T00:16:55","guid":{"rendered":"https:\/\/astrofra.com\/wordpress\/?p=4"},"modified":"2005-08-19T00:16:55","modified_gmt":"2005-08-19T00:16:55","slug":"empirical-c-raytracer","status":"publish","type":"post","link":"https:\/\/astrofra.com\/wordpress\/index.php\/2005\/08\/19\/empirical-c-raytracer\/","title":{"rendered":"C++ | Empirical raytracer"},"content":{"rendered":"<p>Yesterday, I decided add a windowed output to a a very basic raytracer I started to write 2 years ago. I wanted to figure out how a renderer is built inside. It comes with the following features :<\/p>\n<ul>\n<li>unlimited pointlights<\/li>\n<li>load\/save alias|wavefront mesh file<\/li>\n<li>load\/save tga files<\/li>\n<li>un-efficient antialiasing, variable sampling rate<\/li>\n<li>no space partitionning strategy (hence VERY slow)<\/li>\n<li>bitmap manipulation(copy, box blur&#8230;)<\/li>\n<li>mesh manipulation(translate, scale, autofit&#8230;)<\/li>\n<li>Render window using SDL<\/li>\n<\/ul>\n<p>Here&#8217;s a row output of that thing. Text stream &#8230;<\/p>\n<pre>\n<blockquote> Rrenderer::Rrenderer(512, 512) Rmesh::loadFileWavefront() found 861 points, 1674 triangles Rrenderer::loadFiles(), loaded 1 file(s) Rrenderer::computeNormals(), 1 mesh(es) Rrenderer::computeBoundingBoxes(), 1 mesh(es) Rrenderer::fitScene(0.750000), scale scene by (0.806781) Rrenderer::computeBoundingBoxes(), 1 mesh(es) Rrenderer::renderScene(), rendering ... line    511 Rrenderer::renderScene(), 8794 ray\/polygon hit, 11520044 ray Rrenderer::renderScene(), ray casting accuracy : 0.076337 %<\/blockquote>\n<\/pre>\n<p>&#8230; and bitmap.<\/p>\n<p><img decoding=\"async\" src=\"\/weblog\/images\/raytracer_wip_01.gif\" alt=\"\" \/><\/p>\n<p>Things to implement, as soon as possible : a decent adaptative AA, shadow casting, a BSP, gouraud shading.<br \/>\n<a hreflang=\"en\" href=\"https:\/\/astrofra.com\/weblog\/files\/render_2005_08_19.zip\">Get a snapshot here.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday, I decided add a windowed output to a a very basic raytracer I started to write 2 years ago. I wanted to figure out how a renderer is built inside. It comes with the following features : unlimited pointlights load\/save alias|wavefront mesh file load\/save tga files un-efficient antialiasing, variable sampling rate no space partitionning &hellip; <a href=\"https:\/\/astrofra.com\/wordpress\/index.php\/2005\/08\/19\/empirical-c-raytracer\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">C++ | Empirical raytracer<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,1],"tags":[],"class_list":["post-665","post","type-post","status-publish","format-standard","hentry","category-prog","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/astrofra.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/665"}],"collection":[{"href":"https:\/\/astrofra.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/astrofra.com\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/astrofra.com\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/astrofra.com\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=665"}],"version-history":[{"count":0,"href":"https:\/\/astrofra.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/665\/revisions"}],"wp:attachment":[{"href":"https:\/\/astrofra.com\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=665"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/astrofra.com\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=665"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/astrofra.com\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}