(Microsoft PowerPoint - JXEUOAACMYBW.ppt [\310\243\310\257 \270\360\265\345])

Similar documents
PowerPoint 프레젠테이션

Microsoft PowerPoint - lecture17-ch8.ppt

Microsoft PowerPoint - lecture18-ch8

2005CG01.PDF

Microsoft PowerPoint - lecture19-ch8.ppt

歯Lecture2.PDF

[ReadyToCameral]RUF¹öÆÛ(CSTA02-29).hwp

Microsoft PowerPoint - lecture17-ch8.ppt [호환 모드]

63-69±è´ë¿µ

(Microsoft PowerPoint - lecture15-ch8.ppt [\310\243\310\257 \270\360\265\345])

Microsoft PowerPoint - lecture16-ch8.ppt [호환 모드]

High Resolution Disparity Map Generation Using TOF Depth Camera In this paper, we propose a high-resolution disparity map generation method using a lo

Microsoft PowerPoint - lecture17-ch8

09권오설_ok.hwp

untitled

À±½Â¿í Ãâ·Â

Microsoft PowerPoint - lecture16-ch8.ppt [호환 모드]

Microsoft PowerPoint - lecture16-ch8 [호환 모드]

Microsoft PowerPoint - lecture15-ch8.ppt [호환 모드]

untitled

(Microsoft PowerPoint - ADEFNJKEPXSQ.ppt [\310\243\310\257 \270\360\265\345])

(Microsoft PowerPoint - lecture16-ch8.ppt [\310\243\310\257 \270\360\265\345])

Week3

Microsoft Word - cg09-final-answer.doc

Microsoft PowerPoint - lecture15-ch8.ppt [호환 모드]

19_9_767.hwp

단국대학교멀티미디어공학그래픽스프로그래밍기말고사 (2012 년봄학기 ) 2012 년 6 월 12 일학과학번이름 기말고사 담당교수 : 단국대학교멀티미디어공학전공박경신 l 답은반드시답안지에기술할것. 공간이부족할경우반드시답안지몇쪽의뒤에있다고명기한후기술할것. 그외의경우의답안지뒤

04_오픈지엘API.key

Gray level 변환 및 Arithmetic 연산을 사용한 영상 개선

(Microsoft PowerPoint - CNVZNGWAIYSE.ppt [\310\243\310\257 \270\360\265\345])

untitled

2011년 10월 초판 c 2011 Sony Corporation. All rights reserved. 서면 허가 없이 전체 또는 일부를 복제하는 것을 금합니다. 기능 및 규격은 통보 없이 변경될 수 있습니다. Sony와 Sony 로고는 Sony의 상표입니다. G L

Slide 1

untitled

Microsoft PowerPoint - lecture15-ch6.ppt

K_R9000PRO_101.pdf

슬라이드 1

,. 3D 2D 3D. 3D. 3D.. 3D 90. Ross. Ross [1]. T. Okino MTD(modified time difference) [2], Y. Matsumoto (motion parallax) [3]. [4], [5,6,7,8] D/3

(JBE Vol. 21, No. 1, January 2016) (Regular Paper) 21 1, (JBE Vol. 21, No. 1, January 2016) ISSN 228

1 Nov-03 CST MICROWAVE STUDIO Microstrip Parameter sweeping Tutorial Computer Simulation Technology

Microsoft Word - cg07-final.doc


4 CD Construct Special Model VI 2 nd Order Model VI 2 Note: Hands-on 1, 2 RC 1 RLC mass-spring-damper 2 2 ζ ω n (rad/sec) 2 ( ζ < 1), 1 (ζ = 1), ( ) 1

<35312DBCB1C8A3B5B52E687770>

Microsoft PowerPoint - 13prac.pptx

Microsoft Word - cg08-final-answer.doc

Microsoft PowerPoint cg01.ppt

Microsoft Word - SRA-Series Manual.doc

<4D F736F F F696E74202D204B FC7C1B7CEB1D7B7A55F436F6E736F6C D6520B0B3B9DFBFA120C0AFBFEBC7D120B9E6B9FD5FC0CCC1F

