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
740
Classical Ray Tracing
yumcyawiz
June 03, 2018
Tweet
Share
More Decks by yumcyawiz
See All by yumcyawiz
rtcamp 10 (vk-illuminati)
yumcyawiz
1
510
ReSTIRの数理と実装 (rtcamp10)
yumcyawiz
1
1.7k
fredholm(rtcamp9)
yumcyawiz
0
160
フォトンマッピングをパス空間から考える
yumcyawiz
0
520
fredholm
yumcyawiz
0
330
Introduction to volume rendering
yumcyawiz
0
2.6k
OSK#p-ray2020年度講義: 古典的レイトレーサーの実装
yumcyawiz
0
290
Ray Tracing: Overview
yumcyawiz
7
1.3k
GLSLでパストレーシングしてコーネルボックスを出す
yumcyawiz
0
590
Other Decks in Programming
See All in Programming
Ruby x Terminal
a_matsuda
7
590
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
260
How to stabilize UI tests using XCTest
akkeylab
0
110
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
820
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
340
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
140
Ruby and LLM Ecosystem 2nd
koic
1
550
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
700
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
170
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1k
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
5
390
「抽象に依存せよ」が分からなかった新卒1年目の私が Goのインターフェースと和解するまで
kurogenki
0
110
Featured
See All Featured
KATA
mclloyd
PRO
35
15k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Git: the NoSQL Database
bkeepers
PRO
432
66k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.4k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
110
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
Exploring anti-patterns in Rails
aemeredith
2
290
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
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の流れ