lightmassの仕組み ~precomputed light volume編~ (epic games japan: 篠山範明)
TRANSCRIPT
![Page 1: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/1.jpg)
Lightmass Deep Divevol.2 Precomputed Light Volume編
篠山 範明Epic Games Japan
Senior Support Engineer
![Page 2: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/2.jpg)
Lightmass が出力するデータ
LightMap
ShadowMap
PrecomputedLight
Volume
![Page 3: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/3.jpg)
Precomputed Light Volume
![Page 4: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/4.jpg)
Precomputed Light Volume とは?
• 空間上に分布されたライティング情報• Lightmass で作成される。• Movable なメッシュのライティングに使われる。
![Page 5: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/5.jpg)
ViewのメニューでDebug表示できます。
![Page 6: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/6.jpg)
Precomputed Light Volume の…・使われ方・作られ方
の二点を見ていこうと思います。
![Page 7: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/7.jpg)
Indirect Lighting CachePLV の使われ方
![Page 8: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/8.jpg)
Movable Mesh のライティングは二種類
![Page 9: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/9.jpg)
Movable Mesh のライティングは二種類
Direct Lighting By Movable Light
![Page 10: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/10.jpg)
Movable Mesh のライティングは二種類PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
Direct Lighting By Movable Light
Indirect LightingBy PLVs
![Page 11: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/11.jpg)
周りの PLV からどのようにライティングを見積もるか?
Indirect LightingBy PLVs
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
![Page 12: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/12.jpg)
Indirect Lighting Cache
Indirect LightingBy PLVs
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
ILC
![Page 13: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/13.jpg)
Indirect Lighting Cache
Indirect LightingBy PLVs
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
ILC
Movable なメッシュは、ILC というデータをそれぞれ持つ
ランタイム上で、近くの PLV から自身の ILC を見積もりライティングを計算する。
![Page 14: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/14.jpg)
ILC 系調整、デバッグコマンド
r.Cache.XXXXXXというコマンドで調整できます。
![Page 15: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/15.jpg)
ILC Sampling の表示
• r.Cache.UpdateEveryFrame 1• r.Cache.DrawInterpolationPoints 1
• 毎フレーム Update してしまうので、デバッグ表示あとは必ず Off にするのをお忘れなく。
![Page 16: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/16.jpg)
二つのサンプリング方法
ILCQ_ Point ILCQ_Volume
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
ILC ILC
ILC
ILC
ILC
ILC
ILC
ILC
ILC
ILC
![Page 17: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/17.jpg)
二つのサンプリング方法
![Page 18: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/18.jpg)
主な違いは、体積を考慮するかしないか。
![Page 19: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/19.jpg)
ILCQ_Point
ILCQ_ Point
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
ILC
ILCQ Point
データ BB の中心一点レンダリング メッシュの大きさを
考慮しない
コスト 比較的軽い問題点 ???
![Page 20: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/20.jpg)
ILCQ Point の問題点
ゆっくり動くとパカパカします。(demo)
![Page 21: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/21.jpg)
予備 gif
![Page 22: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/22.jpg)
原因を調べます。。
![Page 23: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/23.jpg)
ILCQ Point の問題点
毎フレームの更新を避けるため、参照点がスナップされているからです。(demo)
![Page 24: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/24.jpg)
予備 gif
![Page 25: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/25.jpg)
ILCQ Point の問題点
サンプリングポイントのスナップによりパカつきが目立つ。(ILCQ_Volumeもスナップするけど、あまり目立たない )
![Page 26: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/26.jpg)
ILCQ Point の問題点
試しに、参照しないように修正してみました(demo)
![Page 27: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/27.jpg)
予備 gif
![Page 28: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/28.jpg)
予備 gif
![Page 29: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/29.jpg)
ILCQ Point の問題点
なおった!
![Page 30: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/30.jpg)
ILCQ Point の問題点
しかし、この処理は毎フレームの ILCの更新を招くため、CPU負荷を招く可能性があります。
プロファイルしてから採用を検討します。
![Page 31: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/31.jpg)
ILCQ_Point
ILCQ_ Point
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
ILC
ILCQ Point
データ BB の中心一点レンダリング メッシュの大きさを
考慮しない
コスト 比較的軽い問題点 パカパカする
![Page 32: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/32.jpg)
ILCQ_Volume
ILCQ_Volume
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
ILC
ILC
ILC
ILC
ILC
ILC
ILC
ILC
ILC
![Page 33: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/33.jpg)
ILCQ_Volume
ILCQ_Volume
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
ILC
ILC
ILC
ILC
ILC
ILC
ILC
ILC
ILC
ILCQ Volume
データ BB 上のグリッド上に配置 (5*5*5)
レンダリング メッシュの大きさを考慮する
コスト Point に比べ CPU/GPU 共に高コスト
問題点 ???
![Page 34: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/34.jpg)
ILCQ_Volume の問題点
demo
![Page 35: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/35.jpg)
ILCQ_Volume の問題点
ILC更新の CPUコスト。。。
![Page 36: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/36.jpg)
ILCQ_Volume の問題点
キューブを巨大にしたらその分負荷も増える。
![Page 37: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/37.jpg)
ILCQ Volume の問題点
Volumeの中に入ってる PLVがあればあるほど、CPUコストが増えます。
非常に大きなオブジェクトへの適用は慎重に。。
![Page 38: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/38.jpg)
ILCQ_Volume
ILCQ_Volume
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
ILC
ILC
ILC
ILC
ILC
ILC
ILC
ILC
ILC
ILCQ Volume
データ BB 上のグリッド上に配置 (5*5*5)
レンダリング メッシュの大きさを考慮する
コスト Point に比べ CPU/GPU 共に高コスト
問題点 大きいと高コスト
![Page 39: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/39.jpg)
二つのサンプリング方法PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
ILC ILC
ILC
ILC
ILC
ILC
ILC
ILC
ILC
ILC
![Page 40: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/40.jpg)
二つのサンプリング方法PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
ILC ILC
ILC
ILC
ILC
ILC
ILC
ILC
ILC
ILC
ILCQ Point ILCQ_Volumeデータ BB の中心一点 BB 上のグリッド上に配置レンダリング メッシュの大きさを考慮し
ないメッシュの大きさを考慮する
コスト 比較的軽い Point に比べ CPU/GPU 共に高コスト
問題点 ゆっくり動くとパカパカ 大きいと高コスト
![Page 41: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/41.jpg)
おまけ : Smooth Transition• 早く動くと補完される。r.Cache.SampleTransitionSpeed(default: 800)
Demo…
![Page 42: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/42.jpg)
PLV の使われ方 ~Indirect Lighting Cache~ まとめ• Movable なオブジェクトは PLV から ILC を作成し、動的にレンダリングします。• ILC には Point と Volume があります。• それらの特徴を理解して、プロファイルして、どちらを使うか見極めましょう
![Page 43: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/43.jpg)
しかし。。。そもそも PLV がダメだったらどんなサンプリングしてもだめ。
ノイズだらけ 配置がおかしい
![Page 44: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/44.jpg)
PLV の作り方データ計算方法と配置方法
![Page 45: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/45.jpg)
PLV のデータ
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
PLV
一つの PLVが 3バンドの SHです(SH = Spherical Harmonics)
![Page 46: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/46.jpg)
PLV のデータ
一つの PLVが 3バンドの SHです(SH = Spherical Harmonics)
デバッグ表示では一色ですが。。。
PLV
![Page 47: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/47.jpg)
PLV のデータ
一つの PLVが 3バンドの SHです(SH = Spherical Harmonics)
デバッグ表示では一色ですが。。。
方向性があります。
PLV
画像参考例 : http://www.banterle.com/francesco/projects/BantyToolkit/tk_diffuse.jpg
![Page 48: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/48.jpg)
PLV のデータ
一つの PLVが 3バンドの SHです(SH = Spherical Harmonics)
デバッグ表示では一色ですが。。。
方向性があります。
このデータを周りから作成する必要があります。
PLV
画像参考例 : http://www.banterle.com/francesco/projects/BantyToolkit/tk_diffuse.jpg
![Page 49: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/49.jpg)
一つ一つの PLV がどのように作られているか?
PLV
![Page 50: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/50.jpg)
一つ一つの PLV がどのように作られているか?
PLV
![Page 51: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/51.jpg)
上半分と下半分に分けて別々に。。。Lightmap と同様の計算をします。
PLV
![Page 52: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/52.jpg)
直接光を計算し
PLV
![Page 53: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/53.jpg)
Final Gathering!!
PLV
![Page 54: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/54.jpg)
下半分も同様です。直接光 + FG
PLV
![Page 55: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/55.jpg)
その二つを合算し、 PLV を作成します。
PLV
![Page 56: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/56.jpg)
ただし、実は問題があります。
PLV
![Page 57: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/57.jpg)
Final GatheringがAdaptive Samplingしない問題
![Page 58: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/58.jpg)
Final Gathering Adaptive Sampling
Lightmap Texel
![Page 59: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/59.jpg)
Final Gathering Adaptive Sampling1 レイを半休上全体に飛ばして、飛ばした先からの Photon や Skylight を見積もる
本来は何十本も。。
![Page 60: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/60.jpg)
Final Gathering Adaptive Sampling2 となりあったレイから受け取るエネルギーの差が大きい場合は。。。
![Page 61: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/61.jpg)
Final Gathering Adaptive Sampling3. 再分割して詳細を見る
![Page 62: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/62.jpg)
Final Gathering Adaptive Sampling4. 繰り返す。輝度差が閾値より低くなる、または最大分割数まで分割したらサンプリング終了。
![Page 63: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/63.jpg)
「 PLV 作成の」 Final Gathering のとき、この再分割 (Adaptive Sampling) を行いません。
PLV
![Page 64: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/64.jpg)
なので、現在の UE4 では、Lightmass Portal の効果は PLV には出ません。
PLV
Portal
![Page 65: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/65.jpg)
結果どうなるか。。。。
![Page 66: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/66.jpg)
結果どうなるか。。。。ノイズが多い。。
![Page 67: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/67.jpg)
試しに、再分割 (Adaptive Sampling)できるようにしてみました。
PLV
![Page 68: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/68.jpg)
ノイズが取れました。
![Page 69: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/69.jpg)
比べると一目瞭然です
![Page 70: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/70.jpg)
UE4.13をめどに、PLV作成もAdaptive Samplingになります。
ノイズが減りますが、ビルド時間が若干増えます
![Page 71: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/71.jpg)
PLV の作り方データ計算方法と配置方法
![Page 72: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/72.jpg)
失敗例
こんなにいらない 相対的におかしい
絵作りだけじゃなく、メモリ量、ビルド時間にも影響
![Page 73: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/73.jpg)
PLV の配置アルゴリズム
PLV の配置方法は三つが順番で行われます。
Surface Light
Sample
DetailVolumeSample
UniformVolumeSample
![Page 74: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/74.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
Surface Light Sample からはじめます
![Page 75: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/75.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
各ポリゴン単位で処理が行われます。
![Page 76: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/76.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
各ポリゴン、の法線を見て。。。上向きだったら。。
![Page 77: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/77.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
その表面に、数段の PLV を作成します。
![Page 78: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/78.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
こいつらです。
![Page 79: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/79.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
ここにもできます。
![Page 80: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/80.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
FirstSurfaceSampleLayerHeight(Default = 50)
SurfaceSampleLayerHeightSpacing(Default = 250)
.ini で細かくパラメータ調整できます。
何段つくる?NumSurfaceSampleLayers(Default = 2)SurfaceSampleLayer
HeightSpacing(Default = 250)
![Page 81: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/81.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
Detail Volume Sample…
![Page 82: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/82.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
Lightmass Character Indirect Detail Volumeで括った領域に PLV を作成します。
![Page 83: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/83.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
Lightmass Character Indirect Detail Volumeで括った領域に PLV を作成します。
![Page 84: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/84.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
こいつら
![Page 85: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/85.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
.ini で間隔が調整できます。
DetailVolumeSampleSpacing(Default = 300)
![Page 86: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/86.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
Uniform Volume Sample
![Page 87: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/87.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
Lightmass Importance Sample で囲った全体で PLV を作成します。
![Page 88: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/88.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
最初のテストシーンではでてこない。。
![Page 89: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/89.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
Default がめっちゃでかい!
VolumeLightSampleSpacing(Default = 3000)
![Page 90: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/90.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
シーンが小さすぎた。
![Page 91: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/91.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
90m Cube にしたら出てきた。 (30m 置き )
![Page 92: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/92.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
下は Surface Light Sample で感覚は 3m 置きです。
![Page 93: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/93.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
嫌な不釣り合いですね。。
![Page 94: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/94.jpg)
PLV の配置アルゴリズム
PLV の配置方法は三つが順番で行われます。
Surface Light
Sample
DetailVolumeSample
UniformVolumeSample
![Page 95: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/95.jpg)
PLV の配置アルゴリズム
ちなみに、各フェイズで PLV を作ろうとしたとき、近くにすでに作られていたら、その作成をスキップします。
Surface Light
Sample
DetailVolumeSample
UniformVolumeSample
![Page 96: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/96.jpg)
PLV の配置アルゴリズム
ちなみに、各フェイズで PLV を作ろうとしたとき、近くにすでに作られていたら、その作成をスキップします。
Surface Light
Sample
DetailVolumeSample
UniformVolumeSample
![Page 97: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/97.jpg)
PLVの配置設定方法
![Page 98: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/98.jpg)
PLV の配置方法
既に説明した二つのボリューム以外に、実は二つしかありません。
Volume
・・・・・
![Page 99: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/99.jpg)
Static Lighting Level Scale (SLLS)
Static Lighting Leve Scale (SLLS) = 1.0
ライトマス全体のWorld Gridのスケーリング
![Page 100: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/100.jpg)
Static Lighting Level Scale (SLLS)
Static Lighting Leve Scale (SLLS) = 0.1
ライトマス全体のWorld Gridのスケーリング
![Page 101: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/101.jpg)
PLV増やしたいけど。。。 SLLS変えると、他のライトマスのパラメータにも影響しちゃうな。。。
![Page 102: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/102.jpg)
World Settings: Static Lighting Level Scale
Photon mapping
Final Gathering
IrradianceCaching
Direct Lighting
(Shadowing)影用レイの数 Photonの放出量
最大バウンス回数 レイの数 キャッシングの半径
Lightmass 内部の World Grid.どれぐらいスケールするかを設定する。小さくすればするほどビルド時間が激増します。
![Page 103: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/103.jpg)
World Settings: Static Lighting Level Scale
SLLS = 1.5 SLLS = 0.5SLLS を変えることで、例えば、 Irradiance Cache の半径が小さくなりサンプルが増えます。が、それだけビルド時間が増えます。
![Page 104: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/104.jpg)
PLV増やしたいけど。。。 SLLS変えると、他のライトマスのパラメータにも影響しちゃうな。。。
![Page 105: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/105.jpg)
Volume Light Sample Replacement Scale
PLVの配置専用のスケーリングパラメータStatic Lighting Leve Scale (SLLS) は
Lightmass全体の処理に影響するが、こちらは単独したスケーリングが可能
![Page 106: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/106.jpg)
Volume Light Sample Replacement Scale
PLVの配置専用のスケーリングパラメータStatic Lighting Leve Scale (SLLS) は
Lightmass全体の処理に影響するが、こちらは単独したスケーリングが可能
。。。。。と思ったら。。。
![Page 107: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/107.jpg)
Volume Light Sample Replacement Scale
Volume Light Sample Replacement Scale = 0.1
![Page 108: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/108.jpg)
Static Lighting Level Scale (SLLS)
Static Lighting Leve Scale (SLLS) = 0.1
![Page 109: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/109.jpg)
Volume Light Sample Replacement Scale
VLSRS = 0.1SLLS = 0.1ちがうじゃん!
![Page 110: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/110.jpg)
Volume Light Sample Replacement Scale
このパラメータは。。SurfaceLightSampleSpacing,VolumeLightSampleSpacing,DetailVolumeSampleSpacing
各フェイズの SampleSpacingをスケールするだけです。
Surface Light
Sample
DetailVolumeSample
UniformVolumeSample
![Page 111: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/111.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
ここだけ影響しない!!
![Page 112: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/112.jpg)
Volume Light Sample Replacement Scale
VLSRS = 0.1SLLS = 0.1高さだけが違う
![Page 113: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/113.jpg)
PLV の配置方法
エディタでできるスケーリングでした。。
Volume
・・・・・
![Page 114: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/114.jpg)
PLV の配置方法
ということで、エディタでできるのは、重要なところを囲む全体をスケーリングさせるの二つしかできません。
![Page 115: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/115.jpg)
PLV の配置方法
あなたのプロジェクトにDefaultLightmass.iniを追加するときが来ました!!
![Page 116: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/116.jpg)
PLV の配置方法
パラメータの意味はスライドに入れておきました
![Page 117: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/117.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
FirstSurfaceSampleLayerHeight(Default = 50)
SurfaceSampleLayerHeightSpacing(Default = 250)
.ini のパラメータ
何段つくる?NumSurfaceSampleLayers(Default = 2)SurfaceSampleLayer
HeightSpacing(Default = 250)
![Page 118: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/118.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
.ini のパラメータ
DetailVolumeSampleSpacing(Default = 300)
![Page 119: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/119.jpg)
Surface
Light Sampl
e
DetailVolum
eSampl
e
Uniform
Volume
Sample
.ini のパラメータ
VolumeLightSampleSpacing(Default = 3000)
![Page 120: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/120.jpg)
PLV の配置方法
[DevOpitions.PrecomputedDynamicObjectLighting]と記載して必要なパラメータをオーバーライドしてみてください。
![Page 121: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/121.jpg)
Precomputed Light Volume
![Page 122: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/122.jpg)
まとめ
Precomputed Light VolumeとIndirect Lighting Cacheはセットです。
シビアに調整したい場合は、二つの特性を理解し、最適な手法を模索しましょう。
![Page 123: Lightmassの仕組み ~Precomputed Light Volume編~ (Epic Games Japan: 篠山範明)](https://reader030.vdocuments.net/reader030/viewer/2022012914/58f9ad78760da3da068b9897/html5/thumbnails/123.jpg)
•斎藤さんへ GO!