슬라이드 1

LCD Display

solution map_....

좋은 사진 찍는 방법

LIDAR와 영상 Data Fusion에 의한 건물 자동추출

融合先验信息到三维重建 组会报 告[2]

김기남_ATDC2016_160620_[키노트].key

1. 서 론

2 / 26

04임재아_ok.hwp

45-51 ¹Ú¼ø¸¸

(Exposure) Exposure (Exposure Assesment) EMF Unknown to mechanism Health Effect (Effect) Unknown to mechanism Behavior pattern (Micro- Environment) Re

< C6AFC1FD28B1C7C7F5C1DF292E687770>

Microsoft PowerPoint - lecture16-ch6

T100MD+

초판 1쇄 발행 2013년 10월 25일 지은이 박승제 펴낸이 장성두 펴낸곳 제이펍 출판신고 2009년 11월 10일 제 호 주소 경기도 파주시 문발동 파주출판도시 뮤즈빌딩 403호 전화 / 팩스

- 이 문서는 삼성전자의 기술 자산으로 승인자만이 사용할 수 있습니다 Part Picture Description 5. R emove the memory by pushing the fixed-tap out and Remove the WLAN Antenna. 6. INS

Something that can be seen, touched or otherwise sensed

歯15-ROMPLD.PDF

Chap06(Interprocess Communication).PDF

Lab10

Manufacturing6

Open GL

Microsoft PowerPoint - analogic_kimys_ch10.ppt

(Microsoft PowerPoint - EDIDFDXLLBYN.ppt [\310\243\310\257 \270\360\265\345])

1. Features IR-Compact non-contact infrared thermometer measures the infrared wavelength emitted from the target spot and converts it to standard curr

Microsoft PowerPoint - gpgpu_proximity.ppt

목차 제 1 장 inexio Touch Driver소개 소개 및 주요 기능 제품사양... 4 제 2 장 설치 및 실행 설치 시 주의사항 설치 권고 사양 프로그램 설치 하드웨

1

Vertical Probe Card Technology Pin Technology 1) Probe Pin Testable Pitch:03 (Matrix) Minimum Pin Length:2.67 High Speed Test Application:Test Socket

PRO1_09E [읽기 전용]

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for

CD-RW_Advanced.PDF

Microsoft PowerPoint - o8.pptx

서피스셰이더프로그램 셰이더개발을쉽게! Thursday, April 12, 12

DBPIA-NURIMEDIA

룩업테이블기반비선형렌즈플레어실시간렌더링방법 (Real-Time Nonlinear Lens-Flare Rendering Method Based on Look-Up Table) 조성훈 정유나 이성길 (Sunghun Jo) (Yuna Jeong) (Sungkil Lee) 요

12¾ÈÇö°æ 1-155T304®¶ó

Microsoft PowerPoint - 27.pptx

H3050(aap)

Orcad Capture 9.x

(JBE Vol. 7, No. 4, July 0)., [].,,. [4,5,6] [7,8,9]., (bilateral filter, BF) [4,5]. BF., BF,. (joint bilateral filter, JBF) [7,8]. JBF,., BF., JBF,.

Microsoft PowerPoint - lecture4-ch2.ppt

Microsoft PowerPoint - NV40_Korea_KR_2.ppt

DioPen 6.0 사용 설명서

Microsoft PowerPoint - 알고리즘_5주차_1차시.pptx

09김수현_ok.hwp

<5B D B3E220C1A634B1C720C1A632C8A320B3EDB9AEC1F628C3D6C1BE292E687770>

MPEG-4 Visual & 응용 장의선 삼성종합기술원멀티미디어랩

ecorp-프로젝트제안서작성실무(양식3)

untitled

Transcription:

Discrete Techniques

Historical Background 1970 년대 : local illumination models Phong shading : plastic 처럼보인다... 1980년대 : realism 의추구 global illumination models high cost, but very realistic texture mapping low cost, but reasonable results 예 : environment mapping ray tracing 과유사. 그러나열등 1

