Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Classical Ray Tracing
yumcyawiz
June 03, 2018
Programming
0
630
Classical Ray Tracing
yumcyawiz
June 03, 2018
Tweet
Share
More Decks by yumcyawiz
See All by yumcyawiz
fredholm
yumcyawiz
0
20
Introduction to volume rendering
yumcyawiz
0
800
OSK#p-ray2020年度講義: 古典的レイトレーサーの実装
yumcyawiz
0
180
Ray Tracing: Overview
yumcyawiz
6
1k
GLSLでパストレーシングしてコーネルボックスを出す
yumcyawiz
0
210
Pybind11でC++とPythonのいいとこ取りをする
yumcyawiz
0
350
Path Tracing in 5 minutes
yumcyawiz
1
220
Lens Tracing
yumcyawiz
0
69
Photorealism - rtcamp7
yumcyawiz
0
43
Other Decks in Programming
See All in Programming
まだ日本国内で利用できないAppActionsにトライしてみた / MoT TechTalk #15
mot_techtalk
0
110
新卒でサービス立ち上げから Hasuraを使って3年経った振り返り
yutorin
0
220
OSC大阪 パスワード認証は人類には早すぎる ~ IDaaSを使ったソーシャルログインのすすめ ~
authyasan
7
1.4k
TokyoR#103_DataProcessing
kilometer
0
530
Functional Data Engineering - A Blueprint for adopting functional principles in data pipeline
vananth22
0
180
2023年にクル(かもしれない)通信ミドルウェア技術(仮)
s_hosoai
0
200
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
2
42k
ペパカレで入社した私が感じた2つのギャップと向き合い方
kosuke_ito
0
260
Swift Expression Macros: a practical introduction
kishikawakatsumi
2
720
Rによる大規模データの処理
s_uryu
2
630
量子コンピュータ時代のプログラミングセミナー / 20230119_Amplify_seminar _shift_optimization
fixstars
0
190
Rust、何もわからない...#6発表資料
ryu19
0
120
Featured
See All Featured
The Invisible Customer
myddelton
113
12k
Design by the Numbers
sachag
271
18k
Six Lessons from altMBA
skipperchong
15
2.3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
227
16k
Automating Front-end Workflow
addyosmani
1351
200k
BBQ
matthewcrist
75
8.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
217
21k
How To Stay Up To Date on Web Technology
chriscoyier
779
250k
Adopting Sorbet at Scale
ufuk
65
7.8k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
109
16k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
182
15k
Designing the Hi-DPI Web
ddemaree
273
32k
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の流れ