{"id":16,"date":"2005-08-03T23:04:04","date_gmt":"2005-08-03T23:04:04","guid":{"rendered":"https:\/\/astrofra.com\/wordpress\/?p=16"},"modified":"2005-08-03T23:04:04","modified_gmt":"2005-08-03T23:04:04","slug":"mental-ray-rusty-metal","status":"publish","type":"post","link":"https:\/\/astrofra.com\/wordpress\/index.php\/2005\/08\/03\/mental-ray-rusty-metal\/","title":{"rendered":"Mental Ray | Rusty Metal"},"content":{"rendered":"<table>\n<tbody>\n<tr>\n<td valign=\"top\"><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"300\" height=\"300\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"name\" value=\"FlashTut\" \/><param name=\"bgcolor\" value=\"#888888\" \/><param name=\"align\" value=\"middle\" \/><param name=\"src\" value=\"\/weblog\/swf\/shader_evol_02.swf\" \/><param name=\"quality\" value=\"high\" \/><embed type=\"application\/x-shockwave-flash\" width=\"300\" height=\"300\" src=\"\/weblog\/swf\/shader_evol_02.swf\" quality=\"high\" align=\"middle\" bgcolor=\"#888888\" name=\"FlashTut\"><\/embed><\/object><\/td>\n<td><\/td>\n<td valign=\"top\">I was looking for some <strong>rusted metal<\/strong> shader for a scene I&#8217;m working on and I wanted it to be fully <strong>algorithmic<\/strong>, no bitmap at all.<\/p>\n<p>The main idea is to have blurred reflection with some dusty bumps in the less accessible areas. This require several component to be layered : diffuse, noise, ambiant occlusion, blurred reflection &#8230;<br \/>\nI see many benefits in algorithmic shading :<\/p>\n<ul>\n<li>small memory impact<\/li>\n<li>no interpolation artifact<\/li>\n<li>no more tilling issue<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img decoding=\"async\" src=\"\/weblog\/images\/Tuts\/rusty_metal_close.jpg\" alt=\"\" \/> Here&#8217;s how it works, in pseudo-code :<\/p>\n<pre>\n<blockquote>\n\n amb_occ = ambiant_occlusion(\"cone=wide\",\"distance=small\",\"fallof=high\"); C = diffuse() * noise(\"grey\",\"orange\") * amb_occ; C += specular() * noise() * amb_occ ; C += reflect(\"blur\") * amb_occ ;<\/blockquote>\n<\/pre>\n<p>Quite simple, eh ? \ud83d\ude00<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was looking for some rusted metal shader for a scene I&#8217;m working on and I wanted it to be fully algorithmic, no bitmap at all. The main idea is to have blurred reflection with some dusty bumps in the less accessible areas. This require several component to be layered : diffuse, noise, ambiant occlusion, &hellip; <a href=\"https:\/\/astrofra.com\/wordpress\/index.php\/2005\/08\/03\/mental-ray-rusty-metal\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Mental Ray | Rusty Metal<\/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":[2,1],"tags":[],"class_list":["post-16","post","type-post","status-publish","format-standard","hentry","category-3d-techniques","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/astrofra.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/16"}],"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=16"}],"version-history":[{"count":0,"href":"https:\/\/astrofra.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/16\/revisions"}],"wp:attachment":[{"href":"https:\/\/astrofra.com\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/astrofra.com\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/astrofra.com\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}