SlideShare a Scribd company logo
1 of 54
실시간 레이트레이싱과 게임의 미래실시간 레이트레이싱과 게임의 미래
김성완
Ray Tracing 의 과거
• [1968] Arthur Appel
– “Some techniques for shading machine renderings of
solids”
– Basic ray casting with shadows
• [1980] Turnur Whitted
– “An Improved Illumination Model for Shaded Display”
• Reflection
• Refraction
• Shadows
• Hidden Surface Removal
• [1984] Lucas Film
• [1986] Eric Graham, Amiga
[1980] First Ray tracing
[1984] Lucas film
[1986] Amiga Sculpt3d
Ray Tracing 의 현재
• POV-Ray
– Persistence of Vision Raytracer
– Freeware multi-platform ray-tracing
package.
– http://www.povray.org/
POV-Ray Hall of Fame
POV-Ray Hall of Fame
POV-Ray Hall of Fame
POV-Ray Hall of Fame
POV-Ray Hall of Fame
POV-Ray Hall of Fame
POV-Ray Hall of Fame??
Ray Tracing?
Ray Tracing?
eye
s0
b
a
dc
f
e
s1
s2
eye
a bs0
e fs2 c bs1
R T
R R TT
Raytracing Is Simple
• Paul Heckbert wrote a raytracer that fits on a business card!
typedef struct{double x,y,z}vec;vec U,black,amb={.02,.02,.02};struct sphere{ vec cen,color;double
rad,kd,ks,kt,kl,ir}*s,*best,sph[]={0.,6.,.5,1.,1.,1.,.9, .05,.2,.85,0.,1.7,-
1.,8.,-.5,1.,.5,.2,1.,.7,.3,0.,.05,1.2,1.,8.,-.5,.1,.8,.8, 1.,.3,.7,0.,0.,1.2,3.,-
6.,15.,1.,.8,1.,7.,0.,0.,0.,.6,1.5,-3.,-3.,12.,.8,1., 1.,5.,0.,0.,0.,.5,1.5,};yx;double
u,b,tmin,sqrt(),tan();double vdot(A,B)vec A ,B;{return A.x*B.x+A.y*B.y+A.z*B.z;}vec
vcomb(a,A,B)double a;vec A,B;{B.x+=a* A.x;B.y+=a*A.y;B.z+=a*A.z;return B;}vec vunit(A)vec A;
{return vcomb(1./sqrt( vdot(A,A)),A,black);}struct sphere*intersect(P,D)vec P,D;
{best=0;tmin=1e30;s= sph+5;while(s-->sph)b=vdot(D,U=vcomb(-1.,P,s->cen)),u=b*b-vdot(U,U)
+s->rad*s ->rad,u=u>0?sqrt(u):1e31,u=b-u>1e-7?b-u:b+u,tmin=u>=1e-7&&u<tmin?best=s,u:
tmin;return best;}vec trace(level,P,D)vec P,D;{double d,eta,e;vec N,color; struct sphere*s,*l;if(!
level--)return black;if(s=intersect(P,D));else return amb;color=amb;eta=s->ir;d=
-vdot(D,N=vunit(vcomb(-1.,P=vcomb(tmin,D,P),s->cen )));if(d<0)N=vcomb(-
1.,N,black),eta=1/eta,d= -d;l=sph+5;while(l-->sph)if((e=l ->kl*vdot(N,U=vunit(vcomb(-1.,P,l-
>cen))))>0&&intersect(P,U)==l)color=vcomb(e ,l->color,color);U=s-
>color;color.x*=U.x;color.y*=U.y;color.z*=U.z;e=1-eta* eta*(1-d*d);return vcomb(s->kt,e>0?
trace(level,P,vcomb(eta,D,vcomb(eta*d-sqrt (e),N,black))):black,vcomb(s-
>ks,trace(level,P,vcomb(2*d,N,D)),vcomb(s->kd, color,vcomb(s->kl,U,black))));}main(){printf("%d
%dn",32,32);while(yx<32*32) U.x=yx%32-32/2,U.z=32/2-yx+
+/32,U.y=32/2/tan(25/114.5915590261),U=vcomb(255., trace(3,black,vunit(U)),black),printf("%.0f
%.0f %.0fn",U);}/*minray!*/
Raytracing is SLOW
• 1024 * 768 = 786,432 rays
• 1280 * 1024 = 1,310,720 rays
• 1920 * 1080 = 2,073,600 rays
– Full HD 해상도
Escher
H/W 의 발전
• GPU
– Nvidia, ATI
• CPU
– Intel, AMD
NVIDIA
NVIDIA
ATI
ATI
ATI
INTEL
INTEL
AMD
AMD Phenom™ 9600 Quad
Core
Multi Core CPU 의 발전
WOW
ATI Radeon HD4800
ATI Radeon HD4800
등장인물들
M&A
Real-Time Ray Tracing
• 실시간 레이트레이싱 가능
• OpenRT
– Real-Time Ray-Tracing Project
– http://www.openrt.de/
– The OpenRT project originated from the
RTRT realtime-raytracing project of the
University of Saarbruecken (
http://graphics.cs.uni-sb.de).
Q3RT
Q3RT
Q3RT
Q4RT
Linear Scaling
Daniel Pohl -> Intel
Project Offset -> Intel
Nvidia
• David Kirk
– http://rssoo.tistory.com/7055
• RayScale - Interactive Ray Tracing
Pov-Ray 3.7 real-time
Raytracing
Pov-Ray 3.7 real-time
Raytracing
Rasterization VS Raytracing
John Carmack
• PC Perspective - John Carmack on id Tech 6
, Ray Tracing, Consoles
– http://www.pcper.com/article.php?aid=532
Tim Sweeney
• Ray-tracing is a cool direction for future rendering techniques.
• Rendering can be done on the CPU. As soon as we have enough
CPU cores and better vector support, these schemes might get
more practical for games. And: As GPUs become more general, you
will have the possibility of writing a rendering engine that runs
directly on the GPU and bypasses DirectX as well as the graphics
pipeline.
Simple Real Time Ray tracing Demo
수학
Code
• void RayTracer::Render(int scan)
• {
• Vector3 vRay, vPoint;
• Vector3 InterPos, vNormal, vLight;
• float intensity;
• unsigned offset;
• WORD color565;
• int index = 0;
•
• if (scan%2) offset = BytesPerScanline;
• else {offset = 0;}
• for (int y = scan; y < SCREEN_HEIGHT; y+= 2)
• {
• for (int x = 0; x < SCREEN_WIDTH; x++)
• {
• // make incident view ray
• vRay = MakeRay(x - SCREEN_WIDTH/2, SCREEN_HEIGHT/2 - y, 256);
•
• Ray ViewRay;
• ViewRay.dir = vRay;
• ViewRay.startp = Vector3(0.0f, 0.0f, 0.0f);
• float Intensity = 0;
•
• intensity = RayTrace(ViewRay, &InterPos, &vNormal);
• if (intensity < 0.0f) {offset += 2; continue;}
• Intensity += intensity;
•
• /////////////////////////////////
• ///// Reflection
• float R_Factor = 0.4f;
• if (true) {
• Vector3 vReflect = vNormal * (-ViewRay.dir * vNormal) * 2 + ViewRay.dir;
•
• Ray R_ray(InterPos, vReflect);
• intensity = RayTrace(R_ray, &InterPos, &vNormal);
• if (intensity < 0.0f) {goto DRAWPIXEL;}
• Intensity += intensity * R_Factor;
• }
• DRAWPIXEL:
• if ( Intensity > 1.0f ) Intensity = 1.0f;
• if ( Intensity < 0.0f ) Intensity = 0.0f;
• // Draw Pixel
• BYTE B,G,R;
• BYTE color = BYTE(Intensity * 255);
• B = color;
• G = color;
• R = color;
• color565 = R >> 3 << 11;
• color565 |= G >> 2 << 5;
• color565 |= B >> 3;
• *(WORD*)(pBits + offset) = color565;
• offset += 2;
•
• }
• offset += BytesPerScanline;
• }
• }
미래는 ?
• Intel
– Larabee
• AMD, ATI
– Fusion
• Nvidia
– CUDA
Icon2008 실시간 레이트레이싱과 게임의 미래

More Related Content

Viewers also liked

Suara Rakyat Edisi 1-2011
Suara Rakyat Edisi 1-2011Suara Rakyat Edisi 1-2011
Suara Rakyat Edisi 1-2011Suara Rakyat
 
또 다른 지구를 찾아라
또 다른 지구를 찾아라 또 다른 지구를 찾아라
또 다른 지구를 찾아라 SeongWan Kim
 
Training Evaluation workshop slides.may2011
Training Evaluation workshop slides.may2011Training Evaluation workshop slides.may2011
Training Evaluation workshop slides.may2011BeckmanKH
 
Cocos2d x v3.0 무엇이 달라졌나? (20140426)
Cocos2d x v3.0 무엇이 달라졌나? (20140426)Cocos2d x v3.0 무엇이 달라졌나? (20140426)
Cocos2d x v3.0 무엇이 달라졌나? (20140426)SeongWan Kim
 
지구 온난화는 사실인가 (김성완 2015.9.6)
지구 온난화는 사실인가 (김성완 2015.9.6)지구 온난화는 사실인가 (김성완 2015.9.6)
지구 온난화는 사실인가 (김성완 2015.9.6)SeongWan Kim
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slidesSmithss25
 
Redesign presentatie
Redesign presentatieRedesign presentatie
Redesign presentatieNiek Kemps
 

Viewers also liked (12)

Suara Rakyat Edisi 1-2011
Suara Rakyat Edisi 1-2011Suara Rakyat Edisi 1-2011
Suara Rakyat Edisi 1-2011
 
Pornography
PornographyPornography
Pornography
 
또 다른 지구를 찾아라
또 다른 지구를 찾아라 또 다른 지구를 찾아라
또 다른 지구를 찾아라
 
Dreams
DreamsDreams
Dreams
 
Training Evaluation workshop slides.may2011
Training Evaluation workshop slides.may2011Training Evaluation workshop slides.may2011
Training Evaluation workshop slides.may2011
 
Cocos2d x v3.0 무엇이 달라졌나? (20140426)
Cocos2d x v3.0 무엇이 달라졌나? (20140426)Cocos2d x v3.0 무엇이 달라졌나? (20140426)
Cocos2d x v3.0 무엇이 달라졌나? (20140426)
 
지구 온난화는 사실인가 (김성완 2015.9.6)
지구 온난화는 사실인가 (김성완 2015.9.6)지구 온난화는 사실인가 (김성완 2015.9.6)
지구 온난화는 사실인가 (김성완 2015.9.6)
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slides
 
Jaz
JazJaz
Jaz
 
Redesign presentatie
Redesign presentatieRedesign presentatie
Redesign presentatie
 
Usempresa sales presentation_br
Usempresa sales presentation_brUsempresa sales presentation_br
Usempresa sales presentation_br
 
Preregistrocbtis141
Preregistrocbtis141Preregistrocbtis141
Preregistrocbtis141
 

Similar to Icon2008 실시간 레이트레이싱과 게임의 미래

COMP 4010: Lecture8 - AR Technology
COMP 4010: Lecture8 - AR TechnologyCOMP 4010: Lecture8 - AR Technology
COMP 4010: Lecture8 - AR TechnologyMark Billinghurst
 
Final Presentation COMPRESSED
Final Presentation COMPRESSEDFinal Presentation COMPRESSED
Final Presentation COMPRESSEDSujai Nair
 
2016 AR Summer School Lecture2
2016 AR Summer School Lecture22016 AR Summer School Lecture2
2016 AR Summer School Lecture2Mark Billinghurst
 
Panoramic Video in Environmental Monitoring Software Development and Applica...
Panoramic Video in Environmental Monitoring Software Development and Applica...Panoramic Video in Environmental Monitoring Software Development and Applica...
Panoramic Video in Environmental Monitoring Software Development and Applica...pycontw
 
Creating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector GraphicsCreating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector GraphicsDavid Keener
 
【Unite Tokyo 2019】Unityでレイトレーシングしよう!レイトレーシング実装と最適化の解説
【Unite Tokyo 2019】Unityでレイトレーシングしよう!レイトレーシング実装と最適化の解説【Unite Tokyo 2019】Unityでレイトレーシングしよう!レイトレーシング実装と最適化の解説
【Unite Tokyo 2019】Unityでレイトレーシングしよう!レイトレーシング実装と最適化の解説UnityTechnologiesJapan002
 
Processing images with Deep Learning
Processing images with Deep LearningProcessing images with Deep Learning
Processing images with Deep LearningJulien SIMON
 
Sem 2 Presentation
Sem 2 PresentationSem 2 Presentation
Sem 2 PresentationShalom Cohen
 
1. laboratory presentation virtual reality uninpahu_2019-1
1. laboratory presentation virtual reality uninpahu_2019-11. laboratory presentation virtual reality uninpahu_2019-1
1. laboratory presentation virtual reality uninpahu_2019-1Javier Daza
 
オペレーティングシステム 設計と実装 第3版(20101211)
オペレーティングシステム 設計と実装 第3版(20101211)オペレーティングシステム 設計と実装 第3版(20101211)
オペレーティングシステム 設計と実装 第3版(20101211)Ryousei Takano
 
Birds of a Feather 2017: 邀請分享 IoT, SDR, and Car Security - Aaron
Birds of a Feather 2017: 邀請分享 IoT, SDR, and Car Security - AaronBirds of a Feather 2017: 邀請分享 IoT, SDR, and Car Security - Aaron
Birds of a Feather 2017: 邀請分享 IoT, SDR, and Car Security - AaronHITCON GIRLS
 
Introduction to the Unreal Development Kit
Introduction to the Unreal Development KitIntroduction to the Unreal Development Kit
Introduction to the Unreal Development KitNick Pruehs
 
IoT Chess 16th April Berlin
IoT Chess 16th April BerlinIoT Chess 16th April Berlin
IoT Chess 16th April BerlinLars Gregori
 
“Develop Next-gen Camera Apps Using Snapdragon Computer Vision Technologies,”...
“Develop Next-gen Camera Apps Using Snapdragon Computer Vision Technologies,”...“Develop Next-gen Camera Apps Using Snapdragon Computer Vision Technologies,”...
“Develop Next-gen Camera Apps Using Snapdragon Computer Vision Technologies,”...Edge AI and Vision Alliance
 
Realtime Streaming using Autobahn Websockets
Realtime Streaming using Autobahn WebsocketsRealtime Streaming using Autobahn Websockets
Realtime Streaming using Autobahn WebsocketsTom Sheffler
 
Parallel Computing in R
Parallel Computing in RParallel Computing in R
Parallel Computing in Rmickey24
 
Reactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDaysReactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDaysManuel Bernhardt
 

Similar to Icon2008 실시간 레이트레이싱과 게임의 미래 (20)

COMP 4010: Lecture8 - AR Technology
COMP 4010: Lecture8 - AR TechnologyCOMP 4010: Lecture8 - AR Technology
COMP 4010: Lecture8 - AR Technology
 
A funtro to real-time ray-tracing
A funtro to real-time ray-tracingA funtro to real-time ray-tracing
A funtro to real-time ray-tracing
 
Final Presentation COMPRESSED
Final Presentation COMPRESSEDFinal Presentation COMPRESSED
Final Presentation COMPRESSED
 
2016 AR Summer School Lecture2
2016 AR Summer School Lecture22016 AR Summer School Lecture2
2016 AR Summer School Lecture2
 
Panoramic Video in Environmental Monitoring Software Development and Applica...
Panoramic Video in Environmental Monitoring Software Development and Applica...Panoramic Video in Environmental Monitoring Software Development and Applica...
Panoramic Video in Environmental Monitoring Software Development and Applica...
 
Creating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector GraphicsCreating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector Graphics
 
【Unite Tokyo 2019】Unityでレイトレーシングしよう!レイトレーシング実装と最適化の解説
【Unite Tokyo 2019】Unityでレイトレーシングしよう!レイトレーシング実装と最適化の解説【Unite Tokyo 2019】Unityでレイトレーシングしよう!レイトレーシング実装と最適化の解説
【Unite Tokyo 2019】Unityでレイトレーシングしよう!レイトレーシング実装と最適化の解説
 
Easy Virtual Reality
Easy Virtual RealityEasy Virtual Reality
Easy Virtual Reality
 
Processing images with Deep Learning
Processing images with Deep LearningProcessing images with Deep Learning
Processing images with Deep Learning
 
Sem 2 Presentation
Sem 2 PresentationSem 2 Presentation
Sem 2 Presentation
 
1. laboratory presentation virtual reality uninpahu_2019-1
1. laboratory presentation virtual reality uninpahu_2019-11. laboratory presentation virtual reality uninpahu_2019-1
1. laboratory presentation virtual reality uninpahu_2019-1
 
オペレーティングシステム 設計と実装 第3版(20101211)
オペレーティングシステム 設計と実装 第3版(20101211)オペレーティングシステム 設計と実装 第3版(20101211)
オペレーティングシステム 設計と実装 第3版(20101211)
 
Markus Tessmann, InnoGames
Markus Tessmann, InnoGames	Markus Tessmann, InnoGames
Markus Tessmann, InnoGames
 
Birds of a Feather 2017: 邀請分享 IoT, SDR, and Car Security - Aaron
Birds of a Feather 2017: 邀請分享 IoT, SDR, and Car Security - AaronBirds of a Feather 2017: 邀請分享 IoT, SDR, and Car Security - Aaron
Birds of a Feather 2017: 邀請分享 IoT, SDR, and Car Security - Aaron
 
Introduction to the Unreal Development Kit
Introduction to the Unreal Development KitIntroduction to the Unreal Development Kit
Introduction to the Unreal Development Kit
 
IoT Chess 16th April Berlin
IoT Chess 16th April BerlinIoT Chess 16th April Berlin
IoT Chess 16th April Berlin
 
“Develop Next-gen Camera Apps Using Snapdragon Computer Vision Technologies,”...
“Develop Next-gen Camera Apps Using Snapdragon Computer Vision Technologies,”...“Develop Next-gen Camera Apps Using Snapdragon Computer Vision Technologies,”...
“Develop Next-gen Camera Apps Using Snapdragon Computer Vision Technologies,”...
 
Realtime Streaming using Autobahn Websockets
Realtime Streaming using Autobahn WebsocketsRealtime Streaming using Autobahn Websockets
Realtime Streaming using Autobahn Websockets
 
Parallel Computing in R
Parallel Computing in RParallel Computing in R
Parallel Computing in R
 
Reactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDaysReactive Web-Applications @ LambdaDays
Reactive Web-Applications @ LambdaDays
 

More from SeongWan Kim

딥러닝에 다가가기 (Ai 스쿨 2017)
딥러닝에 다가가기 (Ai 스쿨 2017)딥러닝에 다가가기 (Ai 스쿨 2017)
딥러닝에 다가가기 (Ai 스쿨 2017)SeongWan Kim
 
인공지능과 게임
인공지능과 게임인공지능과 게임
인공지능과 게임SeongWan Kim
 
KGC 2007 소프트웨어 렌더러 개발
KGC 2007  소프트웨어 렌더러 개발KGC 2007  소프트웨어 렌더러 개발
KGC 2007 소프트웨어 렌더러 개발SeongWan Kim
 
ICON 2011 Introduction to OpenGL ES
ICON 2011 Introduction to OpenGL ESICON 2011 Introduction to OpenGL ES
ICON 2011 Introduction to OpenGL ESSeongWan Kim
 
ICON 2010 3D 게임에서 색차 방식의 3D 입체 영상 구현하기
ICON 2010 3D 게임에서 색차 방식의 3D 입체 영상 구현하기ICON 2010 3D 게임에서 색차 방식의 3D 입체 영상 구현하기
ICON 2010 3D 게임에서 색차 방식의 3D 입체 영상 구현하기SeongWan Kim
 
3D Engine (ICON 2007)
3D Engine (ICON 2007)3D Engine (ICON 2007)
3D Engine (ICON 2007)SeongWan Kim
 
적응광학 Adaptive optics
적응광학 Adaptive optics적응광학 Adaptive optics
적응광학 Adaptive opticsSeongWan Kim
 
우주 배경 복사와 우주 거대 구조
우주 배경 복사와 우주 거대 구조우주 배경 복사와 우주 거대 구조
우주 배경 복사와 우주 거대 구조SeongWan Kim
 
도시 열섬 현상
도시 열섬 현상도시 열섬 현상
도시 열섬 현상SeongWan Kim
 
SPH 기법을 이용한 2D 물 물리 엔진 개발
SPH 기법을 이용한 2D 물 물리 엔진 개발SPH 기법을 이용한 2D 물 물리 엔진 개발
SPH 기법을 이용한 2D 물 물리 엔진 개발SeongWan Kim
 
컴퓨터 시뮬레이션으로 확인해보는 특수상대성이론의 시각적 효과
컴퓨터 시뮬레이션으로 확인해보는 특수상대성이론의 시각적 효과컴퓨터 시뮬레이션으로 확인해보는 특수상대성이론의 시각적 효과
컴퓨터 시뮬레이션으로 확인해보는 특수상대성이론의 시각적 효과SeongWan Kim
 

More from SeongWan Kim (11)

딥러닝에 다가가기 (Ai 스쿨 2017)
딥러닝에 다가가기 (Ai 스쿨 2017)딥러닝에 다가가기 (Ai 스쿨 2017)
딥러닝에 다가가기 (Ai 스쿨 2017)
 
인공지능과 게임
인공지능과 게임인공지능과 게임
인공지능과 게임
 
KGC 2007 소프트웨어 렌더러 개발
KGC 2007  소프트웨어 렌더러 개발KGC 2007  소프트웨어 렌더러 개발
KGC 2007 소프트웨어 렌더러 개발
 
ICON 2011 Introduction to OpenGL ES
ICON 2011 Introduction to OpenGL ESICON 2011 Introduction to OpenGL ES
ICON 2011 Introduction to OpenGL ES
 
ICON 2010 3D 게임에서 색차 방식의 3D 입체 영상 구현하기
ICON 2010 3D 게임에서 색차 방식의 3D 입체 영상 구현하기ICON 2010 3D 게임에서 색차 방식의 3D 입체 영상 구현하기
ICON 2010 3D 게임에서 색차 방식의 3D 입체 영상 구현하기
 
3D Engine (ICON 2007)
3D Engine (ICON 2007)3D Engine (ICON 2007)
3D Engine (ICON 2007)
 
적응광학 Adaptive optics
적응광학 Adaptive optics적응광학 Adaptive optics
적응광학 Adaptive optics
 
우주 배경 복사와 우주 거대 구조
우주 배경 복사와 우주 거대 구조우주 배경 복사와 우주 거대 구조
우주 배경 복사와 우주 거대 구조
 
도시 열섬 현상
도시 열섬 현상도시 열섬 현상
도시 열섬 현상
 
SPH 기법을 이용한 2D 물 물리 엔진 개발
SPH 기법을 이용한 2D 물 물리 엔진 개발SPH 기법을 이용한 2D 물 물리 엔진 개발
SPH 기법을 이용한 2D 물 물리 엔진 개발
 
컴퓨터 시뮬레이션으로 확인해보는 특수상대성이론의 시각적 효과
컴퓨터 시뮬레이션으로 확인해보는 특수상대성이론의 시각적 효과컴퓨터 시뮬레이션으로 확인해보는 특수상대성이론의 시각적 효과
컴퓨터 시뮬레이션으로 확인해보는 특수상대성이론의 시각적 효과
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governanceWSO2
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...caitlingebhard1
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfdanishmna97
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseWSO2
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingWSO2
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 

Recently uploaded (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

Icon2008 실시간 레이트레이싱과 게임의 미래

  • 1. 실시간 레이트레이싱과 게임의 미래실시간 레이트레이싱과 게임의 미래 김성완
  • 2. Ray Tracing 의 과거 • [1968] Arthur Appel – “Some techniques for shading machine renderings of solids” – Basic ray casting with shadows • [1980] Turnur Whitted – “An Improved Illumination Model for Shaded Display” • Reflection • Refraction • Shadows • Hidden Surface Removal • [1984] Lucas Film • [1986] Eric Graham, Amiga
  • 6. Ray Tracing 의 현재 • POV-Ray – Persistence of Vision Raytracer – Freeware multi-platform ray-tracing package. – http://www.povray.org/
  • 13. POV-Ray Hall of Fame??
  • 16. Raytracing Is Simple • Paul Heckbert wrote a raytracer that fits on a business card! typedef struct{double x,y,z}vec;vec U,black,amb={.02,.02,.02};struct sphere{ vec cen,color;double rad,kd,ks,kt,kl,ir}*s,*best,sph[]={0.,6.,.5,1.,1.,1.,.9, .05,.2,.85,0.,1.7,- 1.,8.,-.5,1.,.5,.2,1.,.7,.3,0.,.05,1.2,1.,8.,-.5,.1,.8,.8, 1.,.3,.7,0.,0.,1.2,3.,- 6.,15.,1.,.8,1.,7.,0.,0.,0.,.6,1.5,-3.,-3.,12.,.8,1., 1.,5.,0.,0.,0.,.5,1.5,};yx;double u,b,tmin,sqrt(),tan();double vdot(A,B)vec A ,B;{return A.x*B.x+A.y*B.y+A.z*B.z;}vec vcomb(a,A,B)double a;vec A,B;{B.x+=a* A.x;B.y+=a*A.y;B.z+=a*A.z;return B;}vec vunit(A)vec A; {return vcomb(1./sqrt( vdot(A,A)),A,black);}struct sphere*intersect(P,D)vec P,D; {best=0;tmin=1e30;s= sph+5;while(s-->sph)b=vdot(D,U=vcomb(-1.,P,s->cen)),u=b*b-vdot(U,U) +s->rad*s ->rad,u=u>0?sqrt(u):1e31,u=b-u>1e-7?b-u:b+u,tmin=u>=1e-7&&u<tmin?best=s,u: tmin;return best;}vec trace(level,P,D)vec P,D;{double d,eta,e;vec N,color; struct sphere*s,*l;if(! level--)return black;if(s=intersect(P,D));else return amb;color=amb;eta=s->ir;d= -vdot(D,N=vunit(vcomb(-1.,P=vcomb(tmin,D,P),s->cen )));if(d<0)N=vcomb(- 1.,N,black),eta=1/eta,d= -d;l=sph+5;while(l-->sph)if((e=l ->kl*vdot(N,U=vunit(vcomb(-1.,P,l- >cen))))>0&&intersect(P,U)==l)color=vcomb(e ,l->color,color);U=s- >color;color.x*=U.x;color.y*=U.y;color.z*=U.z;e=1-eta* eta*(1-d*d);return vcomb(s->kt,e>0? trace(level,P,vcomb(eta,D,vcomb(eta*d-sqrt (e),N,black))):black,vcomb(s- >ks,trace(level,P,vcomb(2*d,N,D)),vcomb(s->kd, color,vcomb(s->kl,U,black))));}main(){printf("%d %dn",32,32);while(yx<32*32) U.x=yx%32-32/2,U.z=32/2-yx+ +/32,U.y=32/2/tan(25/114.5915590261),U=vcomb(255., trace(3,black,vunit(U)),black),printf("%.0f %.0f %.0fn",U);}/*minray!*/
  • 17. Raytracing is SLOW • 1024 * 768 = 786,432 rays • 1280 * 1024 = 1,310,720 rays • 1920 * 1080 = 2,073,600 rays – Full HD 해상도
  • 19. H/W 의 발전 • GPU – Nvidia, ATI • CPU – Intel, AMD
  • 22. ATI
  • 23. ATI
  • 24. ATI
  • 25. INTEL
  • 26. INTEL
  • 27. AMD
  • 28. AMD Phenom™ 9600 Quad Core
  • 29. Multi Core CPU 의 발전
  • 30. WOW
  • 34. M&A
  • 35. Real-Time Ray Tracing • 실시간 레이트레이싱 가능 • OpenRT – Real-Time Ray-Tracing Project – http://www.openrt.de/ – The OpenRT project originated from the RTRT realtime-raytracing project of the University of Saarbruecken ( http://graphics.cs.uni-sb.de).
  • 36. Q3RT
  • 37. Q3RT
  • 38. Q3RT
  • 39. Q4RT
  • 41. Daniel Pohl -> Intel
  • 43. Nvidia • David Kirk – http://rssoo.tistory.com/7055 • RayScale - Interactive Ray Tracing
  • 47. John Carmack • PC Perspective - John Carmack on id Tech 6 , Ray Tracing, Consoles – http://www.pcper.com/article.php?aid=532
  • 48. Tim Sweeney • Ray-tracing is a cool direction for future rendering techniques. • Rendering can be done on the CPU. As soon as we have enough CPU cores and better vector support, these schemes might get more practical for games. And: As GPUs become more general, you will have the possibility of writing a rendering engine that runs directly on the GPU and bypasses DirectX as well as the graphics pipeline.
  • 49. Simple Real Time Ray tracing Demo
  • 51. Code • void RayTracer::Render(int scan) • { • Vector3 vRay, vPoint; • Vector3 InterPos, vNormal, vLight; • float intensity; • unsigned offset; • WORD color565; • int index = 0; • • if (scan%2) offset = BytesPerScanline; • else {offset = 0;} • for (int y = scan; y < SCREEN_HEIGHT; y+= 2) • { • for (int x = 0; x < SCREEN_WIDTH; x++) • { • // make incident view ray • vRay = MakeRay(x - SCREEN_WIDTH/2, SCREEN_HEIGHT/2 - y, 256); • • Ray ViewRay; • ViewRay.dir = vRay; • ViewRay.startp = Vector3(0.0f, 0.0f, 0.0f); • float Intensity = 0; • • intensity = RayTrace(ViewRay, &InterPos, &vNormal); • if (intensity < 0.0f) {offset += 2; continue;} • Intensity += intensity; •
  • 52. • ///////////////////////////////// • ///// Reflection • float R_Factor = 0.4f; • if (true) { • Vector3 vReflect = vNormal * (-ViewRay.dir * vNormal) * 2 + ViewRay.dir; • • Ray R_ray(InterPos, vReflect); • intensity = RayTrace(R_ray, &InterPos, &vNormal); • if (intensity < 0.0f) {goto DRAWPIXEL;} • Intensity += intensity * R_Factor; • } • DRAWPIXEL: • if ( Intensity > 1.0f ) Intensity = 1.0f; • if ( Intensity < 0.0f ) Intensity = 0.0f; • // Draw Pixel • BYTE B,G,R; • BYTE color = BYTE(Intensity * 255); • B = color; • G = color; • R = color; • color565 = R >> 3 << 11; • color565 |= G >> 2 << 5; • color565 |= B >> 3; • *(WORD*)(pBits + offset) = color565; • offset += 2; • • } • offset += BytesPerScanline; • } • }
  • 53. 미래는 ? • Intel – Larabee • AMD, ATI – Fusion • Nvidia – CUDA