Skip to content

Commit

Permalink
#156 各向同性斜率分布的形状不变性 begin
Browse files Browse the repository at this point in the history
  • Loading branch information
kanition committed Mar 5, 2025
1 parent e0bf61a commit fe85981
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
3 changes: 1 addition & 2 deletions content/chap0209.tex
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,7 @@ \subsection{动画变换实现}\label{sub:动画变换实现}
\end{align}
其中$\bm M$是给定变换,$\bm T$是平移,$\bm R$是旋转,$\bm S$是缩放。
$\bm S$实际上是一种表示在\emph{某些}坐标系下的通用缩放
(Shoemake和Duff称之为拉伸\sidenote{译者注:原文stretch。}),
而不一定在是当前坐标系下。
(Shoemake和Duff称之为拉伸),而不一定在是当前坐标系下。
不论哪种情况,它都仍然可以按分量正确地线性插值。
给定\refvar{Matrix4x4}{},方法\refvar{Decompose}{()}计算其分解。
\begin{lstlisting}
Expand Down
6 changes: 4 additions & 2 deletions content/chap08.tex
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ \subsection{基本术语}\label{sub:基本术语}
\end{figure}

对于特定的某种反射,反射分布函数可能是\keyindex{各向同性}{isotropic}{}
\keyindex{各向异性}{anisotropic}{}的。大部分物体是各向同性的:
如果你在表面上选一点并绕该处的法线轴旋转它,反射光的分布不变。
\keyindex{各向异性}{anisotropic}{}的
\sidenote{译者注:通常,各向同性指物体的某种性质不会随方向而变化;
相反,各向异性则表示某性质与方向有关,在不同方向上往往表现不同。}。
大部分物体是各向同性的:如果你在表面上选一点并绕该处的法线轴旋转它,反射光的分布不变。
相反,当你像这样旋转各向异性材料时,它们反射的光量会不同。
各向异性表面的例子包括拉丝金属、多种布料和压缩光盘。

Expand Down
24 changes: 20 additions & 4 deletions content/chap08ex01.tex
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ \subsubsection*{Smith微面}
-\frac{y_{\mathrm{h}}}{z_{\mathrm{h}}}\right)\cdot(x,y)+C\, ,
\end{align}
我们由此定义
\begin{align}
\begin{align}\label{eq:08-ex01-slope-of-surface}
{\bm s}({\bm\omega}_{\mathrm{h}})=(x_s,y_s)
=\left(-\frac{x_{\mathrm{h}}}{z_{\mathrm{h}}},
-\frac{y_{\mathrm{h}}}{z_{\mathrm{h}}}\right)
Expand Down Expand Up @@ -658,7 +658,7 @@ \subsubsection*{Smith微面}
\end{align}
注意到$P_{xy}({\bm s})$应满足规范化约束,
即它在$x_s\in(-\infty,+\infty),y_s\in(-\infty,+\infty)$范围内非负,且有
\begin{align}
\begin{align}\label{eq:08-ex01-normal-of-P2D}
\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}
P_{xy}(x_s,y_s)\mathrm{d}x_s\mathrm{d}y_s=1\, .
\end{align}
Expand All @@ -673,7 +673,7 @@ \subsubsection*{Smith微面}
=D({\bm\omega}_{\mathrm{h}})\sin\theta\cos\theta\mathrm{d}\theta\mathrm{d}\varphi\, ,
\end{align}
代入\refeq{08-ex01-Jacobian-slope-normals}后可知斜率分布与法线分布的关系为
\begin{align}
\begin{align}\label{eq:08-ex01-relation-P2D-McrofacetDistribution}
P_{xy}(x_s,y_s)=\frac{1}{|J|}D({\bm\omega}_{\mathrm{h}})\sin\theta\cos\theta
=D({\bm\omega}_{\mathrm{h}})\cos^4\theta\, .
\end{align}
Expand Down Expand Up @@ -1151,7 +1151,7 @@ \subsubsection*{非基于物理的掩模函数}
\subsection{掩模函数的拉伸不变性}\label{sub:掩模函数的拉伸不变性}
本节继承上节记号,分析拉伸微面结构时掩模函数和斜率分布的不变性。

\reffig{08ex01-Stretch1D}所示,为了简化,我们在一维情形下考虑拉伸的问题
\reffig{08ex01-Stretch1D}所示,为了简化,我们在一维情形下考虑\keyindex{拉伸}{stretch}{}的问题
均匀拉伸微面结构(即把微面各处的斜率和出射方向的斜率同时乘以相同常数)后,
仿佛就是普通地拉伸图片那样,其中的拓扑结构没有本质上的变化,原本的光线遮挡关系也没变。
这意味掩模函数对这样的拉伸操作具有不变性。斜率分布的宽度则均匀拉伸为倒数倍。
Expand All @@ -1163,6 +1163,22 @@ \subsection{掩模函数的拉伸不变性}\label{sub:掩模函数的拉伸不
\label{fig:08ex01-Stretch1D}
\end{figure}

现在,我们显式地把粗糙度参数$\alpha$(或分别在$x$$y$方向上的$\alpha_x$$\alpha_y$
引入微面分布函数和斜率分布(实际上它已提前出现在\reftab{08ex01-Beckmann-V-cavity-Smith-Table}中了)。
回顾上节内容,尤其是\refeq{08-ex01-slope-of-surface}、\refeq{08-ex01-normals-by-slope}、
\refeq{08-ex01-normal-of-P2D}和\refeq{08-ex01-relation-P2D-McrofacetDistribution},我们拓展两者的记号:
对于各向同性分布,分别重新记作$D({\bm\omega}_{\mathrm{h}},\alpha)$$P_{xy}(x_s,y_s,\alpha)$
对于各向异性分布,分别重新记作$D({\bm\omega}_{\mathrm{h}},\alpha_x,\alpha_y)$$P_{xy}(x_s,y_s,\alpha_x,\alpha_y)$.

\subsubsection*{各向同性斜率分布的形状不变性}
典型的各向同性参数化斜率分布依赖粗糙度参数$\alpha$,改变$\alpha$等价于拉伸分布而不改变其形状。
这种情形下,斜率分布只决定于斜率大小$\displaystyle\tan\theta=\sqrt{x_s^2+y_s^2}$(也即
法线天顶角正切值)与$\alpha$的比例$\displaystyle\frac{\tan\theta}{\alpha}$
\begin{align}
P_{xy}(x_s,y_s,\alpha)=\frac{1}{\alpha^2}f\left(\frac{\sqrt{x_s^2+y_s^2}}{\alpha}\right)=\frac{1}{\alpha^2}f\left(\frac{\tan\theta}{\alpha}\right)\, ,
\end{align}
其中$f$是定义分布形状的一维函数。这样的斜率分布具有\keyindex{形状不变性}{shape invariant}{},

\subsection{典型微面分布函数的规范性证明}\label{sub:典型微面分布函数的规范性证明}
本节补充了\refeq{8.10}和\refeq{8.11}所给的
微面分布函数$D({\bm\omega}_{\mathrm{h}})$满足规范性要求的证明,即证明
Expand Down

0 comments on commit fe85981

Please sign in to comment.