r i i r r camera Computer 3D synthetic tone model - - PDF document

r i i r r camera computer 3d synthetic tone model
SMART_READER_LITE
LIVE PREVIEW

r i i r r camera Computer 3D synthetic tone model - - PDF document

Logistics Checkpoint 2 Texture Mapping Still grading Note on grading Checkpoint 3 Due Monday Project Proposals All should have received e-mail feedback. Logistics Projects Grad students Approx 26-28 projects


slide-1
SLIDE 1

1

Texture Mapping

Logistics

 Checkpoint 2

 Still grading…  Note on grading

 Checkpoint 3

 Due Monday

 Project Proposals

 All should have received e-mail feedback.

Logistics

 Grad students

 Please send topic of grad report.

Projects

 Approx 26-28 projects  Listing of projects now on Web  Presentation schedule

 Presentations (15 min max)  Last 4 classes (week 9 + week 10 + finals week)  Sign up

 Email me with 1st , 2nd , 3rd choices  First come first served.

Computer Graphics as Virtual Photography

camera (captures light) synthetic image camera model (focuses simulated lighting)

processing

photo processing tone reproduction real scene 3D models Photography: Computer Graphics: Photographic print

Remember this?

 Bi-directional Reflectance Function

) , , , (

r r i i r

f BRDF

  • =

At a given point, gives relative reflected illumination in any direction with respect to incoming illumination coming from any direction

slide-2
SLIDE 2

2 Illumination Models

 Illumination model - function or algorithm

used to describe the reflective characteristics

  • f a given surface.

 More accurately, function or algorithm used

to approximate the BRDF.

Phong Model

specular diffuse ambient

V) R ( N) S ( ) (

∑ ∑

  • +
  • +

=

i k i i s i i i d a a

e

L k L k L k V L

Question

 What if Phong (or other) Illumination

models aren’t good enough?

 Texture Mapping – use an image  Procedural Shading – program your own

Texture Mapping

 Developed in 1974 by Ed Catmull,

currently president of Pixar

 Goal: Make Phong shading less plastic

looking

Texture Mapping

 A means to define surface

characteristics of an object using an image

 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)

Texture Mapping

Watt

slide-3
SLIDE 3

3 Texture Mapping

 Key to texture mapping is

parameterization

 3D geometry must be expressed as a

function of 2 variables, u and v.

 Examples:

 Planar  Spherical  Bi-cubic patch  Cylindrical

Texture Mapping

texture space (u,v)

  • bject space (xo,yo, zo)

screen space (x,y)

parameterization projection

Texture pipeline

Akenine-Moller / Haines

Texture pipeline example

Akenine-Moller / Haines

Projector function

 Converts 3D point in object space

(x,y,z) to 2D point in texture parameter space (u,v)

 Examples:

 Spherical mapping  Cylindrical mapping  Planar mapping  Parametric surface mapping

Projector function

 Spherical Mapping

slide-4
SLIDE 4

4

Projector function – Spherical Mapping

Texture is like a rubber sheet stretched to fit model

Projector function

 Cylindrical mapping

Projector function

 Spherical mapping

Projector function

 Bi-cubic surfaces

Projector function – bicubic surfaces

Watt

Projector function

 Texture Mapping Applets

http://www.cs.brown.edu/exploratories/ freeSoftware/catalogs/texture_mapping. html

slide-5
SLIDE 5

5 Corresponder function

 Converts from texture parameter space

(u, v) to texel space.

 Controls the way an image is applied  Examples:

 Direct mapping  Use a portion of an image  Apply transforms  Out of range transforms

Texture Mapping - Direct Mapping Texture Mapping – Using a Portion of the Image

Texture Mapping – out of range

Repeat (tile) Mirror (tile) clamp border

Texture mapping

 Aliasing

 Sampling – images are discrete, not

continuous.

 Resolution of sampled space (in this case

texture map) is not fine enough

Texture mapping

 Aliasing- point sampling in middle of pixel - need

more!

slide-6
SLIDE 6

6 Texture Mapping – Aliasing

Watt

Texture Mapping

 Aliasing -because of interpolation and

perspective projection

aliased image anti-aliased image

Texture Mapping - Anti-aliasing

 Point sample at higher resolution (sometimes

very difficult)

 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

improve results

Texture mapping

 Texture Map Aliasing Applet

http://www.nbb.cornell.edu/neurobio/la nd/OldStudentProjects/cs490- 96to97/anson/TextureMappingApplet/

Texture Mapping

 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.

Mipmapping

slide-7
SLIDE 7

7 Texture Mapping

 Mipmaps

Texture pipeline

 Break

When we last left our hero Value transform function

 Texture maps need not be just plain old

RGB.

 Texture == data associated with an

  • bject

 Stored in a 2D array of texels

 Value transform function

 Transforms data into value usable by the

illumination model at the shading point

Value Transform functions

 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

Texture Mapping- Bump Mapping

  • Adds roughness to surfaces
  • Quick way to add detail to

an object

  • Polygon remains physically

flat, but appears bumpy

Jim Blinn

slide-8
SLIDE 8

8

Texture Mapping- Bump Mapping

 Perturbing surface normal  Texture map represents displacements from the

normal

 Use perturbed normal in illumination model

Texture mapping – Bump Mapping

Bump Mapping Theory

 If your eyes see light and dark  bumps  Flat surfaces reflect more light  Bumpy surfaces reflect less

Bump Mapping-Theory Bump Mapping

 Perlin Dnoise example

Normal += Dnoise (point)

[Perlin85]

Texture Mapping

 Bump Mapping

slide-9
SLIDE 9

9 Alpha Mapping

 Used to control the transparency.  Example:

3dimpact.com

Texture Mapping- Environment mapping

 Create an image, representing the reflection of

the world onto an object

 Use surrounding sphere or box, image is texture

map indexed by direction of reflection ray

 Poor-man’s ray tracing - cheaper

Texture Mapping- Environment mapping

 Not associated with a particular object but

with an imaginary surface surrounding the scene

 Specular Reflection – indexed by reflected ray  Diffuse - by surface normal  Transparency – refracted ray direction

Environment Mapping Environment Mapping

spherical Cube map

Texture Mapping

 Environment mapping

slide-10
SLIDE 10

10 Texture mapping

Reflection mapping

Light Mapping

 Texture map that describes illumination

(light sources)to apply

flipcode.com

Gloss Mapping

 The texture that controls the specular

reflection color.

 Modulates the the specular reflection

and the environment map.

Gloss Mapping

  • zone3d.net

Texture Mapping

 Static

 Texture map image is taken under a single

lighting condition

 Q: What happens when lighting conditions

  • f the scene doesn’t match that of your

texture?

 A: let’s go to the video tape

Texture Mapping – Radiance Maps

 Provides approximated radiance values,

not simply color info, as a texture.

 Radiance map not only for the distant

scene, but in reflections from objects.

 Radiance in map used in global

illumination solution

 Technique used in Fiat Lux

slide-11
SLIDE 11

11 Texture pipeline

 Finally obtained data is applied in

illumination equation.

Layered Texture Mapping Layered Texture Mapping

 Applet

http://users.interfriends.net/maurid/B umpMapping.htm

Multipass Texture Rendering

 Multiple textures for multiple parts of

illumination model rendered on multiple passes.

 Modern hardware supports up to 10

passes on a single frame.

Multipass Texture Render

 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

Summary

 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

slide-12
SLIDE 12

12 Summary

 In this lecture, we assumed that

textures were pre-generated and saved in a file

 Textures can also be generated on the

fly using a function or procedure…

 But that’s for next time…

 Questions?