Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Classical Ray Tracing
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
yumcyawiz
June 03, 2018
Programming
750
0
Share
Classical Ray Tracing
yumcyawiz
June 03, 2018
More Decks by yumcyawiz
See All by yumcyawiz
rtcamp 10 (vk-illuminati)
yumcyawiz
1
530
ReSTIRの数理と実装 (rtcamp10)
yumcyawiz
1
1.8k
fredholm(rtcamp9)
yumcyawiz
0
160
フォトンマッピングをパス空間から考える
yumcyawiz
0
530
fredholm
yumcyawiz
0
330
Introduction to volume rendering
yumcyawiz
0
2.7k
OSK#p-ray2020年度講義: 古典的レイトレーサーの実装
yumcyawiz
0
300
Ray Tracing: Overview
yumcyawiz
7
1.3k
GLSLでパストレーシングしてコーネルボックスを出す
yumcyawiz
0
600
Other Decks in Programming
See All in Programming
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
200
AI-DLC Deep Dive
yuukiyo
9
5.6k
JAWS-UG横浜 #100 祝・第100回スペシャルAWS は VPC レスの時代へ
maroon1st
0
220
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
660
Structured Concurrency, Scoped Values and Joiners in the JDK 25 26 27
josepaumard
1
150
My daily life on Ruby
a_matsuda
3
190
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
340
Building on Bluesky's AT Protocol with Ruby
mackuba
0
110
AI時代になぜ書くのか
mutsumix
0
270
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
480
10 Tips of AWS ~Gen AI on AWS~
licux
5
540
Liberating Ruby's Parser from Lexer Hacks
ydah
2
2.6k
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
180
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.7k
The Invisible Side of Design
smashingmag
302
52k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
180
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
Visualization
eitanlees
150
17k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
500
Darren the Foodie - Storyboard
khoart
PRO
3
3.3k
My Coaching Mixtape
mlcsv
0
120
Designing for Performance
lara
611
70k
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の流れ