9.1 Buffers and Mappings

Buffers a block of memory n m k bit elements bit plane any of the k n m planes in a buffer pixel all k of the elements at a position pixel 1 개 bit plane 1 개 3

Mappings rendering 의사실성을높이는방법 물체의 model 자체를자세하고복잡하게 rendering 시에 detail 만변화 mapping texture mapping map a pattern (or texture) onto the surfaces of objects bump mapping distort the shape of the surface to create variations reflection or environmental mapping paint an image of the environment 4

Mapping 의종류 color : texture mapping 물체표면에무늬를입힌다 specular color : environment mapping shiny object 의표면에 ray-tracing 효과 normal vector pertubation : bump mapping 울퉁불퉁한표면효과 displacement mapping : (normal meshes, 2000) geometry에변형을가함 transparency : etched glass 물체의투명도를조절가능 5

9.2 Texture Mapping

Texture Mapping texture space (s, t) : 2차원 image [0,1] [0,1] texel : texture element. pixel in the texture object space (x w, y w, z w ) : 3차원물체 screen space (x s, y s ) : 2차원화면 7

Texture Mapping 의모델링 texture space (s, t) object space (x w, y w, z w ) screen space (x s, y s ) forward mapping texture space 의폐영역 backward mapping pixel : 정사각형 8

Texture Mapping 방법들 practical 한방법 polygon mesh 의각 vertex 에 texture coordinate (s, t) 를설정 보통은사람이직접 set polygon 내부의점들은 forward mapping texture를 rubber sheet 로보고, mapping backward mapping pixel 1개 texture 상의폐영역 9

Texture Mapping mapping from texture space to object space linear mapping for a parametric surface linear mapping function: (s,t) (u,v) u = f u (s,t) = a s + b t + c v = f v (s,t) = d s + e t + f invertible mapping when a e b d u= u v= v min min + s + t s s max t t max min s min t min min ( u ( v max max u v min min ) ) 10

Two-part texture mapping Bier and Sloan, Two-part texture mapping, IEEE CG&A, 6(9), 1986. intermediate surface의도입 2D texture 2D simple 3D mapping 3D intermediate surface 간단한형태 simple 3D complex 3D mapping 3D object (maybe complex) 왜? texture coordinate 설정을쉽게 environment mapping 으로가는중간과정 11

Two-part texture mapping two-stage forward mapping S mapping (surface mapping) T(u, v) T (x i, y i, z i ) : intermediate surface O mapping (object mapping) T (x i, y i, z i ) O(x w, y w, z w ) intermediate surface : plane, cylinder, cube, sphere cylinder 의경우 cube 의경우 12

Two-part texture mapping O mapping (object mapping) 어느 pixel 을고를지는선택가능 밖에서안으로 normal 방향 center 에서의 ray 로 전체과정 texture S mapping O mapping 13

Texture mapping in OpenGL OpenGL 기능 from one- or two-dimensional texture to 1D, 2D, 3D, 4D object 2D texture to 3D object 가일반적 14

glteximage2d( ) void glteximage2d( GLenum target, GL_TEXTURE_2D: target texture buffer GLint level, 0, 1, 2, : level-of-detail for Mip-Map GLint components, 0, 1, 2, 3 : components GLsizei width, width of texture GLsizei height, height of texture GLint border, 0 : border width GLenum format, pixel의저장형식 (R, G, B, A 중의어느것 ) GLenum type, pixels의저장형식 (int, short, long, ) const GLvoid* pixels source color array ); pixels 배열의내용을 texture buffer 에저장 15

glgetteximage( ) void glgetteximage( GLenum target, GLint level, GLenum format, GLenum type, GLvoid* pixels ); GL_TEXTURE_2D: target texture buffer 0, 1, 2, : level-of-detail for Mip-Map pixel의저장형식 pixel의저장형식 texture buffer 의내용을가져올곳 texture buffer 의내용을 pixels 배열에저장 16

