Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Lecture Slides on Texture Mapping Application | CS 470, Study notes of Computer Graphics

Material Type: Notes; Professor: McGraw; Class: Introduction:Computer Graphics; Subject: Computer Science; University: West Virginia University; Term: Unknown 2006;

Typology: Study notes

Pre 2010

Uploaded on 07/31/2009

koofers-user-3vk-1
koofers-user-3vk-1 🇺🇸

10 documents

1 / 17

Toggle sidebar

Related documents


Partial preview of the text

Download Lecture Slides on Texture Mapping Application | CS 470 and more Study notes Computer Graphics in PDF only on Docsity! Computer Graphics CS 470 Computer Science and Electrical Engineering Dept. West Virginia University 6th November 2006 CS 470 (West Virginia University) Computer Graphics 6th November 2006 1 / 31 Outline 1 Texture Mapping Applications CS 470 (West Virginia University) Computer Graphics 6th November 2006 2 / 31 Texture Mapping Applications The Sky Cube Sky Cube (or Sky Box) Draw sky cube before anything else. I Can eliminate color buffer clearing. The sky won’t occlude anything else in the scene I Disable depth writes: glDepthMask(GL_FALSE); I Disable depth test. Always centered at camera position. I Get modelview matrix - zero the translation. Disable lighting, don’t send normals. The bottom face of the cube is not needed if there is a ground plane or terrain in the scene. CS 470 (West Virginia University) Computer Graphics 6th November 2006 7 / 31 Texture Mapping Applications Terrain Terrain using heightmaps Heightmap and terrain CS 470 (West Virginia University) Computer Graphics 6th November 2006 9 / 31 Texture Mapping Applications Terrain Terrain using heightmaps Textured terrain and sky box. CS 470 (West Virginia University) Computer Graphics 6th November 2006 11 / 31 Texture Mapping Applications Water Refraction : Snell’s law n1 sin(θ1) = n2 sin(θ2) Refraction is usually computed on the GPU as a texture lookup operation. CS 470 (West Virginia University) Computer Graphics 6th November 2006 17 / 31 Texture Mapping Applications Water Reflection : The Fresnel effect Fraction of light reflected depends on the angle of incidence. CS 470 (West Virginia University) Computer Graphics 6th November 2006 19 / 31 Texture Mapping Applications Water Reflection : Cube mapping The reflection effect is very common, and is now supported in core OpenGL. Additional texture targets: I GL_TEXTURE_CUBE_MAP I TEXTURE CUBE MAP POSITIVE X I TEXTURE CUBE MAP NEGATIVE X I and 4 more for each of the other cube faces Texture coordinate generation modes I GL_REFLECTION_MAP glBindTexture(GL_TEXTURE_CUBE_MAP, TexID); glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X,...); ... glEnable(GL_TEXTURE_CUBE_MAP); glEnable(GL_TEXTURE_GEN_S); glEnable(GL_TEXTURE_GEN_T); glEnable(GL_TEXTURE_GEN_R); glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP); glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP); glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP); // draw geometry CS 470 (West Virginia University) Computer Graphics 6th November 2006 21 / 31 Texture Mapping Applications Billboards Billboards CS 470 (West Virginia University) Computer Graphics 6th November 2006 27 / 31 Texture Mapping Applications Particles Particles Many physical phenomena are not well-represented by triangle meshes. Fire, smoke. Liquid splashes and sprays. Explosions, sparks, fireworks These things do not have well-defined boundaries, and evolve over time. CS 470 (West Virginia University) Computer Graphics 6th November 2006 29 / 31 Texture Mapping Applications Particles Particle Systems Implemented as animated billboards. Physically based motion Billboard size may change Texture animation may be used Usually alpha blended CS 470 (West Virginia University) Computer Graphics 6th November 2006 31 / 31
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved