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
750
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Classical Ray Tracing
yumcyawiz
June 03, 2018
More Decks by yumcyawiz
See All by yumcyawiz
rtcamp 10 (vk-illuminati)
yumcyawiz
1
540
ReSTIRの数理と実装 (rtcamp10)
yumcyawiz
1
1.9k
fredholm(rtcamp9)
yumcyawiz
0
170
フォトンマッピングをパス空間から考える
yumcyawiz
0
540
fredholm
yumcyawiz
0
340
Introduction to volume rendering
yumcyawiz
0
2.7k
OSK#p-ray2020年度講義: 古典的レイトレーサーの実装
yumcyawiz
0
300
Ray Tracing: Overview
yumcyawiz
7
1.3k
GLSLでパストレーシングしてコーネルボックスを出す
yumcyawiz
0
610
Other Decks in Programming
See All in Programming
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
160
Claspは野良GASの夢をみるか
takter00
0
180
ふつうのFeature Flag実践入門
irof
7
3.7k
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
5.2k
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
Lessons from Spec-Driven Development
simas
PRO
0
150
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
4.9k
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
200
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
740
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
AI時代のUIはどこへ行く?その2!
yusukebe
20
7k
CSC307 Lecture 17
javiergs
PRO
0
320
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
77
5.4k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
390
ラッコキーワード サービス紹介資料
rakko
1
3.6M
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
420
Practical Orchestrator
shlominoach
191
11k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Why Our Code Smells
bkeepers
PRO
340
58k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
My Coaching Mixtape
mlcsv
0
140
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
830
The Invisible Side of Design
smashingmag
302
52k
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の流れ