Texture Mapping: File and Synthetic

1        Motivation

·         Increase realism

·         Original idea: paste image to fake complexity

2        Requirements

·         “Pasting” an image on geometry

·         In essence, mapping of image to geometry

·         Mapping: mathematically

·         Establishing of coordinate correspondence

o    Need coordinate on the image

o    New coordinate on the geometry

3        Coordinate System on an image

·         ST, normalized: ranges from 0 to 1

·         Top-left as origin (convention)

·         ST to texel mapping

4        New Coordinate system on Geometries

·         XYZ defining geometric shape

·         Need a new system for establishing correspondence with image

·         UV

o    UV on rectangle

5        Establishing the correspondence

·         The actual mapping

·         Our implementation: covers the entire primitive

·         Maya: texture placement

o    Consider how to implement this

6        Observations

·         To perform texture mapping: MUST have UV defined on primitives

o    So far, can only map on rectangles!

o    Need to define UV coordinate on Spheres to perform texture mapping!!

·         What to map?

o    Object color? Kd, or Ka?

o    How about other elements in the Phong Illumination model? E.g., shinningness?

o    Anything and everything can be texture mapped!

o    Show Maya examples

7        UV on Spheres

·         Spherical coordinate

o    Theta: zero to 360 (maps to U: 0 to 1)

o    Phi: zero to 180 (maps to V: 0 to 1)

·         Need to anchor reference positions, define

o    Pole: (0, 1, 0)

o    Equator: (1, 0, 0)

8        Intersection and UV on Triangles

·         Most important primitive of all!!

·         Barycentric coordinate system

o    How to intersect with a ray

o    How to compute UV

9        File Texture

·         What is involved

·         ToyRayTracer implementation

10  Texture Mapping and Illumination Equation

·         As a way of increasing complexity

·         Look up for any of the parameters!!

11  Types Texture Mapping

·         Colors: Ambient, Diffuse, Specular

·         Parameter: Transparency, Reflectivity

·         Geometry!

o    Displacement

o    Normal or Bump

·         Light intensity map

·         Light mapping on geometry:

o    Fake illumination

·         Run Maya to show example:

12  MP4

 

13  Quality of File Textures

·         Perspective correctness

·         Sampling and filtering requirements

14  MipMap pre-filter

·         Hierarchy of file textures

 

15  Synthesized Textures

·         Algorithmic:

o    Checkers

o    Grid

·         Based on  existing functions:

o    Sinusoidal

o    Ramp

·         Based on Noise

16  Perlin’s Noise

·         Perlin’s ideas

·         The noise function

·         Terbulance function from noise

·         Marble

17  Bump Map

·         Blinn’s problem with Orange!

·         Idea:

·         Advantage:

o    Looks very good

·         Disadvante:

o    Silhouette looks wrong

18  Bump Map Algorithm

 

19  Bump mapping implementation

·         For my bump map to look good:

o    Need a VERY CLEAN image as bump map

o    Need to create separate:

§  Color map for kdIndex

§  Bump map for nIndex

o    Look at the BumpMapTest in zMisc/ToyRayTracer/CommandFile