cg9_2013 - Computer Graphics Lecture 9 Environment mapping...

Info icon This preview shows pages 1–12. Sign up to view the full content.

Computer Graphics Lecture 9 Environment mapping, Mirroring
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Today Environment Mapping •Introduction •Cubic mapping •Sphere mapping •refractive mapping Mirroring •Introduction •reflection first •stencil buffer •reflection last
Image of page 2
+,Environment Mapping % ! ()Background Many objects in the world are glossy or transparent ● .Glossy objects reflect the external world ● The world is refracted through the transparent objects ● Important to make the virtual scene to appear realistic
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Example Terminator II
Image of page 4
+,Environment Mapping% ! ()Background ±°² Precisely simulating such phenomena is computationally costly •Requires ray tracing³ which can be expensive •Tracking the rays and finding out where they collide³ further doing a lighting computation there
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Environment Mapping Simple yet powerful method to generate reflections Simulate reflections by using the reflection vector to index a texture map at "infinity". The original environment map was a sphere [by Jim Blinn ’76]
Image of page 6
Cubic Mapping The most popular method The map resides on the surfaces of a cube around the object align the faces of the cube with the coordinate axes
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Procedure During the rasterization, for every pixel, 1. +0HR]QJTZZ]QHRYYLV YYOYLV WWLVMW]QLVJTYYPZ`T_S [[[LVJTYY`TWW ?9 ZZXXPZ_SNX YYOYLV JTHR^RLVWWHR ±PZ_SJTPZKULV_SYY° [[[LVJTYY`TWW HR_SKU YYOYLV _S`TWW^RHR]Q [[[LVJTYY`TWW `TMW YYOYLV `TISQ[OLVJTYY ;5 2. Select the face of the environment map and the pixel on the face according to ?9 3. Colour the pixel with the colour of the environment map Look up the environment map just using ?9 Do not take into account the 3D position of the reflection point
Image of page 8
Procedure During the rasterization, for every pixel, 1. Calculate the reflection vector ?9 using the camera (incident) vector and the normal vector of the object ;5 ²³ @:DLV]QLVJTYY YYOYLV MWHRJTLV `TMW YYOYLV LV_S[[[PZWW`T_S^RLV_SYY ^RHRUU HR_SKU YYOYLV UUPZ]]]LV]Q `T_S YYOYLV MWHRJTLV HRJTJT`TWWKUPZ_SNX YY`T ?9 3. Colour the pixel with the colour of the environment map Look up the environment map just using ?9 Do not take into account the 3D position of the reflection point
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Procedure During the rasterization, for every pixel, 1. Calculate the reflection vector ?9 using the camera (incident) vector and the normal vector of the object ;5 2. Select the face of the environment map and the pixel on the face according to ?9 3. Colour the pixel with the colour of the environment map Look up the environment map just using ?9 Do not take into account the 3D position of the reflection point
Image of page 10
Calculating the reflection vector Normal vector of the surface : N Eye Ray : I Reflection Ray: R N,I,R all normalized : ($$ ° 6 ± 6 ² 01 ³´01 The texture coordinate is based
Image of page 11

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 12
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '14
  • 3D computer graphics, stencil buffer, Refractive Environment Mapping, reflection vector

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern