Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
レイトレーシング入門
Search
Shirotsu
November 03, 2018
410
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
レイトレーシング入門
2018 秋の会津大LTで話させていただいたトピックです。
Shirotsu
November 03, 2018
Transcript
29 slides
レイトレーシング 入門してみた by Shirotsu
佐藤利音 s1250010 HN : Shirotsu Twitter @4rotsugd Github @Nao-Shirotsu 自己紹介
レイトレーシング レンダリング手法の一つ
やろうと思ったきっかけ
CGって実際何を どうやってるんだ...? Shirotsu
色々あって... こういうの あるよ パストレ 強い人
パストレーシング レイトレーシングから派生した 1つのレンダリング手法 基本的な考え方は一緒......らしい
コーネルボックス CG界のHello World ? これの描画に挑戦 プリレンダリング
大体の流れ
光源 光線(Ray)の反射 「光源からの光が物体に 反射して目に入ってくる」 という現実の考え方を再現
光源 光線(Ray)の反射 カメラから逆に 光の軌跡を追跡
光源 光線(Ray)の反射 全ての点からの 光を計算する
光源 光線(Ray)の反射 スクリーン これが画像として 出力される
光線(Ray)の反射 現実 無数の反射した光線が 光源から目に届いている コンピュータ 無数はムリ!!
光線(Ray)の反射 無数が無理なら... ランダムに光線を 反射させてデータを 集めてしまえ!
光線(Ray)の反射 無数が無理なら... ランダムに光線を 反射させてデータを 集めてしまえ! パストレーシング
パストレーシング 光源 A B C カメラから発したRayが 何かと交差したとき、 その交点から新しく複数のRayを ランダムな方向に飛ばす
パストレーシング 光源 A B C 新しいRayたちの平均を取って... また交差したら平均を取って... 繰り返し Average Ray
= ( A + B + C ) / 3
パストレーシング 光源 A B C 実は割と嘘ですが大体合ってるはず... 説明が下手なので許してください
改めてコーネルボックス • Rayは直線で表現できる • 球と直線の交差判定は簡単 (高校数学) というわけでこんな感じです
コーネルボックス x y 球 球 球 球 光源
コーネルボックス z y 球 球 球 球 球 光源
コード
コード
結果...... 正面 別アングル
結構粗い Rayはランダムに反射 -> サンプリング回数を増やさないと綺麗にならない これのレンダリングに 3時間かかりました;;
一応GitHubに置いておきました https://github.com/Nao-Shirotsu/PathTracing_CornellBoxRenderer C++コンパイラだけで実行できるので よかったら試してみてください
振り返り • 光の物理量の計算がしんどかった -> 計算式を理解するのが辛い(数学アレルギー) • GoogleTestでTDDっぽい開発をやってみた -> いつもより明らかにバグが少なくて楽
ありがとうございました by Shirotsu ID : 10006
Featured
See All Featured
Scaling GitHub
holman
464
140k
Side Projects
sachag
456
43k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
600
Designing for Timeless Needs
cassininazir
1
570
Ethics towards AI in product and experience design
skipperchong
2
470
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
550
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
310
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
490