In this session we're going to take a look at shadows. This is a little
environment i built and it's being lit by a directional light. When doing
trivial graphics rendering, which I'm doing here, shadowing is typically not
supported. For instance we can see that light leaks in under the little roof in
the back of the scene. so let's lay a little shadowing. Now we can see that the
scene is being properly shadowed. Parts of the environment that were previously
incorrectly lit are now dark. This happens because we are now disabling light
if there is something between the light source and the geometry. By rotating
the light, we can also place the shadow where we want it. But there is still
something wrong with the shadows. View live shadows are typically not as sharp
as what we see here. Now we have enabled soft shadows. This looks much more
realistic. Perfectly sharp shadows come from assuming the light sources
infinite this small. In real life, light sources have size. And by taking it in
consideration, we get a soft shadow border. This shadow border separates the
shadow into two parts. We call the completely shadowed area the umbra. And the
soft part with the gradient the penumbra. The penumbra happens in regions of
the surface where the light source is being partially occluded. Also note how
the penumbra has been small when the lit point is close to the occluder, and
large when it's farther away. This wraps up the part about shadowing. Thanks
for your attention
ここでは影について見ていきます
これは私が作った平行光源で照らされた環境です
このように通常のレンダリングをする際は
付影処理は行われません
ライトがシーンの奥にある屋根の下に漏れています
では影をつけてみましょう
これでシーンに適切な影がつけられました
先ほどまで不正確に照らされていた部分が
暗くなりました
これはライトとオブジェクトの間に何かがある場合
ライトを無効にする設定をしているからです
ライトを回転させることで
影をつけたい場所につけられます
しかしまだこの影には不自然なところがあります
実際の影は通常こんなに輪郭がはっきりしていません
そこで影を柔らかくするためにぼかします
これでよりリアルになりました
輪郭がはっきりした影は
ライトが無限小だと仮定するために起こります
現実では光源には大きさがあります
それを考慮して影の境界を柔らかくします
この境界が影を2つの部分に分けます
完全に影になる部分を本影と呼び
グラデーションのある柔らかい部分を半影と呼びます
半影は光源が一部遮られた表面において起こります
半影は照らされた場所が
遮へい物に近い場合に小さくなり
遠い場合には大きくなります
影については以上です
這一節我們看的是影子
我搭建了簡單的環境,由定向光照亮
進行簡單的圖學繪圖時,像是我現在做的,通常不支援影子
我們可以看到後面小屋頂下方有漏光
現在加入影子
我們看到場景現在有影子了
先前不正常發亮的區域現在是暗的
因為如果幾何跟光源間有東西,我們就關掉光的效果
旋轉光能改變影子的位置
但這影子還是有問題
真實的影子通常不會像我們看到的這麼銳利
現在我們開啟 Soft Shadow
看起來真實多了
銳利的影子來自假設光源無窮小
真實世界裡光源有大小
考量到這點,我們會得到柔和的陰影邊緣
這個邊緣將影子分為兩區
我們稱完全在影子的區域叫全影
柔和有漸層的區域叫半影
半影發生在光源被部分遮擋的表面區域
同時注意到當光源接近時半影區小,遠的時候半影區會變大
這就是我們影子的介紹,感謝收聽