
{"id":70,"date":"2022-12-03T02:32:29","date_gmt":"2022-12-02T18:32:29","guid":{"rendered":"https:\/\/blog.shirui.me\/?p=70"},"modified":"2022-12-03T03:03:37","modified_gmt":"2022-12-02T19:03:37","slug":"rendering-molecules-with-povray","status":"publish","type":"post","link":"https:\/\/www.shirui.me\/blog\/2022\/12\/03\/rendering-molecules-with-povray\/","title":{"rendered":"Rendering molecules with Povray"},"content":{"rendered":"\n<p><a href=\"http:\/\/www.povray.org\/\" data-type=\"URL\" data-id=\"http:\/\/www.povray.org\/\">Povray<\/a> is a is a high-quality tool to create 3d graphics. Here is my notes on rendering molecules and coarse-grained models.<\/p>\n\n\n\n<p><strong>Ray tracing:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-clike\">global_settings {\n    radiosity {\n        count 60\n        always_sample on\n        recursion_limit 2\n        error_bound 0.8\n    }\n}<\/code><\/pre>\n\n\n\n<p><strong>Texture<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-clike\">texture {\n    pigment {\n        bozo color_map{[-2 rgbt <0.3, 0.3, 0.3, 0.0>][1.0 particleColor]} scale 0.25\n    }\n    normal { bumps 0.3 noise_generator 2 scale 0.08 }\n    finish { specular 0.8 roughness 0.2}\n}<\/code><\/pre>\n\n\n\n<p><strong>Result:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"503\" height=\"488\" src=\"https:\/\/blog.shirui.me\/wp-content\/uploads\/2022\/12\/a-1.png\" alt=\"\" class=\"wp-image-77\" srcset=\"https:\/\/www.shirui.me\/blog\/wp-content\/uploads\/2022\/12\/a-1.png 503w, https:\/\/www.shirui.me\/blog\/wp-content\/uploads\/2022\/12\/a-1-300x291.png 300w\" sizes=\"auto, (max-width: 503px) 100vw, 503px\" \/><figcaption class=\"wp-element-caption\">illustration<\/figcaption><\/figure>\n\n\n\n<p>As marked by blue square, the <code class=\"language-clike\">boto<\/code> controls the dark spots on the sphere, and <code class=\"language-clike\">bumps<\/code> creates the look of rolling hills. The <code class=\"language-clike\">specular<\/code> keyword in a finish statement produces a highlight, which more closely resembles real specular reflection and provides a more credible spreading of the highlights occurring near the object horizons.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Povray is a is a high-quality tool to create 3d graphics. Here is my notes on rendering molecules and coarse-grained models. Ray tracing: global_settings { radiosity { count 60 always_sample on recursion_limit 2 error_bound 0.8 } } Texture: texture { pigment { bozo color_map{[-2 rgbt ][1.0 particleColor]} scale 0.25 } normal { bumps 0.3 noise_generator [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[17,18],"class_list":["post-70","post","type-post","status-publish","format-standard","hentry","category-notes","tag-molecular-simulation","tag-povray"],"_links":{"self":[{"href":"https:\/\/www.shirui.me\/blog\/wp-json\/wp\/v2\/posts\/70","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shirui.me\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shirui.me\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shirui.me\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shirui.me\/blog\/wp-json\/wp\/v2\/comments?post=70"}],"version-history":[{"count":7,"href":"https:\/\/www.shirui.me\/blog\/wp-json\/wp\/v2\/posts\/70\/revisions"}],"predecessor-version":[{"id":82,"href":"https:\/\/www.shirui.me\/blog\/wp-json\/wp\/v2\/posts\/70\/revisions\/82"}],"wp:attachment":[{"href":"https:\/\/www.shirui.me\/blog\/wp-json\/wp\/v2\/media?parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shirui.me\/blog\/wp-json\/wp\/v2\/categories?post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shirui.me\/blog\/wp-json\/wp\/v2\/tags?post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}