Texture 사용예제 glenable(gl_texture_2d); texture 적용시작 glbegin(gl_quad); gltexcoord2f(0.0, 0.0); glvertex2f(x1, y1, z1); gltexcoord2f(1.0, 0.0); glvertex2f(x2, y2, z2); gltexcoord2f(1.0, 1.0); glvertex2f(x3, y3, z3); gltexcoord2f(0.0, 1.0); glvertex3f(x4, y4, z4); glend( ); 17

Repeat or Clamp texture coordinate 가 [0,1] [0,1] 을벗어날때, repeat : texture 가무한반복된다고해석 clamp : 경계를벗어나면, 전부 black void gltexparameterf( GLenum target, GLenum pname, GLfloat param ); 보통, GL_TEXTURE_2D pname = GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T param = GL_REPEAT, GL_CLAMP 18

Aliasing texture sampling 시에, aliasing 문제발생가능 void gltexparameterf( ); GLenum target, // GL_TEXTURE_2D GLenum pname, GLfloat param pname = GL_TEXTURE_MAG_FILTER, 확대 (magnification) GL_TEXTURE_MIN_FILTER 축소 (minifiication) 19

Aliasing param = GL_NEAREST, point sampling GL_LINEAR, linear interpolation GL_NEAREST_MIPMAP_NEAREST Mip-Map : texture pyramid MIPMAP 가장가까운크기 2 를합성해서, 최적의 texture 생성 ¼ ¼ ½ ½ 비슷한크기의 2 개를합성 20

glubuild2dmipmaps int glubuild2dmipmaps( GLenum target, GL_TEXTURE_2D: target texture buffer GLint level, 0, 1, 2, : level-of-detail for Mip-Map GLint components, 0, 1, 2, 3 : components GLsizei width, width of texture GLsizei height, height of texture GLint border, 0 : border width GLenum format, pixel의저장형식 (R, G, B, A 중의어느것 ) GLenum type, pixels의저장형식 (int, short, long, ) const GLvoid* pixels source color array ); Mip-Map 을생성해서, texture buffer 에저장 (level: 0, 1, 2, ) 21

Texture and Shading shading 결과와 texture 적용의해석 modulate : 두결과를서로곱해서, 최종값 decaling : shading 무시, texture color 만단순 copy void gltexenvi( GLenum target, GLenum pname, GLint param ); GL_TEXTURE_2D: target texture buffer GL_TEX_ENV_MODE GL_MODULATE, GL_DECAL 22

Perspective Projection 교정 texture mapping : linear interpolation 에기초 parallel projection : 문제없음 perspective projection : 문제발생가능 glhint(gl_perspective_correction, GL_NICEST); perspective projection 에의한오차를교정 23

9.3 Environmental Maps

Environment Mapping Blinn, Models of light reflection for computer synthesized pictures, Computer Graphics, 11(2):192~198, 1977. Greene, Environment mapping and other applications of world projections, IEEE CG&A, 6(11):21~29, 1986. = reflection mapping ray tracing 에대한 trick 으로제안 shiny object shiny object environment texture mapping camera ray tracing object camera object environment mapping 25

Environment Mapping 의예 26

Ray Tracing vs. Environment Map environment map ray tracing 27

Environment Mapping 의한계 물체가비교적작아야한다. 커지면, reflection vector 에서의오차가크다 concave 한물체에서는 incorrect 각 object 마다별도의 environment map 필요 view direction 이다르므로 camera 위치가바뀔때마다새로운 environment map 필요 view direction 이다르므로 28

Environment Mapping 의개요 2 stage algorithm R : reflection vector environment map 만들기 environment map 을 texture 처럼 mapping 시킴 29

9.4 Bump Maps

Bump Mapping Blinn, Simulation of wrinkled surfaces, Computer Graphics, 1978. wrinkle, dimple 을표현하는 trick 기법 물체의 geometry는변화시키지않음 표면의 normal vector 만 perturbation local model 에의해, dimple 이있는것처럼보임 단점 : silhouette line들에서는매끈함 31

