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
680
Classical Ray Tracing
yumcyawiz
June 03, 2018
Tweet
Share
More Decks by yumcyawiz
See All by yumcyawiz
fredholm(rtcamp9)
yumcyawiz
0
84
フォトンマッピングをパス空間から考える
yumcyawiz
0
320
fredholm
yumcyawiz
0
210
Introduction to volume rendering
yumcyawiz
0
1.8k
OSK#p-ray2020年度講義: 古典的レイトレーサーの実装
yumcyawiz
0
240
Ray Tracing: Overview
yumcyawiz
7
1.2k
GLSLでパストレーシングしてコーネルボックスを出す
yumcyawiz
0
390
Pybind11でC++とPythonのいいとこ取りをする
yumcyawiz
0
830
Path Tracing in 5 minutes
yumcyawiz
1
300
Other Decks in Programming
See All in Programming
Patched fetch did not work
quramy
4
380
What is Parser
yui_knk
9
4.1k
私のEbitengineの第一歩
qt_luigi
0
450
The Shape of a Service Object
inem
0
520
Perl 5 OOP機構30年史 - Perl 5's OOP Mechanism over the past 30 years
moznion
0
250
はじめてみよう量子プログラミング
itokoichi01
0
210
『ドメイン駆動設計をはじめよう』中核の業務領域
masuda220
PRO
5
990
Modular Monolith Go Server with GraphQL Federation + gRPC
110y
1
580
How to Break into Reading Open Source
kaspth
2
210
Shinjuku.rb#95:心の技術書紹介
free_world21
1
110
Kotlin 2.0が与えるAndroid開発の進化
masayukisuda
1
410
状態管理ライブラリZustandの導入から運用まで
k1tikurisu
3
470
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
32k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
29
2.6k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
123
18k
Bash Introduction
62gerente
608
210k
Scaling GitHub
holman
458
140k
4 Signs Your Business is Dying
shpigford
179
21k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.4k
The Invisible Side of Design
smashingmag
295
50k
Making Projects Easy
brettharned
113
5.8k
Faster Mobile Websites
deanohume
304
30k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
230
17k
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の流れ