{"id":1412,"date":"2025-06-03T12:39:14","date_gmt":"2025-06-03T10:39:14","guid":{"rendered":"https:\/\/cammonte.com\/?page_id=1412"},"modified":"2025-06-03T13:42:17","modified_gmt":"2025-06-03T11:42:17","slug":"volume-rendering-draft","status":"publish","type":"page","link":"https:\/\/cammonte.com\/index.php\/volume-rendering-draft\/","title":{"rendered":"Volume Rendering Draft"},"content":{"rendered":"\n<p class=\"has-text-align-center\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">When traveling through a volume, light interacts with it, resulting in a change in radiance<\/mark><\/strong><\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Change in radiance [math]dL[\/math] along [math]ds[\/math]:<\/mark><\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">[math]dL(x, \\omega) = L_o(x, \\omega) &#8211; L_i(x, \\omega) = \\text{emission} + \\text{in-scattering} &#8211; \\text{out-scattering} &#8211; \\text{absorption}[\/math]<\/mark><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Radiance [math]L[\/math]<\/strong>: intensity of the light beam after it has traveled through the volume\n<ul class=\"wp-block-list\">\n<li><strong>Incoming radiance [math]L_i[\/math]:<\/strong> intensity of light shone on the cylinder<\/li>\n\n\n\n<li><strong>Outgoing radiance [math]L_o[\/math]<\/strong>: how light much leaves the volume on the other end<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>View direction [math]\\omega[\/math]<\/strong>: camera ray direction<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\">Light\/Medium Interactions<\/h1>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"670\" height=\"670\" src=\"https:\/\/cammonte.com\/wp-content\/uploads\/2025\/05\/image-41.png\" alt=\"\" class=\"wp-image-1379\" style=\"width:258px;height:auto\" srcset=\"https:\/\/cammonte.com\/wp-content\/uploads\/2025\/05\/image-41.png 670w, https:\/\/cammonte.com\/wp-content\/uploads\/2025\/05\/image-41-300x300.png 300w, https:\/\/cammonte.com\/wp-content\/uploads\/2025\/05\/image-41-150x150.png 150w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<ul class=\"wp-block-list\">\n<li><strong>Radiance decreasing interactions<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>Absorption<\/strong>: some of the light is absorbed<\/li>\n\n\n\n<li><strong>Out-scattering<\/strong>: photons making up the light beam traveling towards the eye are scattered in another direction<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Radiance increasing interactions<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>In-scattering<\/strong>: some of the light is redirected towards the eye<\/li>\n\n\n\n<li><strong>Emission<\/strong>: medium emits light, electrons gain energy released in the form of photons. Directions taken by these photons are random but some of them will travel towards the eye<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"670\" height=\"336\" src=\"https:\/\/cammonte.com\/wp-content\/uploads\/2025\/05\/image-42.png\" alt=\"\" class=\"wp-image-1380\" style=\"width:482px;height:auto\" srcset=\"https:\/\/cammonte.com\/wp-content\/uploads\/2025\/05\/image-42.png 670w, https:\/\/cammonte.com\/wp-content\/uploads\/2025\/05\/image-42-300x150.png 300w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Absorption (Beer-Lambert Law)<\/h2>\n\n\n\n<p class=\"has-text-align-center\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Internal transmittance: amount of light absorbed by the volume as light travels a certain distance through it<\/mark><\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">[math]T = e^{- \\text{distance} \\cdot \\sigma_a}[\/math]<\/mark><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>[math]T=0[\/math]: volume blocks all light; [math]T=1[\/math]: all light transmitted<\/li>\n\n\n\n<li><strong>Absorption coeffcient [math]\\sigma_a[\/math]:<\/strong> the denser the volume, the higher the absorption coefficient<\/li>\n\n\n\n<li>Colour that we see when looking at a surface with colour [math]c_s[\/math] through a volume with colour [math]c_v[\/math] is given by:<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center\">[math]C = T \\cdot c_s + (1 &#8211; T) \\cdot c_v[\/math]<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Out-scattering<\/h2>\n\n\n\n<p class=\"has-text-align-center\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">Light initially traveling towards the eye through a volume interacts with particles in the volume, changing its direction<\/mark><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">In-scattering<\/h2>\n\n\n\n<p class=\"has-text-align-center\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"> Light passing through a volume is redirected toward the eye due to a scattering event<\/mark><\/strong><\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<ul class=\"wp-block-list\">\n<li>In-scattering can happen anywhere between [math]t_0[\/math] and [math]t_1[\/math]<\/li>\n\n\n\n<li>Amount scattered toward the eye&#8217;s direction [math]\\omega[\/math] where [math]x[\/math] is a point on the segment [math]t_0[\/math] to [math]t_1[\/math]:<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center\">[math]\\int_{x=t_0}^{t_1} L_i(x, \\omega) dx[\/math]<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"377\" src=\"https:\/\/cammonte.com\/wp-content\/uploads\/2025\/05\/image-29.png\" alt=\"\" class=\"wp-image-1332\" style=\"width:296px;height:auto\" srcset=\"https:\/\/cammonte.com\/wp-content\/uploads\/2025\/05\/image-29.png 400w, https:\/\/cammonte.com\/wp-content\/uploads\/2025\/05\/image-29-300x283.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>No analytical solution -&gt; approximate through <strong>Riemann&#8217;s sum<\/strong>:<\/p>\n\n\n\n<p>For each segment [math]dx[\/math]:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Shoot a ray from [math]x[\/math] (middle of subsegment) towards light source to get the distance light has traveled through the volume between light source and [math]x[\/math]<\/li>\n\n\n\n<li>Beer&#8217;s law gives amount of light [math]L_i(x, \\omega)[\/math] arriving at [math]x[\/math]<\/li>\n\n\n\n<li>Multiply [math]L_i(x, \\omega)[\/math] by [math]dx[\/math] and accumulate the contribution<\/li>\n<\/ul>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"501\" src=\"https:\/\/cammonte.com\/wp-content\/uploads\/2025\/05\/image-30.png\" alt=\"\" class=\"wp-image-1335\" style=\"width:284px;height:auto\" srcset=\"https:\/\/cammonte.com\/wp-content\/uploads\/2025\/05\/image-30.png 400w, https:\/\/cammonte.com\/wp-content\/uploads\/2025\/05\/image-30-240x300.png 240w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>Two things missing:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We dont know what fraction of light is actually being in-scattered<\/li>\n\n\n\n<li>The in-scattered light will also be absorbed on it&#8217;s way back to the eye<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Coefficients<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-text-align-center\"><strong>Absorption coefficient [math]\\sigma_a[\/math]<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center\">Absorption increases whether you double either the absorption coefficient or the distance traveled by the light through the volume<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-text-align-center\"><strong>Scattering coefficient [math]\\sigma_s[\/math]<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center\">In-scattering and out-scattering are part of the same scattering phenomenon -> proba that a photon is being scattered is the same and defined by single coefficient<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-text-align-center\"><strong>Extinction coefficient [math]\\sigma_t[\/math]<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>[math]\\sigma_t = \\sigma_a + \\sigma_s[\/math]<\/strong><\/p>\n\n\n\n<p>Out-scattering and absorption both result in loss in radiance -> combine them when calculating this loss -> extinction or attenuation coefficient<\/p>\n<\/div>\n<\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>They all represent <strong>probability densities<\/strong>: likelihood that a random event (ex: absorption event) occurs at a given point<\/li>\n\n\n\n<li><strong>Unit<\/strong>: reciprocal distance, inverse of a distance\n<ul class=\"wp-block-list\">\n<li><strong>Mean free path<\/strong>: average distance a photon will travel through a volume before the photon and the medium interact with one another, <strong>inverse of the coefficient<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>When traveling through a volume, light interacts with it, resulting in a change in radiance Change in radiance [math]dL[\/math] along [math]ds[\/math]: [math]dL(x, \\omega) = L_o(x, \\omega) &#8211; L_i(x, \\omega) = \\text{emission} + \\text{in-scattering} &#8211; \\text{out-scattering} &#8211; \\text{absorption}[\/math] Light\/Medium Interactions Absorption (Beer-Lambert Law) Internal transmittance: amount of light absorbed by the volume as light travels a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ub_ctt_via":"","site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"class_list":["post-1412","page","type-page","status-publish","hentry"],"featured_image_src":null,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cammonte.com\/index.php\/wp-json\/wp\/v2\/pages\/1412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cammonte.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cammonte.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cammonte.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cammonte.com\/index.php\/wp-json\/wp\/v2\/comments?post=1412"}],"version-history":[{"count":13,"href":"https:\/\/cammonte.com\/index.php\/wp-json\/wp\/v2\/pages\/1412\/revisions"}],"predecessor-version":[{"id":1428,"href":"https:\/\/cammonte.com\/index.php\/wp-json\/wp\/v2\/pages\/1412\/revisions\/1428"}],"wp:attachment":[{"href":"https:\/\/cammonte.com\/index.php\/wp-json\/wp\/v2\/media?parent=1412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}