adv99_4.PDF

Similar documents
19_OpenGLES.key

第7章 レンダリング

第7章 レンダリング

PowerPoint Presentation

Presentation

OpenGL & GLUTの基本関数の説明

_TJ…X…g†[…fi_0216

libaux.dvi

IPSJ SIG Technical Report Vol.2010-MPS-77 No /3/5 VR SIFT Virtual View Generation in Hallway of Cybercity Buildings from Video Sequen

Presentation

コンピュータグラフィックスS 演習資料

OpenGL GLSL References Kageyama (Kobe Univ.) Visualization / 58

2009 3DCG : M DCG,,,, 3DCG 2D 3DCG 2D 3DCG 3DCG

WebGL OpenGL GLSL Kageyama (Kobe Univ.) Visualization / 57

2 2 2 OpenGL (R,G,B,A) 2.1 OpenGL (x y) width height pixels void glreadpixels(glint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum t

2 2 2 OpenGL (R,G,B,A) 2.1 OpenGL (x y) width height pixels void glreadpixels(glint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum t


<91818C E90B690EA97708CF696B188F58D758DC0838A815B83742E706466>

2 2 GLUI 2 GLUI 2.1 GLUI GLUI OpenGL OpenGL glut OpenGL glut C++ Linux, Windows (Visual C++, gcc), Macintosh glut glut GUI glut GUI CG glmultmatrix()

/*p7-1-1*/

floating horizon algorithm 1 DEM [ 01] [Luebke01] LDI Layered Depth Image [Shade98] DEM Digital Elevation Model Height field

JAPLA研究会資料 2010/4/24

1 3DCG [2] 3DCG CG 3DCG [3] 3DCG 3 3 API 2 3DCG 3 (1) Saito [4] (a) 1920x1080 (b) 1280x720 (c) 640x360 (d) 320x G-Buffer Decaudin[5] G-Buffer D


CABIN CABIN CABIN CABIN CABIN CABIN

津村漢方雑誌表紙_ol.ai

i GPU GPU GPU GPU CPU Radeon X800 Pro 3.2 α

TOOLS for UR44 Release Notes for Windows

ProVisionaire Control V3.0セットアップガイド

3 3 3 Knecht (2-3fps) AR [3] 2. 2 Debevec High Dynamic Range( HDR) [4] HDR Derek [5] 2. 3 [6] 3. [6] x E(x) E(x) = 2π π 2 V (x, θ i, ϕ i )L(θ

boost_sine1_iter4.eps

1 1. Program 1 OpenCV (OpenCV Sample001) 1 /* 2 - > - > - >VC++ 3 ( ) 4 C:\opencv\build\include 5 ( ) 6 C:\opencv\build\x86\vc10\lib 7 - > - > - > - >

dTVIIman.PDF

proc.dvi

Kageyama (Kobe Univ.) / 41

2_05.dvi

h23w1.dvi

情報処理学会研究報告 IPSJ SIG Technical Report Vol.2014-CVIM-190 No /1/24 RGB-D *1 *1 *1 Relighting with Dynamic Light Environments Using an RGB-D Camera

Miyazaki-3DForum dvi

Silhouette on Image Object Silhouette on Images Object 1 Fig. 1 Visual cone Fig. 2 2 Volume intersection method Fig. 3 3 Background subtraction Fig. 4

mnal_HDR4ex_5ex.pdf

HPC pdf

高等学校学習指導要領

高等学校学習指導要領

xx/xx Vol. Jxx A No. xx 1 Fig. 1 PAL(Panoramic Annular Lens) PAL(Panoramic Annular Lens) PAL (2) PAL PAL 2 PAL 3 2 PAL 1 PAL 3 PAL PAL 2. 1 PAL

Vol. 44 No. SIG 9(CVIM 7) ) 2) 1) 1 2) 3 7) 1) 2) 3 3) 4) 5) (a) (d) (g) (b) (e) (h) No Convergence? End (f) (c) Yes * ** * ** 1

01.ai

本文/年次報告  67‐107

32号 701062/きじ1

10西宮市立中央病院/本文

北九州高専 志遠 第63号/表紙・表4

特別プログラム

Ł\”ƒ

報告書(第2回NGO‐JICA)/はじめに・目次

P-12 P P-14 P-15 P P-17 P-18 P-19 P-20 P-21 P-22

ニューガラス100/100目次

untitled


CW3_A1083D05.indd

program08.pdf

Web Social Networking Service Virtual Private Network 84

セゾン保険_PDF用.indd

U400 U300 U300R MP3/WMA/WAV CD My-Kenwood My-Kenwood JVC KENWOOD Corporation B5A (JN)

TA TA TA abcdefgh abcdefgh C PC Wii bluetooth 2.2 Bluetooth USB Princeton PTM-UBT3S 1 1

-2-

Microsoft PowerPoint _秀英体の取組み素材(予稿集).ppt

endo.PDF


2

IPSJ SIG Technical Report Vol.2009-DPS-141 No.20 Vol.2009-GN-73 No.20 Vol.2009-EIP-46 No /11/27 1. MIERUKEN 1 2 MIERUKEN MIERUKEN MIERUKEN: Spe

1 48

01.eps


. 61 5,000 5, ,

Input image Initialize variables Loop for period of oscillation Update height map Make shade image Change property of image Output image Change time L

HIS-CCBASEver2

untitled

siggraphasia2018visconf.key

untitled

IPSJ SIG Technical Report Vol.2013-CVIM-187 No /5/30 1,a) 1,b), 1,,,,,,, (DNN),,,, 2 (CNN),, 1.,,,,,,,,,,,,,,,,,, [1], [6], [7], [12], [13]., [

GPGPU

2006 3D M

Microsoft Word - Meta70_Preferences.doc

SICE東北支部研究集会資料(2004年)

Honda 3) Fujii 4) 5) Agrawala 6) Osaragi 7) Grabler 8) Web Web c 2010 Information Processing Society of Japan

untitled


Study on Application of the cos a Method to Neutron Stress Measurement Toshihiko SASAKI*3 and Yukio HIROSE Department of Materials Science and Enginee

main.dvi

10.02EWE51号本文

607_h1h4_0215.indd

2/13

2003/3 Vol. J86 D II No Fig. 1 An exterior view of eye scanner. CCD [7] CCD PC USB PC PC USB RS-232C PC

HardCopy IIIデバイスの外部メモリ・インタフェース

I117 II I117 PROGRAMMING PRACTICE II DEBUG Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara

橡SysAbst.PDF

1 Kinect for Windows M = [X Y Z] T M = [X Y Z ] T f (u,v) w 3.2 [11] [7] u = f X +u Z 0 δ u (X,Y,Z ) (5) v = f Y Z +v 0 δ v (X,Y,Z ) (6) w = Z +

DICOM Conformance Statement Carino

DEIM Forum 2012 E Web Extracting Modification of Objec

謗域・ュ逕ィppt

Transcription:

Advanced Graphics Programing Techniques Using OpenGL Section 6 Texture Mapping (page 40 77) 1

6 Texture Mapping(1) 2

6 Texture Mapping(2) ( ) ( ) OpenGL 3

6.1 Texture Basics 4

6.1.1 The Texture Image(1) (texel: texture elements) 1D, 2D, 3D(OpenGL1.2), 4D(SGI ) glteximage{1, 2, 3}D OpenGL TIFF, JPG 5

6.1.1 The Texture Image(2) glcopyteximage2d 2 6

6.1.1 The Texture Image(3) (OpenGL1.1) -> GL_LUMINANCE 16 -> GL_RGB4 7

6.1.2 Texture Coordinates(1) 1. 2. 3. 4. 8

6.1.2 Texture Coordinates(2) 3 (s, t, r, q) s t r, q 9

6.1.2 Texture Coordinates(3) [0.. 1] [0.. 1] (clamp): [0.. 1] ( ) (repeat): ( ) OpenGL1.2 clamp to edge 10

6.1.2 Texture Coordinates(4) Q. A. ( ) 3D VRML Wavefront OBJ 3D 11

6.1.2 Texture Coordinates(5) Sloan, Weinstein, Brederson[90] (intrinsic texture properties) (user-guided highlights) importance map 12

6.1.3 Texture Coordinate Generation and Transformation OpenGL ( texgen) ( ) 4x4 13

6.1.4 Filtering(1) ( ) 14

6.1.4 Filtering(2) OpenGL Magnification(1 ) Minification(1 ) ( ) 15

6.1.4 Filtering(3) Magnification 4 Minification 4 ( 8 ) SGIS_texture_filter4 4x4 16

6.1.4 Filtering(4) (1) Level-of-Detail(LODs) ( 0) 1x1 17

6.1.4 Filtering(5) (2) glubuild{1,2,3}dmipmaps GLU 18

6.1.4 Filtering(6) (3) OpenGL LODs ( ) (selecting) OpenGL LOD 19

6.1.4 Filtering(7) (4) OpenGL Disable (OpenGL1.0, 1.1) GLU 20

6.1.5 Texture Environment(1) (gltex-env 21

6.1.5 Texture Environment(2) GL_MODULATE GL_REPLACE( ) GL_DECAL GL_BLEND (imcoming) 22

6.1.6 Texture Objects(1) OpenGL texture objects (OpenGL1.1) 23

6.1.6 Texture Objects(2) ( ) ( ) 24

6.1.6 Texture Objects(3) 32bit glgentexures ( ) GL_TEXTURE_{1,2,3}D glbindtextures (bind) 25

6.1.6 Texture Objects(4) glteximage, gltexparameter, glgettexparameter, glgettexlevelparameter, glgettexim-age (1D,2D,3D) 26

6.1.6 Texture Objects(5) glbindtexture 27

6.1.6 Texture Obejcts(6) : 3 1 28

6.2 Multitexture(1) OpenGL (state) 29

6.2 Multitexture(2) Quake Unreal (section 10.2) ( 2 ) 30

6.2 Multitexture(3) ARB_multitexture (OpenGL1.2.1) Architecture Review Board(ARB) ARB OpenGL OpenGL 31

6.2.1 Multitexture API Overview(1) : 2D 0 1D 1 glactivetexturearb(gl_texture0_arb); glenable(gl_texture_2d); glactivetexturearb(gl_texture1_arb); glenable(gl_texture_1d); 32

6.2.1 Multitexture API Overview(2) glactivetexturearb gltexgen glteximage2d gltexparametergldisable glgetintegerv glmatrixmode glpushmatrix glpopmatrix 33

6.2.1 Multitexture API Overview(3) glgetintegerv GL_MAX_TEXTURE_UNITS_ARB 2 32 34

6.2.1 Multitexture API Overview(4) glmultitexcoord2farb(gl_texture0_arb, s0, t0); glmultitexcoord4farb(gl_texture1_arb, s1, t1, r1, q1); glmultitexcoord1iarb(gl_texture2_arb, s2); glvertex3f(x, y, z); 35

6.2.1 Multitexture API Overview(5) (vertex arrays) glclientactivetexturearb(gl_texture0_arb); gldisableclientstate(gl_texture_coord_array); glclientactivetexturearb(gl_texture1_arb); gltexcoordpointer(2, GL_FLOAT, 0, tex_array_ptr); glenableclientstate(gl_texture_coord_array); 36

6.2.1 Multitexture API Overview(6) (state) push pop push pop glpushattrib glpopattrib glpushclientattrib glpopclientattrib 37

6.2.2 Multitexture Texture Environments EXT_multitexture (incoming) 38

6.3 Merging Textures with Specular Highlights(1) EXT_separate_specular_color color sum 39

6.3 Merging Textures with Specular Highlights(2) (OpenGL1.2) gllightmodeli(gl_light_model_color_co NTROL, GL_SEPARATE_SPECULAR_COLOR); gllightmodeli(gl_light_model_color_co NTROL, GL_SINGLE_COLOR); 40

6.3 Merging Textures with Specular Highlights(3) color sum (secondary color) Disable 41

6.3 Merging Textures with Specular Highlights(4) EXT_secondary_color glsecondarycolor3fext gldisable(gl_lighting); glenable(gl_color_sum_ext); /* enable color sum with explicit secondary color */ glcolor4f(0, 0.3, 0.5); /* explicit primary color (RGBA) */ glsecondarycolor3fext(1, 1, 0.8); /* explicit secondary color (RGB) */ 42

6.4 Texture Borders and Tiling(1) OpenGL ( ) OpenGL 43

6.4 Texture Borders and Tiling(2) OpenGL 1 44

6.4 Texture Borders and Tiling(3) : 3 4 45

6.4 Texture Borders and Tiling(3) 0.0 or 1.0 50% 46

6.5 Mipmap Generation(1) glubuild2dmipmaps ( ) 47

6.5 Mipmap Generation(2) Mitchell and Netravali (family) ( ) 48

6.5 Mipmap Generation(3) GLU (LOD 0) 2 2 49

6.5 Mipmap Generation(4) CPU OpenGL GL_LINEAR minification 1/4 ( ) LOD 1 50

6.6 Texture Map Limits(1) (vertualize) 51

6.6 Texture Map Limits(2) : 52

6.7 Anisotropic Texture Filtering(1) OpenGL minification (isotropic) s,t 53

6.7 Anisotropic Texture Filtering(2) minification footprint ( ) 1 s t footprint 54

6.7 Anisotropic Texture Filtering(3) t ( ) footprint 0 footprint 55

6.8 Paging Textures(1) 56

6.8 Paging Textures(2) 57

6.8 Paging Textures(3) 1. 2. 3. GL_LINEAR [0.0, 1.0] 58

6.8 Paging Textures(4) 1. 2. (s,t) 0 3.GL_SKIP_PIXELS GL_SKIP_ROWS glteximage2d 59

6.8.1 Texture Subloading(1) 60

6.8.1 Texture Subloading(2) GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T GL_REPEAT( ) 61

6.8.1 Texture Subloading(3) 1. 2. 3. GL_SKIP_PIXELS GL_SKIP_ROWS gltexsubimage 62

6.8.1 Texture Subloading(4) OpenGL (paged) 32 16 63

6.8.2 Paging Images in System Memory(1) (offset) 2 64

6.8.2 Paging Images in System Memory(2) 2 (roam) 65

6.8.3 Implementing High Resolution Textured Terrain(1) clip mapping(tanner, Migdal, and Jones [94]) SGI InfiniteReality SGIX_clipmap 32,768 x 32,768 clip map 66

6.9 Transparency Mapping and Trimming with Alpha(1) (matte) 1 0 GL_EQUALS 0 GL_LESS 0.05 67

6.9 Transparency Mapping and Trimming with Alpha(2) 0 68

6.9 Transparency Mapping and Trimming with Alpha(3) (trim) 69

6.10 Billboads(1) 70

6.10 Billboads(2) M r 0 1 0 Veye = M 1 0 r Vfront = ( 0,0,1) r Vright = ( 0,1,0) r r cos? = Veye V r r sin? = V V front ( ) eye right z R M up +y (MR) 71

6.10 Billboads(3) A v r r axis = Vup V r r cos? = Vup V v sin? = axis billboard billboard ( ) MAR z up +y 72

6.10 Billboads(4) ( ) A v r r axis = Vup V r r cos? = Vup V v sin? = axis r r Valignment = V alignment alignment billboard r ( V eye r V billboard r ) V eye 73

6.11 Rendering Text(1) 2D : : 74

6.11 Rendering Text(2) GL_INTENSITY GL_MODULATE e.g. 75

6.12 Texture Mosaicing e.g. 76

6.13 Texture Coordinate Generation gltexcoord OpenGL 2 OpenGL 77

6.14 Color Coding and Contouring(1) 1D 50 50-800 800-1000 5% 75% 20% 1D 78

6.14 Color Coding and Contouring(2) GL_REPEAT GL_OBJCT_LINEAR GL_EYE_LINEAR 79

6.16 Projective Textures OpenGL s,t s,t,r,q q w r 3D OpenGL r=0, q=1 80

6.16.1 How to Project Texture(1) 3 1. 2. ( or ) 3. glulookat,glfrustum,gluperspective 81

6.16.1 How to Project Texture(2) OpenGL 82

6.16.1 How to Project Texture(3) (NDC) x,y,z -1 1 ( s,t,r ) 83

6.16.1 How to Project Texture(4) NDC NDC s,t 1/2 1/2 84

6.16.1 How to Project Texture(5) glmatrixmode(gl TEXTURE) glloadidentity( )( ) gltranslatef(.5f,.5f, 0.f) glscalef(.5f,.5f, 1.f) ( NDC ) (glfrustum ) (glulookat ) 85

6.17 Enviroment Mapping(1) OpenGL (spherical) 1 86

6.17 Enviroment Mapping(2) GL_SPHERE_MAP ( ) Phong section 10.4 11.2.1 87

6.18 Image Warping and Dewarping 88

6.19 3D Textures s, t, r [0.. 1] 2D 89

6.19.1 Using 3D Textures 90

6.21 Procedural Texture Generation (filtered noise functions) 91

6.21.1 Filtered Noise Function(1) ( -1 1) 1 92

6.21.1 Filtered Noise Function(2) value noise gradient noise gradient noise RenderMan shading language 93

6.21.2 Generating Noise Functions(1) OpenGL 94

6.21.2 Generating Noise Functions(2) value noise gradient noise 95

6.21.3 High Resolution Filtering 96

6.21.5 Other Noise Functions sparse convolution noise spot noise 97

6.21.6 Turbulence(1) OpenGL 1. glaccum(gl_load, 1.0); 2. glaccum(gl_add, -0.5); 3. glaccum(gl_mult, 2.0); 4. glaccum(gl_return, 1.0); 5. 6. glaccum(gl_return, -1.0); 7. GL_ONE step 5 98

6.21.6 Turbulence(2) GL_ADD GL_MULT [0, 1] [-1, 1] [0, 1] GL_RETURN 0 GL_RETURN 0 GL_RETURN GL_RETURN 99

6.21.7 Example: Image Warping 2D (distort) ( ) 100

6.21.8 Generating 3D Noise 2D 3D : 1 64x64x64 r=0.0, r=1.0 2 0 1 62 101

6.21.9 Generating 2D Noise to Simulate 3D Noise 2D 2D 2D spot noise 2D 3D 102

6.21.10 Trade-offs Between 3D and 2D Techniques 3D 3D 2D 103

Reference SIGGRAPH '99 Cources Advanced Graphics Programming Techniques Using OpenGL Lighting and Shading Techniques for Interactive Applications http://reality.sgi.com/blythe/sig99/ 104