Bump Mapping 의예 32

Bump Mapping Process u v = P P N N P P + = ), ( ), ( ), ( ' v u B v u v u u B u B u B u u + + = + = N N P N P P ) ( ' P(u,v) N(u,v) B(u,v) 33 u v B v u B v B v u B u v u + + + + = P N P N N N P N P P P N ' ' ' u u u u u v B v B v B v v + + = + = N N P N P P ) ( ' P (u,v) N (u,v)

Bump Mapping Process 정리하면, D N B A N P N P N N N + = + + = + + v B u B u v B v u B ' 34 = N+D N u P v P P N v = P N A u = P N B D

Two-pass Bump Mapping McReynolds and Blythe, Programming with OpenGL: Advanced Rendering, SIGGRAPH 97 Lecture Notes. Key Idea : N L = N L + D L N L의계산 : Gouraud Shading과동일 D L 의계산 : image 상에서 approximation D= B u N P v + B v N P u 결과적으로 2 개의 rendering 결과를합성해서 bumpmapping 가능 texture mapping H/W 만으로가능 35

Bump Mapping 의다른예 36

9.5 Writes into Buffers

Read from / write into buffers 보통의 memory read / write 와차이점? single pixel 이아니라, block 단위로 read / write bit-blt (bit-block transfer) = raster-ops, raster operations geometric operation 들과는무관 source 에서, destination 으로 m n 픽셀들을 block transfer 38

Writing Modes source destination 시의 operation 총 16 modes d d 1 1 자주쓰이는것들 mode 3: 단순 copy dest source mode 7: logical OR dest source + dest mode 6: XOR dest source dest 39

XOR mode interaction 시에자주사용 mode 6 : XOR 복구가능 (x y) y = x mode 7 : copy Mode 6 mouse cursor 구현방법 S : frame buffer, M : back buffer (backing storage) S 1 S 0 M 0 M 1 S 1 M 0 = (S 0 M 0 ) M 0 = S 0 S 2 S 1 M 1 = (S 0 M 0 ) M 1 = (S 0 M 0 ) S 0 = M 0 40

9.6 Bit and Pixel Operations in OpenGL

OpenGL buffers color buffers (including frame buffer) double buffering : front / back buffers stereo buffering : right / left buffers depth buffer (= Z-buffer) for hidden-surface removal accumulation buffer 다양한용도로사용 motion blur, anti-aliasing, stencil buffer used for masking operation 42

Pixel Operations in OpenGL raster position : raster-op 의출력기준점 geometric object 출력과는무관 void glrasterpos{d}{f}{v}( ); d = 2, 3, 4 f = i, s, d, f void glbitmap( GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte* bitmap ); rasterpos + (xorig, yorig) 부터 copy rasterpos rasterpos +(xmove, ymove) 43

Pixel Operations in OpenGL void glreadpixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels ); void gldrawpixels( GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels ); void glcopypixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum type ); raster position 을기준으로 read, draw, copy 를수행 44

Pseudo-color images gray-scale image 를 color 로출력하는방법 look-up table 의값들을 thermal color 로 setting blue green red 로색상변화 45

9.7 Compositing Techniques

Alpha Channel 4-channel color : (R, G, B, A) color channels RGB + alpha channel alpha channel : 다양한용도로사용 opacity and blending image composition anti-aliasing back-to-front rendering depth cueing and fog effect 47

Blending opacity : 물체의불투명한정도 opacity of 1 (α = 1.0) : 완전불투명 opacity of 0 (α = 0.0) : 완전투명 transparency : 물체의투명한정도 transparency = 1 opacity blending source : s = [s r s g s b s a ] destination : d = [d r d g d b d a ] transparent blended color : blending factor b and c d = [b r s r +c r d r b g s g +c g d g b b s b +c b d b b a s a +c a d a ] opaque 48

