Up to this point, we've been working with opaque materials. Where light hits the
surface, and bounces off. For a number of reasons, transparent objects are more
challenging. First, light refracts, and so changes its direction when it hits a
transparent surface. For example, here light comes from the surface of the
pencil, travels through water, and hits the glass. The glass causes the light to
go in a different direction. Such the different light rays reach our eyes and
cause the pencil to look bent. This change in direction can also affect the
distribution of light on a surface. This crystal ball acts similarly to a lens,
focusing the light and creating various bright spots below it. In computer
graphics, we call these bright spots caustics. The color and the intensity of
the light can be filtered by the transparent object. The farther a ray of light
travels through an object, the more light that can be absorbed. Even thin
filters can change the color of the light. All of these effects can be simulated
or at least approximated in a convincing way. Refraction where the light changes
direction is expensive to do correctly. I'll be discussing it further in later
lessons. It's also possible to computer the amount of light absorbed due to
traveling through an object, though this can be costly. In the following
lessons, I'm going to focus on absorption of light by thin transparent surfaces,
such as these eyeglass filters. To simplify further still, I'll be talking about
only the effect of such filters on objects visible through them. In other words,
I won't be talking about how light passes through such a filter, reaches another
surface, and then travels to the eye. I'll only be talking about light that
travels from the object through the filter. This all sounds like a lot of
simplification, but you can get wonderful effects from just this form of
filtering alone. For example, this fantastic demo made by Alexander Roddick
shows how transparency can be used to effect. There are other cool effects going
on here, such as the God rays of light. But transparency is what really makes
this demo shine. It's 1 of my favorite Web GL programs. .
ここまでは光が当たるとはね返る
不透明なマテリアルについて見てきましたが
透明なオブジェクトの処理はより難しくなります
光は透明な表面に当たると屈折しその方向を変えます
例えば鉛筆に反射したこの光は
水中を通ってグラスに当たり
別の方向へ進んでいきます
異なる光線が目に届くと鉛筆が曲がって見えます
このような変化は配光にも影響を与えます
水晶玉はレンズと同じ働きをし
ライトを集めて様々な光の点を下に作ります
CGではこのような輝点をコースティクスと呼びます
色や光の強さは透明なオブジェクトを通して
フィルタがかかります
オブジェクト内を進むほどより多くの光が吸収されます
薄いフィルタでも光の色は変わります
このような影響については算出することができますが
光の屈折率を正確に計算するのは手間がかかります
あとのレッスンで説明します
これもまた難しいことですが
オブジェクトに吸収される光の量も計算できます
今は薄い透明体による光の吸収に注目しましょう
この眼鏡のようなものです
簡単に言えば薄いフィルタを通して見た時の
オブジェクトへの影響についてお話しします
光がどのようにフィルタを通過してはね返り
目に届くのかという話をするのではありません
フィルタを通る光にのみ焦点を絞って説明します
単純な事のように思えますが
この処理だけでもかなりの効果が表れます
アレクサンドル・ロディックによるこの幻想的なデモは
透明処理の効果を教えてくれます
他にもゴッドレイを出すような操作が
加えられていますが
輝きを作り出しているのは透明処理です
私のお気に入りのプログラムです
直到現在我們探討的都是不透明材質,光打到表面後反彈
透明物件因為一些原因難度較高
首先光線會折射,打到透明表面後會改變方向
像這裡光來自鉛筆表面
通過水打到玻璃,玻璃造成光往不同方向行進
不同的光線到達眼睛造成鉛筆看起來像是折彎的
方向改變也會造成光在表面的分布改變
這個水晶球有類似鏡片的作用
將光線集中造成下面的幾個亮點
在電腦圖學我們稱這些亮點為焦散(Caustics)
光的顏色跟強度可能被透明物體過濾
光在物體內行進越遠,越多光會被吸收
即使是薄片也能改變光的顏色
這些效果都能被模擬或是近似
光改變方向的折射,要做對相當昂貴
我在後面的課程會提到
光在物體內被吸收也是可以計算的,但也不便宜
接下來的課程我將專注在光被透明薄片吸收的情況,像是這副眼鏡的過濾效果
為了更簡化,我只會講過濾片對可見物體的效果
換句話說,我不會講光透過過濾片,打到另一個表面後才抵達眼睛
我只會講光來自物件,通過過濾片
這聽起來好像簡化很多,但是你可以用這種過濾達到好的效果
像是這個 Alexander Roddick 製作的展示
展現了透明能產生好的視覺效果
還有一些其他效果像是雲隙光
但透明才是重點
這是我最喜歡的 WebGL 展示之一