1
Texture Mapping
Logistics
Checkpoint 2
Mostly graded. Note on grading -- Regaining points
Checkpoint 3
Due Monday
Project Proposals
All should have received e-mail feedback.
Logistics Checkpoint 2 Mostly graded. Note on grading -- Regaining - - PDF document
Texture Mapping Logistics Checkpoint 2 Mostly graded. Note on grading -- Regaining points Checkpoint 3 Due Monday Project Proposals All should have received e-mail feedback. 1 Logistics Checkpoint 2 Another
1
Checkpoint 2
Mostly graded. Note on grading -- Regaining points
Checkpoint 3
Due Monday
Project Proposals
All should have received e-mail feedback.
2
Checkpoint 2
Another means for finding equation of a
Using determinants. See:
http://local.wasp.uwa.edu.au/~pbourke/geometry/planeeq/
Grad students
Please send topic of grad report.
3
Proposals
Proposal due before break (please get
Feedback on proposals -- mycourses Web sites please. 23 projects (4-5 more expected)
Presentations:
Dates:
Week 9: Wed, Feb 13 (sorry Radiosity) Week 10: Mon, Feb 18 Week 10: Wed, Feb 20 Finals Week / Week 11: Mon, Feb 25
15 minutes / presentation Schedule on Web by next class Please send me choice of time/day
4
camera (captures light) synthetic image camera model (focuses simulated lighting)
processing
photo processing tone reproduction real scene 3D models Photography: Computer Graphics: Photographic print
Bi-directional Reflectance Function
At a given point, gives relative reflected illumination in any direction with respect to incoming illumination coming from any direction
5
Illumination model - function or algorithm
More accurately, function or algorithm used
specular diffuse ambient
i k i i s i i i d a a
e
6
What if Phong (or other) Illumination
Texture Mapping – use an image Procedural Shading – program your own
Developed in 1974 by Ed Catmull,
Goal: Make Phong shading less plastic
7
A means to define surface
Mapping a 2D image onto a 3D surface Coordinate spaces in texture mapping
Texture space (u, v) Object space (xo,yo,zo) Screen space (x, y)
Watt
8
Key to texture mapping is
3D geometry must be expressed as a
Examples:
Planar Spherical Bi-cubic patch Cylindrical
parameterization projection
9
Akenine-Moller / Haines
Akenine-Moller / Haines
10
Converts 3D point in object space
Examples:
Spherical mapping Cylindrical mapping Planar mapping Parametric surface mapping
Spherical Mapping
11
Texture is like a rubber sheet stretched to fit model
Cylindrical mapping
12
Spherical mapping
Bi-cubic surfaces
13
Watt
Texture Mapping Applets
14
Converts from texture parameter space
Controls the way an image is applied Examples:
Direct mapping Use a portion of an image Apply transforms Out of range transforms
15
Repeat (tile) Mirror (tile) clamp border
16
Aliasing
Sampling – images are discrete, not
Resolution of sampled space (in this case
Aliasing- point sampling in middle of pixel - need
17
Watt
Aliasing -because of interpolation and
aliased image anti-aliased image
18
Point sample at higher resolution (sometimes
Nearest
Pick the closest texel
Linear
Take an average of surrounding texels
Mip-Mapping
Multiple textures of the same image
Use low pass filter before sampling Can sometimes use stochastic sampling to
Texture Map Aliasing Applet
19
Mipmaps
Pre-calculate your texture map at many
resolutions (or layers)
Store all “texture layers” in a single image. Use “appropriate” layer when performing
rendering, interpolating between levels as required
Mip == “multum in parvo”
Latin for “many things in a small space”
Native support in hardware.
20
Mipmaps
Break
21
Texture maps need not be just plain old
Texture == data associated with an
Stored in a 2D array of texels
Value transform function
Transforms data into value usable by the
22
Texel data interpretation:
Normal displacement – Bump Mapping Transparency Mask – Alpha Mapping Reflection – Environment Mapping Illumination – Light Mapping Specular component – Gloss Mapping Lighting intensities – Radiance Mapping
Jim Blinn
23
Perturbing surface normal Texture map represents displacements from the
Use perturbed normal in illumination model
24
If your eyes see light and dark bumps Flat surfaces reflect more light Bumpy surfaces reflect less
25
Perlin Dnoise example
[Perlin85]
Bump Mapping
26
Used to control the transparency. Example:
3dimpact.com
Create an image, representing the reflection of
Use surrounding sphere or box, image is texture
Poor-man’s ray tracing - cheaper
27
Not associated with a particular object but
Specular Reflection – indexed by reflected ray Diffuse - by surface normal Transparency – refracted ray direction
28
spherical Cube map
Environment mapping
29
Texture map that describes illumination
flipcode.com
30
The texture that controls the specular
Modulates the the specular reflection
31
Static
Texture map image is taken under a single
Q: What happens when lighting conditions
A: let’s go to the video tape
Provides approximated radiance values,
Radiance map not only for the distant
Radiance in map used in global
Technique used in Fiat Lux
32
Finally obtained data is applied in
33
Applet
Multiple textures for multiple parts of
Modern hardware supports up to 10
34
Quake III Engine
Passes 1-4: accumulating bump map Pass 5: diffuse lighting Pass 6: base texture Pass 7: Specular Pass 8: emissive lighting Pass 9: volumetric effects Pass 10: screen flashes
Texturing Pipeline Advantages of texture mapping
Easy way to add complexity to a scene Hardware support
Issues:
Aliasing Limited resolution (zoom in DOOM effect) Static image
35
In this lecture, we assumed that
Textures can also be generated on the
But that’s for next time…
Questions?