glblendfunc( ) glenable(gl_blend); blending 을시작 void glblendfunc( GLenum sfactor, GLenum dfactor ); blend color 에서, b, c 를결정 GL_ZERO factor = 0.0 GL_ONE factor = 1.0 GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA factor = s a or factor = 1 s a d = [s a s r +(1 s a )d r s a s g +(1 s a )d g s a s b +(1 s a )d b s a s a +(1 s a )d a ] GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA 49

glblendfunc( ) draw the rectangle (dr, dg, db, da) // destination glenable(gl_blend); glblendfunc(gl_one_minus_src_alpha, GL_SRC_ALPHA); draw the triangle (sr, sg, sb, sa) // source 50

Image Composition n 개의 image 합성하기 C i = (R i, G i, B i ) alpha channel 사용시, = = n i i result n 1 1 C C 51 alpha channel 사용시, 같은결과 alpha channel hardware 때문에더빠르다... ) ( 3 1 3 1 ) ( 2 1 3 2 3 1 ) 3 1 (1 : 3 1 ) ( 2 1 2 1 ) 2 1 (1 : 2 1 1: 3 2 1 3 2 1 3 2 3 2 1 2 1 2 1 1 C C C C C C C C C C C C C C C C + + = + + = + = = + = + = = = = result result result result α α α

Anti-aliasing line 을그릴때, pixel coverage 를감안해야 area 계산법 : pixel 에걸리는면적을직접계산 면적 : 30% alpha channel : 면적을저장 draw 시에는 GL_SRC_ALPHA 사용 면적에따라, anti-aliasing 가능 OpenGL에서전체를수행하게하는방법 glenable(gl_point_smooth); glenable(gl_line_smooth); glenable(gl_smoothing); glblendfunc(gl_src_alpha, GL_ONE_MINUS_SRC_ALPHR); draw the objects 52

Depth Cueing and Fog depth cueing (= intensity cueing) 가까운것은진하고또렷하게 멀리있는것은연하고흐릿하게 C s = f C s + (1 f) C f f : fog factor 거리에따라변화 C s, C f : color for source and fog 설정방법 glenable(gl_fog); glfogf(gl_fog_mode, {GL_LINEAR,GL_EXP,GL_EXP2}); glfogf(gl_fog_density, 0.5); glfogfv(gl_fog_color, fogcolor); e z 2 e z 1 0.5z 53

9.8 Use of the Accumulation Buffer

Accumulation Buffer another buffer frame buffer 와같은 resolution bit 수는훨씬많음 가능한 operation glclear(gl_accum_buffer_bit); AccumBuffer 0 void glaccum( GLenum op, GLfloat value ); GL_LOAD : AccumBuffer FrameBuffer GL_ACCUM : AccumBuffer AccumBuffer + value * FrameBuffer GL_MULT : AccumBuffer AccumBuffer * value GL_RETURN : FrameBuffer AccumBuffer 55

Accumulation Buffer convolution image 에행렬곱하기 1/3 1/3 1/3 clear make FrameBuffer with camera at (x, y) AccumBuffer AccumBuffer + 1.0 * FrameBuffer make FrameBuffer with camera at (x+1, y) AccumBuffer AccumBuffer + 1.0 * FrameBuffer make FrameBuffer with camera at (x 1, y) AccumBuffer AccumBuffer + 1.0 * FrameBuffer AccumBuffer AccumBuffer * 0.33 FrameBuffer AccumBuffer convoluted image 56

Motion Blur 운동하는물체를제대로표현하기 t = 0.3 t = 0.2 t = 0.1 t = 0.0 motion blurred image another example 57

Depth of Field 사진에서, focus 를어디에두느냐? 만드는법? accumulation buffer! camera #1 camera #2 focus 가맞는부분 camera #3 모두 accumulation! 58

9.9 Sampling and Aliasing partially skipped

Nyquist sampling theorem The ideal samples of a continuous function contain all the information in the original function if and only if the continuous function is sampled at a frequency at least twice the highest frequency in the function. We can reconstruct a continuous function f(x) from its samples {f i } by the formula: f ( x, y) = + fi sinc( x i= sinπx sinc( x) = πx x i ) 60

요약 61