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
yumcyawiz
June 03, 2018
Programming
0
720
Classical Ray Tracing
yumcyawiz
June 03, 2018
Tweet
Share
More Decks by yumcyawiz
See All by yumcyawiz
rtcamp 10 (vk-illuminati)
yumcyawiz
1
390
ReSTIRの数理と実装 (rtcamp10)
yumcyawiz
1
1.3k
fredholm(rtcamp9)
yumcyawiz
0
120
フォトンマッピングをパス空間から考える
yumcyawiz
0
450
fredholm
yumcyawiz
0
290
Introduction to volume rendering
yumcyawiz
0
2.4k
OSK#p-ray2020年度講義: 古典的レイトレーサーの実装
yumcyawiz
0
280
Ray Tracing: Overview
yumcyawiz
7
1.3k
GLSLでパストレーシングしてコーネルボックスを出す
yumcyawiz
0
550
Other Decks in Programming
See All in Programming
サイトを作ったらNFCタグキーホルダーを爆速で作れ!
yuukis
0
530
為你自己學 Python - 冷知識篇
eddie
1
230
ワープロって実は計算機で
pepepper
2
1.4k
MLH State of the League: 2026 Season
theycallmeswift
0
160
AIでLINEスタンプを作ってみた
eycjur
1
200
testingを眺める
matumoto
1
110
ゲームの物理
fadis
5
1.5k
管你要 trace 什麼、bpftrace 用下去就對了 — COSCUP 2025
shunghsiyu
0
470
AI OCR API on Lambdaを Datadogで可視化してみた
nealle
0
180
Jakarta EE Core Profile and Helidon - Speed, Simplicity, and AI Integration
ivargrimstad
0
210
Understanding Ruby Grammar Through Conflicts
yui_knk
1
140
CSC305 Summer Lecture 12
javiergs
PRO
0
130
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Speed Design
sergeychernyshev
32
1.1k
Documentation Writing (for coders)
carmenintech
73
5k
Building an army of robots
kneath
306
46k
Mobile First: as difficult as doing things right
swwweet
223
9.9k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Navigating Team Friction
lara
189
15k
It's Worth the Effort
3n
187
28k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Making the Leap to Tech Lead
cromwellryan
134
9.5k
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の流れ