InkSoul/public/computergraphic/材质与外观/index.html

689 lines
76 KiB
HTML
Raw Normal View History

2023-06-18 23:16:41 +08:00
<!DOCTYPE html>
<html lang="zh-CN">
<head prefix="og: http://ogp.me/ns# article: http://ogp.me/ns/article#">
<meta charset="UTF-8" />
<meta name="generator" content="Hugo 0.113.0"><meta name="theme-color" content="#fff" />
<meta name="color-scheme" content="light dark">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no" />
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<title>材质与外观 | 飞鸿踏雪</title>
<link rel="stylesheet" href="/css/meme.min.12a3541920a798d49c1bca858f15c53090f14ce9367a34faa2bb51dd38299730.css"/>
<script src="/js/meme.min.ac2b48f322cff6a9a8036be3baf3e59e300cd9e4191997a8c3765f79de02bf8d.js"></script>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=EB&#43;Garamond:ital,wght@0,400;0,500;0,700;1,400;1,700&amp;family=Noto&#43;Serif&#43;SC:wght@400;500;700&amp;family=Source&#43;Code&#43;Pro:ital,wght@0,400;0,700;1,400;1,700&amp;display=swap" media="print" onload="this.media='all'" />
<noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=EB&#43;Garamond:ital,wght@0,400;0,500;0,700;1,400;1,700&amp;family=Noto&#43;Serif&#43;SC:wght@400;500;700&amp;family=Source&#43;Code&#43;Pro:ital,wght@0,400;0,700;1,400;1,700&amp;display=swap" /></noscript>
<meta name="author" content="InkSoul" /><meta name="description" content="图形学中的材质 用于描述光线和不同材质间的作用关系 上图从左至右分别为三维空间中的网格模……" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="mask-icon" href="/icons/safari-pinned-tab.svg" color="#2a6df4" />
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="飞鸿踏雪" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="application-name" content="飞鸿踏雪" />
<meta name="msapplication-starturl" content="../../" />
<meta name="msapplication-TileColor" content="#fff" />
<meta name="msapplication-TileImage" content="../../icons/mstile-150x150.png" />
<link rel="manifest" href="/manifest.json" />
<link rel="canonical" href="http://www.inksoul.top/computergraphic/%E6%9D%90%E8%B4%A8%E4%B8%8E%E5%A4%96%E8%A7%82/" />
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"datePublished": "2022-07-25T15:23:18+08:00",
"dateModified": "2023-06-18T21:19:01+08:00",
"url": "http://www.inksoul.top/computergraphic/%E6%9D%90%E8%B4%A8%E4%B8%8E%E5%A4%96%E8%A7%82/",
"headline": "材质与外观",
"description": "图形学中的材质 用于描述光线和不同材质间的作用关系 上图从左至右分别为三维空间中的网格模……",
"inLanguage" : "zh-CN",
"articleSection": "computergraphic",
"wordCount": 4588 ,
"image": ["http://www.inksoul.top/../../images/eg_material_in_cg.png","http://www.inksoul.top/../../images/diffuse_lambertian_material.png","http://www.inksoul.top/../../images/caculate_diffuse_material.png","http://www.inksoul.top/../../images/glossy_material.png","http://www.inksoul.top/../../images/Ideal_feflective_material.png","http://www.inksoul.top/../../images/perfect_specular_reflection_in_physic1.png","http://www.inksoul.top/../../images/perfect_specular_reflection_in_physic2.png","http://www.inksoul.top/../../images/eg_specular_refraction.png","http://www.inksoul.top/../../images/medium_eg_snell_law.png","http://www.inksoul.top/../../images/snell_law_caculation.png","http://www.inksoul.top/../../images/eg_snell_window.png","http://www.inksoul.top/../../images/eg_fresnel_reflection.png","http://www.inksoul.top/../../images/fresnel_term_dielectric.png","http://www.inksoul.top/../../images/fresnel_term_conductor.png","http://www.inksoul.top/../../images/fresnel_term_formule.png","http://www.inksoul.top/../../images/microfacet_theory.png","http://www.inksoul.top/../../images/microfacet_BRDF_glossy.png","http://www.inksoul.top/../../images/microfacet_BRDF_diffuse.png","http://www.inksoul.top/../../images/microfacet_BRDF_caculate.png","http://www.inksoul.top/../../images/microfacet_BRDF_example.png","http://www.inksoul.top/../../images/isotropic_inside_an_elevator.png","http://www.inksoul.top/../../images/isotropic_materials_theory.png","http://www.inksoul.top/../../images/anisotropic_materials_theory.png","http://www.inksoul.top/../../images/anisotropic_BRDF_nylon.png","http://www.inksoul.top/../../images/anistotropic_BRDF_velvet.png","http://www.inksoul.top/../../images/measuring_BRDF_motivation.png","http://www.inksoul.top/../../images/image-based_BRDF_measurement.png","http://www.inksoul.top/../../images/gonioreflectometer.png","http://www.inksoul.top/../../images/tabular_representation.png"],
"author": {
"@type": "Person",
"email": "qingci30@163.com",
"image": "http://www.inksoul.top/icons/apple-touch-icon.png",
"url": "http://www.inksoul.top",
"name": "InkSoul"
},
"license": "[CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh)",
"publisher": {
"@type": "Organization",
"name": "飞鸿踏雪",
"logo": {
"@type": "ImageObject",
"url": "http://www.inksoul.top/icons/apple-touch-icon.png"
},
"url": "http://www.inksoul.top/"
},
"mainEntityOfPage": {
"@type": "WebSite",
"@id": "http://www.inksoul.top/"
}
}
</script>
<meta property="og:title" content="材质与外观" />
<meta property="og:description" content="图形学中的材质 用于描述光线和不同材质间的作用关系 上图从左至右分别为三维空间中的网格模……" />
<meta property="og:url" content="http://www.inksoul.top/computergraphic/%E6%9D%90%E8%B4%A8%E4%B8%8E%E5%A4%96%E8%A7%82/" />
<meta property="og:site_name" content="飞鸿踏雪" />
<meta property="og:locale" content="zh" /><meta property="og:image" content="http://www.inksoul.top/../../images/eg_material_in_cg.png" />
<meta property="og:type" content="article" />
<meta property="article:published_time" content="2022-07-25T15:23:18&#43;08:00" />
<meta property="article:modified_time" content="2023-06-18T21:19:01&#43;08:00" />
<meta property="article:section" content="computergraphic" />
</head>
<body>
<div class="container">
<header class="header">
<div class="header-wrapper">
<div class="header-inner single">
<div class="site-brand">
<a href="/" class="brand">飞鸿踏雪</a>
</div>
<nav class="nav">
<ul class="menu" id="menu">
<li class="menu-item active"><a href="/computergraphic/"><svg class="icon computergraphic" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"></path></svg><span class="menu-item-name">图形学</span></a>
</li>
<li class="menu-item"><a href="/algorithm/"><svg class="icon algorithm" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"></path></svg><span class="menu-item-name">算法</span></a>
</li>
<li class="menu-item"><a href="/mathematics/"><svg class="icon mathematics" fill="none" stroke="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path stroker-linecap="round" stroke-linejoin="round" stroker-width="2" d="M576 32.01c0-17.69-14.33-31.1-32-31.1l-224-.0049c-14.69 0-27.48 10-31.05 24.25L197.9 388.3L124.6 241.7C119.2 230.9 108.1 224 96 224L32 224c-17.67 0-32 14.31-32 31.1s14.33 32 32 32h44.22l103.2 206.3c5.469 10.91 16.6 17.68 28.61 17.68c1.172 0 2.323-.0576 3.495-.1826c13.31-1.469 24.31-11.06 27.56-24.06l105.9-423.8H544C561.7 64.01 576 49.7 576 32.01zM566.6 233.4c-12.5-12.5-32.75-12.5-45.25 0L480 274.8l-41.38-41.37c-12.5-12.5-32.75-12.5-45.25 0s-12.5 32.75 0 45.25l41.38 41.38l-41.38 41.38c-12.5 12.5-12.5 32.75 0 45.25C399.6 412.9 407.8 416 416 416s16.38-3.125 22.62-9.375L480 365.3l41.38 41.38C527.6 412.9 535.8 416 544 416s16.38-3.125 22.62-9.375c12.5-12.5 12.5-32.75 0-45.25l-41.38-41.38L566.6 278.6C579.1 266.1 579.1 245.9 566.6 233.4z"/></svg><span class="menu-item-name">数学</span></a>
</li>
<li class="menu-item"><a href="/408/"><svg class="icon 408" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticon 408s, Inc. --><path d="M172.1 40.16L268.1 3.76C280.9-1.089 295.1-1.089 307.9 3.76L403.9 40.16C425.6 48.41 440 69.25 440 92.52V204.7C441.3 205.1 442.6 205.5 443.9 205.1L539.9 242.4C561.6 250.6 576 271.5 576 294.7V413.9C576 436.1 562.9 456.2 542.5 465.1L446.5 507.3C432.2 513.7 415.8 513.7 401.5 507.3L288 457.5L174.5 507.3C160.2 513.7 143.8 513.7 129.5 507.3L33.46 465.1C13.13 456.2 0 436.1 0 413.9V294.7C0 271.5 14.39 250.6 36.15 242.4L132.1 205.1C133.4 205.5 134.7 205.1 136 204.7V92.52C136 69.25 150.4 48.41 172.1 40.16V40.16zM290.8 48.64C289 47.95 286.1 47.95 285.2 48.64L206.8 78.35L287.1 109.5L369.2 78.35L290.8 48.64zM392 210.6V121L309.6 152.6V241.8L392 210.6zM154.8 250.9C153 250.2 150.1 250.2 149.2 250.9L70.81 280.6L152 311.7L233.2 280.6L154.8 250.9zM173.6 455.3L256 419.1V323.2L173.6 354.8V455.3zM342.8 280.6L424 311.7L505.2 280.6L426.8 250.9C425 250.2 422.1 250.2 421.2 250.9L342.8 280.6zM528 413.9V323.2L445.6 354.8V455.3L523.2 421.2C526.1 419.9 528 417.1 528 413.9V413.9z"/></svg><span class="menu-item-name">408</span></a>
</li>
<li class="menu-item"><a href="/stuff/"><svg class="icon stuff" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticon stuffs, Inc. --><path d="M216 104C202.8 104 192 114.8 192 128s10.75 24 24 24c79.41 0 144 64.59 144 144C360 309.3 370.8 320 384 320s24-10.75 24-24C408 190.1 321.9 104 216 104zM224 0C206.3 0 192 14.31 192 32s14.33 32 32 32c123.5 0 224 100.5 224 224c0 17.69 14.33 32 32 32s32-14.31 32-32C512 129.2 382.8 0 224 0zM188.9 346l27.37-27.37c2.625 .625 5.059 1.506 7.809 1.506c17.75 0 31.99-14.26 31.99-32c0-17.62-14.24-32.01-31.99-32.01c-17.62 0-31.99 14.38-31.99 32.01c0 2.875 .8099 5.25 1.56 7.875L166.2 323.4L49.37 206.5c-7.25-7.25-20.12-6-24.1 3c-41.75 77.88-29.88 176.7 35.75 242.4c65.62 65.62 164.6 77.5 242.4 35.75c9.125-5 10.38-17.75 3-25L188.9 346z"/></svg><span class="menu-item-name">杂物</span></a>
</li>
<li class="menu-item"><a href="/about/"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512" class="icon user-circle"><path d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8.4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z"/></svg><span class="menu-item-name">关于</span></a>
</li>
<li class="menu-item">
<a id="theme-switcher" href="#"><span class="icon theme-icon-light">🌞</span><span class="icon theme-icon-dark">🌙</span></a>
</li>
</ul>
</nav>
</div>
</div>
<input type="checkbox" id="nav-toggle" aria-hidden="true" />
<label for="nav-toggle" class="nav-toggle"></label>
<label for="nav-toggle" class="nav-curtain"></label>
</header>
<main class="main single" id="main">
<div class="main-inner">
<article class="content post h-entry" data-align="justify" data-type="computergraphic" data-toc-num="true">
<h1 class="post-title p-name">材质与外观</h1>
<div class="post-body e-content">
<h3 id="图形学中的材质"><a href="#图形学中的材质" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>图形学中的材质</h3>
<p>用于描述光线和不同材质间的作用关系</p>
<p><img src="../../images/eg_material_in_cg.png" alt=""></p>
<p>上图从左至右分别为三维空间中的网格模型,渲染出的两种不同结果</p>
<h4 id="材质material--brdf"><a href="#材质material--brdf" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>材质(Material) == BRDF</h4>
<p>渲染方程由物理量推出因而渲染方程本身严格正确BRDF描述了某一种材质因此BRDF决定了光如何被反射</p>
<h6 id="漫反射材质"><a href="#漫反射材质" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>漫反射材质</h6>
<p>漫反射:任何一根光线打到漫反射位置的点上会被均匀地分散到各个不同的方向上去</p>
<p><img src="../../images/diffuse_lambertian_material.png" alt=""></p>
<ul>
<li>漫反射材质可定义任何一个不同的点上不同的漫反射系数</li>
</ul>
<p>经验定义:</p>
<p>在Blinn-phong模型中我们定义过漫反射系数有多少Intensity到达然后用一个0到1的颜色控制能被吸收多少RGB三个通道各不相同那就引入了颜色</p>
<p>正确定义:</p>
<p>空间中从任何一个方向进来的光的Radiacne是一样的反射出来的光因为漫反射所以也是同样的</p>
<p>因此如果如果这个点不发光也不吸收光白的那就意味着所有的光进来多少就发射出去多少。也就是进来多少Irradiance就会出去多少Irradiance因为Radiance是一致的的所以入射和出射的Radiance也要是一样的</p>
<p><img src="../../images/caculate_diffuse_material.png" alt=""></p>
<p>要使Li等于Lo所以BRDF为$1/\pi$,此时是完全不吸收能量的</p>
<p>可定义一个反射率(albedo)在0到1之间那就可以引入不同颜色的BRDF值为$albedo/\pi$。这个BRDF的范围是$(0,1/\pi)$</p>
<p>$$f_r = \rho/\pi$$</p>
<h6 id="glossy材质"><a href="#glossy材质" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>Glossy材质</h6>
<p>类似于镜面反射又有些粗糙</p>
<p><img src="../../images/glossy_material.png" alt=""></p>
<h6 id="类玻璃水的通透材质"><a href="#类玻璃水的通透材质" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>类玻璃/水的通透材质</h6>
<p><img src="../../images/Ideal_feflective_material.png" alt=""></p>
<p>左图为玻璃球(水的性质),右图有颜色且来自于玻璃球壳内,说明折射光在玻璃里传播时会被部分吸收</p>
<h4 id="反射"><a href="#反射" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>反射</h4>
<h5 id="物理上的反射定律"><a href="#物理上的反射定律" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>物理上的反射定律</h5>
<p>镜面反射:入射角等于反射角</p>
<p><img src="../../images/perfect_specular_reflection_in_physic1.png" alt=""></p>
<h5 id="计算公式"><a href="#计算公式" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>计算公式</h5>
<p>方式一:</p>
<p>根据反射定律,入射光的方向和出射方向的正中间一定是法线方向,再利用平行四边形法则,将$\omega o$和$\omega i$加起来一定会沿着n方向其长度为$2\cos \theta $</p>
<p>方式二:</p>
<p>将入射和反射角投影到局部坐标系上可以认为任何一个方向和法线的夹角为0意味着其方向沿着法线方向为坐标系的水平方向</p>
<p>再定义一个$\phi$角度:规定$\omega i$、$\omega o$、n在某一个平面上$\phi$等于0如果这个平面绕着n在转所形成的角度叫方位角</p>
<p>通过这种方式可以将任何的角度拆成$\theta$和$\phi$,对于左图从上往下看,得到右图,入射角和出射角的朝向在方位角上正好相反(也就是在一个角度上加上一个$\pi$),然后所有的角度都是按$2\pi$循环的</p>
<p>所以已知$\theta和\phi$,就可以计算出射方向</p>
<p><img src="../../images/perfect_specular_reflection_in_physic2.png" alt=""></p>
<p>镜面反射:</p>
<p>对于一个全镜面反射来说,只需要考虑菲涅尔系数</p>
<p>$$L_o(\omega_o) = F_r(\omega_r)L_i(\omega_r) = \int_{\Omega}f_r(\omega_o,\omega_i)L_i(\omega_i)\cos \theta_i d\omega_i$$</p>
<p>$\omega_r和\omega_o$关于表面法线对称</p>
<p>此处描述$f_r$BRDF项使用狄拉克函数$\delta$</p>
<p>$\delta$函数满足:</p>
<p>$$\delta(x) = \begin{cases}
\infty &amp; \text{x = 0} \\
0 &amp; {x \neq 0 }
\end{cases}$$</p>
<p>$$\int_{-\infty}^{+\infty} {\delta(x)} =1$$</p>
<p>$$\int_{-\infty}^{+\infty} {f(x)\delta(x-x_0)dx} = f(x_0)$$</p>
<p>此时将狄拉克函数代入方程中可得到</p>
<p>$$L_0 = \int_{\Omega} {\frac{\delta(\omega_i - \omega_r )}{\cos\theta_i}F_r(\omega_i)\cos\theta_i d\omega_i} = F_r(\omega_r)L_i(\omega_r)$$</p>
<p>得到镜面反射的BRDF表达式</p>
<p>$$f_r(p,\omega_0,\omega_i) = F_r(\omega_r)\frac{\delta(\omega_i - \omega_r)}{\cos\theta_i}$$</p>
<h3 id="折射"><a href="#折射" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>折射</h3>
<ul>
<li>色散:一束平行光经过棱镜后,因为不同的波长有不同的折射率,会被分解成不同的光线</li>
<li>Caustics(不准确翻译为焦散)</li>
</ul>
<p>产生Caustics的原因永远不是散射而是聚焦</p>
<p>形成原因:光线打到的海水表面时,光线会往不同的方向去折射,对于海底的某一个点来说,有几率接收到来自不同方向打过来的光</p>
<p><img src="../../images/eg_specular_refraction.png" alt=""></p>
<h4 id="斯内尔定律snells-law"><a href="#斯内尔定律snells-law" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>斯内尔定律(Snell's Law)</h4>
<p>不同材质拥有不同的额折射率如真空认为是1水为1.333,折射率越高说明光在穿过这个材质时会被折射得非常厉害,折射角会非常小,体现出不同波长的光被折射得不同程度</p>
<p><img src="../../images/medium_eg_snell_law.png" alt=""></p>
<p>方位角的朝向中,入射光和折射光也是正好相反的</p>
<p>入射角的正弦和折射角的正弦满足折射率相乘相等</p>
<p>$$\eta_i \sin\theta_i = \eta_t \sin\theta_t$$</p>
<p><img src="../../images/snell_law_caculation.png" alt=""></p>
<p>由斯内尔定律可计算折射角的余弦</p>
<p>$$\eta_i \sin\theta_i = \eta_t \sin\theta_t$$</p>
<p>$$\cos\theta_t = \sqrt{1-\sin^2\theta_t} $$</p>
<p>$$= \sqrt{1-(\frac{\eta_i}{\eta_t})^2 sin^2\theta_i}$$</p>
<p>$$\sqrt{1-(\frac{\eta_i}{\eta_t})^2(1-\cos^2 \theta_i)}$$</p>
<h4 id="全反射现象"><a href="#全反射现象" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>全反射现象</h4>
<p>当满足下列条件时,折射角的余弦的计算没有实数意义,即折射不可能发生</p>
<p>$$1-(\frac{\eta_i}{\eta_t})^2(1-\cos^2\theta_i) &lt; 0$$</p>
<p>要使上式成立则</p>
<p>$$\frac{\eta_i}{\eta_t} &gt; 1$$</p>
<p>即入射介质的折射率大于折射介质的折射率,此时可能会发生没有折射的现象,名为全反射现象</p>
<p>Snell's Window/Circle</p>
<p>人在水底往各个不同的方向看只能看到一个锥形的区域97.2度。如下图最左边的一根光线的折射角就已经达到90度了如果角度再大一点所有能量都会反射到池子底部</p>
<p><img src="../../images/eg_snell_window.png" alt=""></p>
<h4 id="bsdf--brdf--btdf"><a href="#bsdf--brdf--btdf" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>BSDF = BRDF + BTDF</h4>
<p>BRDF中的R表示反射折射是BTDF其中的T是transmit。BRDF和BTDF加起来可以统称BSDF其中的S表示散射</p>
<h4 id="菲涅尔项fresnel-reflectionterm"><a href="#菲涅尔项fresnel-reflectionterm" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>菲涅尔项(Fresnel Reflection/Term)</h4>
<p>反射率取决于入射角(和光的偏振)的现象</p>
<p><img src="../../images/eg_fresnel_reflection.png" alt=""></p>
<p>如上图中,反射现象随着视角变化而明显</p>
<h5 id="绝缘体"><a href="#绝缘体" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>绝缘体</h5>
<p>图中红线所示,如果一根光几乎和物体表面完全持平,那它就会被完全反射掉;如果光和物体是垂直的,更多的能量会发生折射,反射的能量会非常少</p>
<p>下图的另外两根线表示的是极化现象和光线的波动性有关其实光线是沿着各个不同方向有振动的极化就是只沿着某一个方向振动S和P是两个方向的极化</p>
<p><img src="../../images/fresnel_term_dielectric.png" alt=""></p>
<h5 id="导体"><a href="#导体" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>导体</h5>
<p>导体的菲涅尔项和绝缘体的不一样,即使在垂直看过去的情况下,也是反射很多能量</p>
<p>导体的折射率是复数需要一个N和一个K</p>
<p><img src="../../images/fresnel_term_conductor.png" alt=""></p>
<h5 id="菲涅尔项的公式"><a href="#菲涅尔项的公式" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>菲涅尔项的公式</h5>
<p>一个0到1之间的数有多少能量会被反射2个不同的极化polarizationS和P会告诉你不同的反射率如果考虑不极化的光就将2项平均</p>
<p><img src="../../images/fresnel_term_formule.png" alt=""></p>
<h5 id="菲涅尔近似式"><a href="#菲涅尔近似式" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>菲涅尔近似式</h5>
<p>可认为该曲线在视角为0度时为某一个值到达90度值就为1和绝缘体类似对导体而言不考虑其下降再上升的过程</p>
<p>基准反射率与折射率存在数学关系</p>
<p>$$R_0 = (\frac{n_1-n_2}{n_1+n_2})^2$$</p>
<p>曲线上升到90度时为10度时等于$R_0$</p>
<p>$$R(\theta) = R_0 + (1 - R_0)(1 - \cos\theta)^5$$</p>
<p>可近乎完美地近似绝缘体或导体</p>
<h4 id="微表面材质模型"><a href="#微表面材质模型" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>微表面材质/模型</h4>
<p>如下图在空间站拍摄的照片,有相对完美的高光,但看不到地球表面的山、树、和建筑物</p>
<p>与微表面理论不谋而和,只要离得足够远,看向一个物体时,很多微小的东西看不到,看到的是它们最终形成的对表面的作用(对光形成的总体的效应)</p>
<h5 id="微表面理论microfacet-theory"><a href="#微表面理论microfacet-theory" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>微表面理论(Microfacet Theory)</h5>
<p>假设物体表面是粗糙的,从远处看看到的是材质(外观),从近处看看到的是几何</p>
<ul>
<li>
<p>Macroscale层级flat &amp; rough从远处看看到的是一个平面并且是粗糙材质看上去是粗糙的</p>
</li>
<li>
<p>Microscale层级bumpy &amp; specular从近处看可以看到很多凹凸不平的表面并且每一个小的表面的微元都认为是完全镜面反射的物体</p>
</li>
</ul>
<p>漫反射将光反射到各个方向上就是认为所有的微表面都像一个很小的镜子,分布又各不规则,最后形成的分布就会把光打到各个不同的方向上去</p>
<p><img src="../../images/microfacet_theory.png" alt=""></p>
<h5 id="微表面法线分布"><a href="#微表面法线分布" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>微表面法线分布</h5>
<ul>
<li>可使用微表面模型将表面的粗糙程度用微表面的法线分布表示</li>
</ul>
<p>glossy材质</p>
<p>如下图的表面,看起来很平,它们的分布法线差的不太远,基本都是朝上的。所以如果将它们的分布画出来,它们的法线会集中在宏观的表面法线的周围</p>
<p><img src="../../images/microfacet_BRDF_glossy.png" alt=""></p>
<p>diffuse材质</p>
<p>如下图,如果表面粗糙(意味着所有的微表面会沿着不同的方向),如果将法线画出来,那它的分布就会离中心离的特别远都会有分布的值</p>
<p><img src="../../images/microfacet_BRDF_diffuse.png" alt=""></p>
<ul>
<li>微表面模型的BRDF公式</li>
</ul>
<p>菲涅尔项Fresnel- Fih</p>
<p>表示总共有多少能量被反射。根据不同的入射方向有不同程度的反射(也就是说如果入射方向几乎是平的,那么就会有大量能量被反射)</p>
<p>法线分布distribution of normals- Dh</p>
<p>这个分布表示在任何一个给定方向上分布的值(可能是集中在中间的,可能是均匀分散开的)</p>
<p>只有当微表面的法线方向和half vector完全一致的时候才能吧入射方向的光反射到出射方向上去</p>
<p>阴影遮掩shadowing-masking几何项 - Gioh</p>
<p>这些微表面间有可能会发生互相遮挡。对入射的光线,有可能会出现自己给自己的阴影;对于观察方向也是一样的,有部分也有可能因为遮挡会看不到</p>
<p>光线近似平行于表面时更易发生自遮挡,这种入射方向为掠射角(Grazing Angle),阴影遮掩的提出正是用于修正掠影角</p>
<p><img src="../../images/microfacet_BRDF_caculate.png" alt=""></p>
<hr>
<p>使用微表面材质渲染得到的图像质量很高,且微表面模型可描述的物体种类较多,金属、皮质、木头</p>
<p><img src="../../images/microfacet_BRDF_example.png" alt=""></p>
<h4 id="各向同性各向异性材质"><a href="#各向同性各向异性材质" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>各向同性/各向异性材质</h4>
<p>如下图在电梯间的内部,电梯间的六面几乎都是金属,金属是平面的,如果说头顶上有一些小灯打到金属的表面上去会形成高光,高光一般都是圆和椭圆,但这里出现了一条一条的现象</p>
<p>当金属为拉丝金属,就会产生如图现象</p>
<p><img src="../../images/isotropic_inside_an_elevator.png" alt=""></p>
<ul>
<li>各向同性:认为其微表面不存在一定的方向性,或方向性微弱</li>
</ul>
<p>下图可见法线在各个方向上的分布是均匀的</p>
<p><img src="../../images/isotropic_materials_theory.png" alt=""></p>
<ul>
<li>各向异性:认为其法线分布具有明确的方向性</li>
</ul>
<p><img src="../../images/anisotropic_materials_theory.png" alt=""></p>
<ul>
<li>Anisotropic BRDFs</li>
</ul>
<p>如果出射方向和入射方向在方位角上旋转得到的还是相同的BRDF那就是各向同性的材质。如果不只和相对的方位角有关还和绝对的方位角有关那这个BRDF就是各向异性的</p>
<p>$$f_r(\theta_i,\phi_i;\theta_r,\phi_r) \neq f_r(\theta_i,\phi_i;\theta_r, - \phi_r)$$</p>
<ul>
<li>尼龙</li>
</ul>
<p>正常尼龙做法为水平方向和竖直方向的一根压一根,其各向异性在对角线上有不同的表现</p>
<p><img src="../../images/anisotropic_BRDF_nylon.png" alt=""></p>
<ul>
<li>天鹅绒</li>
</ul>
<p>底层有很多伸出去的纤维,如果这些纤维往各个不同方向上分布是均匀的,就可认为是各向异性。但我们可将纤维拨到一边去,认为造出各向异性效果</p>
<p><img src="../../images/anistotropic_BRDF_velvet.png" alt=""></p>
<h4 id="brdf属性"><a href="#brdf属性" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>BRDF属性</h4>
<ul>
<li>非负性</li>
</ul>
<p>$$f_r(\omega_i - \omega_r) \geq 0 $$</p>
<ul>
<li>线性</li>
</ul>
<p>BRDF可拆分为多块分别做光线传播再累加各块得到结果与未拆分相同</p>
<p>$$L_r(p,\omega_r) = \int_{H^2} f_r(p,\omega_i \rightarrow \omega_r)L_i(p,\omega_i)\cos\theta_id\omega_i$$</p>
<ul>
<li>可逆性</li>
</ul>
<p>交换入射方向和出射方向得到的BRDF值相同</p>
<p>$$f_r(\omega_r \rightarrow \omega_i) = f_r(\omega_i \rightarrow \omega_r)$$</p>
<ul>
<li>能量守恒</li>
</ul>
<p>BRDF不会让能量变多</p>
<p>$$\forall \omega_r \int_{H^2} f_r(\omega_i \rightarrow \omega_r)\cos \theta_i d\omega_i \leq 1 $$</p>
<p>path tracing 中光线在无限次弹射后会收敛正是因为能量守恒</p>
<ul>
<li>各向同性和各向异性</li>
</ul>
<p>各向同性说明BRDF的值只与相对的方位角相关可改写为下式</p>
<p>$$f_r(\theta_i,\phi_i;\theta_r,\phi_r) f_r(\theta_i,\phi_i;\theta_r, - \phi_r)$$</p>
<p>原本四维的BRDF会变成三维</p>
<ul>
<li>由于BRDF的可逆性所以对于各向同性来说相对的方位角无需考虑正负</li>
</ul>
<p>$$f_r(\theta_i,\theta_r,\phi_r - \phi_i) = f_r(\theta_r,\theta_i,\phi_i - \phi_r) = f_r(\theta_i,\theta_r,|\phi_r - \phi_i|)$$</p>
<h4 id="测量brdf"><a href="#测量brdf" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>测量BRDF</h4>
<p>BRDF可以用各种各样不同的模型去描述但这些模型都是基于物理的描述或者近似但只有测量出来的BRDF才是对的BRDF</p>
<ul>
<li>测量原因</li>
</ul>
<p>以前的模型不够准确</p>
<p>可以通过某些物理方法测出菲涅尔项(绿线、红线),发现和理论上的曲线(蓝线)看起来完全不一样。也就是说实际上菲涅尔项非常复杂,不是简单公式可以描述的,所以之前的模型是不太准确的</p>
<p>物理上得出的很多结论大多经过简化,与实际不同,在多数情况下需要测量</p>
<p>测量后可以不用推出一些模型,可以直接用测的数据</p>
<p><img src="../../images/measuring_BRDF_motivation.png" alt=""></p>
<h5 id="怎么测量"><a href="#怎么测量" class="anchor-link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon anchor-icon"><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg></a>怎么测量</h5>
<ul>
<li>理论</li>
</ul>
<p>BRDF是2个方向一个入射方向一个出射方向的一个函数如果盯着一个着色点看并改变它的入射方向比如拿一个灯从四面八方照它相机从四面八方去拍它这样就可以覆盖BRDF所有可能的输入方向和可能的输出方向对这样就可以做测量</p>
<p><img src="../../images/image-based_BRDF_measurement.png" alt=""></p>
<ul>
<li>实践仪器</li>
</ul>
<p>这个器械有2个爪子一个抓相机一个抓光源将样本放在正中间球心这2个爪子可以在球面上任意的旋转</p>
<p><img src="../../images/gonioreflectometer.png" alt=""></p>
<ul>
<li>算法</li>
</ul>
<p>枚举所有出射方向,放置光源</p>
<p>枚举所有入射方向,放置相机</p>
<p>测量Radiance</p>
<pre tabindex="0"><code>foreach outgoing direction wo
move light to illuminate surface with a thin beam from wo
for each incoming direction wi
move sensor to be at direction wi from surface
measure incident radiance
</code></pre><p>测得BRDF是四维的测量十分耗时</p>
<p>固定了摄像机之后光源要整个走一遍球面才能覆盖所有的光源方向如果下次换一下相机的方向就又要把光源在整个球面走一遍这就叫curse of dimentionality</p>
<ul>
<li>提升算法效率</li>
</ul>
<p>如果测量的BRDF是各向同性的实际上只有三维的</p>
<p>用BRDF的可逆性只考虑相对方位角的话又可以减少一半的测量</p>
<ul>
<li>BRDFs存在的问题</li>
</ul>
<ol>
<li>需要精确测量掠影角</li>
<li>需要足够高密度的采样频率来测量,以捕获高频的镜面反射</li>
<li>逆向反射</li>
<li>空间反射率会发生变化</li>
</ol>
<ul>
<li>BRDFs的存储</li>
</ul>
<p>需要的存储要求</p>
<ol>
<li>紧凑的表现形式</li>
<li>准确表示测量的数据</li>
<li>能正确表现任意方向</li>
<li>需要可用于重要性采样的良好分布</li>
</ol>
<ul>
<li>BRDF库</li>
</ul>
<p>BRDF库存储了很多不同的材质大多数是假设各向同性的</p>
<p>对每一个材质做了90<em>90</em>180次测量并存储结果至一个三维数组</p>
<p>存储数据量大(未压缩)</p>
<p><img src="../../images/tabular_representation.png" alt=""></p>
</div>
</article>
<div class="updated-badge-container">
<span title="Updated @ 2023-06-18 21:19:01 CST" style="cursor:help">
<svg xmlns="http://www.w3.org/2000/svg" width="130" height="20" class="updated-badge"><linearGradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="a"><rect width="130" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#a)"><path class="updated-badge-left" d="M0 0h55v20H0z"/><path class="updated-badge-right" d="M55 0h75v20H55z"/><path fill="url(#b)" d="M0 0h130v20H0z"/></g><g fill="#fff" text-anchor="middle" font-size="110"><text x="285" y="150" fill="#010101" fill-opacity=".3" textLength="450" transform="scale(.1)">updated</text><text x="285" y="140" textLength="450" transform="scale(.1)">updated</text><text x="915" y="150" fill="#010101" fill-opacity=".3" textLength="650" transform="scale(.1)">2023-06-18</text><text x="915" y="140" textLength="650" transform="scale(.1)">2023-06-18</text></g></svg>
</span></div>
<ul class="post-nav">
<li class="post-nav-prev">
<a href="/computergraphic/%E9%AB%98%E7%BA%A7%E5%85%89%E7%BA%BF%E4%BC%A0%E6%92%AD%E4%B8%8E%E5%A4%8D%E6%9D%82%E5%A4%96%E8%A7%82%E5%BB%BA%E6%A8%A1/" rel="prev">&lt; 高级光线传播与复杂外观建模</a>
</li>
<li class="post-nav-next">
<a href="/computergraphic/%E8%B7%AF%E5%BE%84%E8%BF%BD%E8%B8%AA/" rel="next">路径追踪 &gt;</a>
</li>
</ul>
</div>
</main>
<div id="back-to-top" class="back-to-top">
<a href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="icon arrow-up"><path d="M34.9 289.5l-22.2-22.2c-9.4-9.4-9.4-24.6 0-33.9L207 39c9.4-9.4 24.6-9.4 33.9 0l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9L413 289.4c-9.5 9.5-25 9.3-34.3-.4L264 168.6V456c0 13.3-10.7 24-24 24h-32c-13.3 0-24-10.7-24-24V168.6L69.2 289.1c-9.3 9.8-24.8 10-34.3.4z"/></svg></a>
</div>
<footer id="footer" class="footer">
<div class="footer-inner">
<div class="site-info">©&nbsp;20222023&nbsp;<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon footer-icon"><path d="M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z"/></svg>&nbsp;InkSoul</div><div class="powered-by">Powered by <a href="https://github.com/gohugoio/hugo" target="_blank" rel="noopener">Hugo</a> | Theme is <a href="https://github.com/reuixiy/hugo-theme-meme" target="_blank" rel="noopener">MemE</a></div><div class="site-copyright"><a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" target="_blank" rel="noopener">CC BY-NC-SA 4.0</a></div><div class="custom-footer"><a href="https://beian.miit.gov.cn" target="_blank" rel="noopener">闽ICP备2022009452号-1</a></div>
<ul class="socials"><li class="socials-item">
<a href="mailto:qingci30@163.com" target="_blank" rel="external noopener" title="Email"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon social-icon"><path d="M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm0 48v40.805c-22.422 18.259-58.168 46.651-134.587 106.49-16.841 13.247-50.201 45.072-73.413 44.701-23.208.375-56.579-31.459-73.413-44.701C106.18 199.465 70.425 171.067 48 152.805V112h416zM48 400V214.398c22.914 18.251 55.409 43.862 104.938 82.646 21.857 17.205 60.134 55.186 103.062 54.955 42.717.231 80.509-37.199 103.053-54.947 49.528-38.783 82.032-64.401 104.947-82.653V400H48z"/></svg></a>
</li><li class="socials-item">
<a href="https://github.com/ink-soul" target="_blank" rel="external noopener" title="GitHub"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="icon social-icon"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg></a>
</li><li class="socials-item">
2023-06-18 23:31:34 +08:00
<a href="http://gitea.inksoul.top/inksoul" target="_blank" rel="external noopener" title="gitea"><svg class="icon social-icon" fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.209 4.603c-.247 0-.525.02-.84.088-.333.07-1.28.283-2.054 1.027C-.403 7.25.035 9.685.089 10.052c.065.446.263 1.687 1.21 2.768 1.749 2.141 5.513 2.092 5.513 2.092s.462 1.103 1.168 2.119c.955 1.263 1.936 2.248 2.89 2.367 2.406 0 7.212-.004 7.212-.004s.458.004 1.08-.394c.535-.324 1.013-.893 1.013-.893s.492-.527 1.18-1.73c.21-.37.385-.729.538-1.068 0 0 2.107-4.471 2.107-8.823-.042-1.318-.367-1.55-.443-1.627-.156-.156-.366-.153-.366-.153s-4.475.252-6.792.306c-.508.011-1.012.023-1.512.027v4.474l-.634-.301c0-1.39-.004-4.17-.004-4.17-1.107.016-3.405-.084-3.405-.084s-5.399-.27-5.987-.324c-.187-.011-.401-.032-.648-.032zm.354 1.832h.111s.271 2.269.6 3.597C5.549 11.147 6.22 13 6.22 13s-.996-.119-1.641-.348c-.99-.324-1.409-.714-1.409-.714s-.73-.511-1.096-1.52C1.444 8.73 2.021 7.7 2.021 7.7s.32-.859 1.47-1.145c.395-.106.863-.12 1.072-.12zm8.33 2.554c.26.003.509.127.509.127l.868.422-.529 1.075a.686.686 0 0 0-.614.359.685.685 0 0 0 .072.756l-.939 1.924a.69.69 0 0 0-.66.527.687.687 0 0 0 .347.763.686.686 0 0 0 .867-.206.688.688 0 0 0-.069-.882l.916-1.874a.667.667 0 0 0 .237-.02.657.657 0 0 0 .271-.137 8.826 8.826 0 0 1 1.016.512.761.761 0 0 1 .286.282c.073.21-.073.569-.073.569-.087.29-.702 1.55-.702 1.55a.692.692 0 0 0-.676.477.681.681 0 1 0 1.157-.252c.073-.141.141-.282.214-.431.19-.397.515-1.16.515-1.16.035-.066.218-.394.103-.814-.095-.435-.48-.638-.48-.638-.467-.301-1.116-.58-1.116-.58s0-.156-.042-.27a.688.688 0 0 0-.148-.241l.516-1.062 2.89 1.401s.48.218.583.619c.073.282-.019.534-.069.657-.24.587-2.1 4.317-2.1 4.317s-.232.554-.748.588a1.065 1.065 0 0 1-.393-.045l-.202-.08-4.31-2.1s-.417-.218-.49-.596c-.083-.31.104-.691.104-.691l2.073-4.272s.183-.37.466-.497a.855.855 0 0 1 .35-.077z" ></path></svg></a>
2023-06-18 23:16:41 +08:00
</li><li class="socials-item">
<a href="https://space.bilibili.com/262369930" target="_blank" rel="external noopener" title="bilibili"><svg class="icon social-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17.813 4.653h.854c1.51.054 2.769.578 3.773 1.574 1.004.995 1.524 2.249 1.56 3.76v7.36c-.036 1.51-.556 2.769-1.56 3.773s-2.262 1.524-3.773 1.56H5.333c-1.51-.036-2.769-.556-3.773-1.56S.036 18.858 0 17.347v-7.36c.036-1.511.556-2.765 1.56-3.76 1.004-.996 2.262-1.52 3.773-1.574h.774l-1.174-1.12a1.234 1.234 0 0 1-.373-.906c0-.356.124-.658.373-.907l.027-.027c.267-.249.573-.373.92-.373.347 0 .653.124.92.373L9.653 4.44c.071.071.134.142.187.213h4.267a.836.836 0 0 1 .16-.213l2.853-2.747c.267-.249.573-.373.92-.373.347 0 .662.151.929.4.267.249.391.551.391.907 0 .355-.124.657-.373.906zM5.333 7.24c-.746.018-1.373.276-1.88.773-.506.498-.769 1.13-.786 1.894v7.52c.017.764.28 1.395.786 1.893.507.498 1.134.756 1.88.773h13.334c.746-.017 1.373-.275 1.88-.773.506-.498.769-1.129.786-1.893v-7.52c-.017-.765-.28-1.396-.786-1.894-.507-.497-1.134-.755-1.88-.773zM8 11.107c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c0-.373.129-.689.386-.947.258-.257.574-.386.947-.386zm8 0c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c.017-.391.15-.711.4-.96.249-.249.56-.373.933-.373Z"/></svg></a>
</li></ul>
</div>
</footer>
</div>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('\/sw.js');
});
}
</script>
<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/katex@0.13.0/dist/katex.min.css" integrity="sha256-gPJfuwTULrEAAcI3X4bALVU/2qBU+QY/TpoD3GO+Exw=" crossorigin="anonymous">
<script>
if (typeof renderMathInElement === 'undefined') {
var getScript = (options) => {
var script = document.createElement('script');
script.defer = true;
script.crossOrigin = 'anonymous';
Object.keys(options).forEach((key) => {
script[key] = options[key];
});
document.body.appendChild(script);
};
getScript({
src: 'https:\/\/fastly.jsdelivr.net/npm/katex@0.13.0/dist/katex.min.js',
integrity: 'sha256-YTW9cMncW/ZQMhY69KaUxIa2cPTxV87Uh627Gf5ODUw=',
onload: () => {
getScript({
src: 'https:\/\/fastly.jsdelivr.net/npm/katex@0.13.0/dist/contrib/mhchem.min.js',
integrity: 'sha256-yzSfYeVsWJ1x+2g8CYHsB/Mn7PcSp8122k5BM4T3Vxw=',
onload: () => {
getScript({
src: 'https:\/\/fastly.jsdelivr.net/npm/katex@0.13.0/dist/contrib/auto-render.min.js',
integrity: 'sha256-fxJzNV6hpc8tgW8tF0zVobKa71eTCRGTgxFXt1ZpJNM=',
onload: () => {
renderKaTex();
}
});
}
});
}
});
} else {
renderKaTex();
}
function renderKaTex() {
renderMathInElement(
document.body,
{
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "\\[", right: "\\]", display: true},
{left: "$", right: "$", display: false},
{left: "\\(", right: "\\)", display: false}
]
}
);
}
</script>
<script src="https://fastly.jsdelivr.net/npm/medium-zoom@latest/dist/medium-zoom.min.js"></script>
<script>
let imgNodes = document.querySelectorAll('div.post-body img');
imgNodes = Array.from(imgNodes).filter(node => node.parentNode.tagName !== "A");
mediumZoom(imgNodes, {
background: 'hsla(var(--color-bg-h), var(--color-bg-s), var(--color-bg-l), 0.95)'
})
</script>
<script src="https://fastly.jsdelivr.net/npm/instant.page@5.1.0/instantpage.min.js" type="module" defer></script>
</body>
</html>