$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Classical Ray Tracing
Search
yumcyawiz
June 03, 2018
Programming
0
730
Classical Ray Tracing
yumcyawiz
June 03, 2018
Tweet
Share
More Decks by yumcyawiz
See All by yumcyawiz
rtcamp 10 (vk-illuminati)
yumcyawiz
1
470
ReSTIRの数理と実装 (rtcamp10)
yumcyawiz
1
1.6k
fredholm(rtcamp9)
yumcyawiz
0
140
フォトンマッピングをパス空間から考える
yumcyawiz
0
490
fredholm
yumcyawiz
0
310
Introduction to volume rendering
yumcyawiz
0
2.5k
OSK#p-ray2020年度講義: 古典的レイトレーサーの実装
yumcyawiz
0
290
Ray Tracing: Overview
yumcyawiz
7
1.3k
GLSLでパストレーシングしてコーネルボックスを出す
yumcyawiz
0
570
Other Decks in Programming
See All in Programming
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.2k
愛される翻訳の秘訣
kishikawakatsumi
3
330
Cell-Based Architecture
larchanjo
0
140
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
440
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.3k
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
8
2.5k
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
0
190
Jetpack XR SDKから紐解くAndroid XR開発と技術選定のヒント / about-androidxr-and-jetpack-xr-sdk
drumath2237
1
160
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
510
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
140
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
280
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
4
900
Featured
See All Featured
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
47
33k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
57
37k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
0
220
SEO for Brand Visibility & Recognition
aleyda
0
4.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Skip the Path - Find Your Career Trail
mkilby
0
23
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
67
GitHub's CSS Performance
jonrohan
1032
470k
Between Models and Reality
mayunak
0
150
Transcript
RAY TRACING 古典的レイトレーサーからはじめるレイトレーシング
古典的レイトレーシング(CLASSICAL RAY TRACING) • コンピューターグラフィクス黎明期に流行ったもの
古典的レイトレーシング(CLASSICAL RAY TRACING) • コンピューターグラフィクス黎明期に流行ったもの • 物理的に正しくはないが、陰影計算ができる
None
CG感半端ないけどちゃんと影ついてる
古典的レイトレーシング(CLASSICAL RAY TRACING) • コンピューターグラフィクス黎明期に流行ったもの • 物理的に正しくはないが、陰影計算ができる • はじめてのレイトレに最適
古典的レイトレーシング(CLASSICAL RAY TRACING) • コンピューターグラフィクス黎明期に流行ったもの • 物理的に正しくはないが、陰影計算ができる • はじめてのレイトレに最適 これからみんなに作ってもらいます
CLASSICAL RAY TRACER構造図
VEC3クラス • 3次元ベクトルを表すクラス • 四則演算、内積、外積なども定義されている Ԧ +
RAYクラス • Rayを表す Ԧ Ԧ Ԧ + Ԧ
HITクラス • 衝突情報を格納するクラス • 衝突距離、衝突位置、法線などの情報を持つ Sphere Ray
IMAGEクラス • 画像データを格納し、PPM画像として出力する機能を持つ • 指定した画素に色を書き込む機能を持つ
(, ) 画像の座標系(10*8の場合) (0, 0) (10, 8) 10 8
CAMERAクラス • 画素 , に対応するRayを返す機能を持つ (, ) Ray
ピンホールカメラ ピンホール カメラセンサー
SHAPEクラス • 物体の形を表すクラス • 与えられたRayとの衝突計算を行う Sphere Ray
MATERIALクラス • 物体の材質を表すクラス • Diffuse(マットな面), Mirror(鏡面), Glass(ガラス)の3つを用意する • 受け取ったRayを反射させる機能を持つ Sphere
Ray
PRIMITIVEクラス • ShapeとMaterialをデータとして持つクラス • シーンの中の物体はすべてPrimitiveで記述される
ACCELクラス • 物体集合を管理するクラス • すべての物体と衝突計算を行う機能を持つ
ray = cam->getRay(i, j) accel->intersect(ray, hit) hitの中身によって画素に色を書き 込む Ray Tracingの流れ