Texture Mapping: File and Synthetic
· Increase realism
· Original idea: paste image to fake complexity
· “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
· ST, normalized: ranges from 0 to 1
· Top-left as origin (convention)
· ST to texel mapping
· XYZ defining geometric shape
· Need a new system for establishing correspondence with image
· UV
o UV on rectangle
· The actual mapping
· Our implementation: covers the entire primitive
· Maya: texture placement
o Consider how to implement this
· 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
· 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)
· Most important primitive of all!!
· Barycentric coordinate system
o How to intersect with a ray
o How to compute UV
· What is involved
· ToyRayTracer implementation
· As a way of increasing complexity
· Look up for any of the parameters!!
· 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:
· Perspective correctness
· Sampling and filtering requirements
· Hierarchy of file textures
· Algorithmic:
o Checkers
o Grid
· Based on existing functions:
o Sinusoidal
o Ramp
· Based on Noise
· Perlin’s ideas
· The noise function
· Terbulance function from noise
· Marble
· Blinn’s problem with Orange!
· Idea:
· Advantage:
o Looks very good
· Disadvante:
o Silhouette looks wrong
· 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