Paper Summaries Any takers? Texture Mapping Logistics One more - - PDF document

paper summaries
SMART_READER_LITE
LIVE PREVIEW

Paper Summaries Any takers? Texture Mapping Logistics One more - - PDF document

Paper Summaries Any takers? Texture Mapping Logistics One more announcement Electronic Arts (EA) is coming to RIT. Job related news Looking for a few (actually more than a few) good Co-op orientation gaming programmers


slide-1
SLIDE 1

1

Texture Mapping

Paper Summaries

  • Any takers?

Logistics

  • Job related news

– Co-op orientation

  • Friday, Sept 16th 12:00 – 1:30pm 70-1400
  • Friday, Oct 14th 1:00 – 2:30pm Eastman Aud.

– Career Fair

  • Wednesday, Sept 28th
  • 11am – 4pm
  • Gordon Field House

– EA Job offer

One more announcement

  • Electronic Arts (EA) is coming to RIT.

– Looking for a few (actually more than a few) good gaming programmers – EA Company Presentation

  • Tuesday, October 4th
  • 6-7:30pm
  • Golisano auditorium

– Interviews

  • Wednesday, October 5th (Career Center)
  • SIGN UP IF INTERESTED!!!

Assignments

  • Checkpoint 2

– Due today.

  • Checkpoint 3

– Due Thursday – Roundoff error!

  • Checkpoint 4 / RenderMan

– To be given Thursday

Projects

  • Approx 17 projects
  • Listing of projects now on Web
  • Presentation schedule

– Presentations (20 min max) – Last 3 classes (week 10 + finals week) – Sign up

  • Email me with 1st , 2nd , 3rd choices
  • First come first served.
slide-2
SLIDE 2

2

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

Illumination Models

  • Illumination model - function or algorithm used

to describe the reflective characteristics of 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
slide-3
SLIDE 3

3

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

Texture Mapping

  • Key to texture mapping is parameterization

– 3D geometry must be expressed as a function

  • f 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

slide-4
SLIDE 4

4

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

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
slide-5
SLIDE 5

5

Projector function – bicubic surfaces

Watt

Projector function

  • Texture Mapping Applets

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

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 – Applying Transformation

⎟ ⎟ ⎟ ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎝ ⎛ = ⎟ ⎟ ⎟ ⎟ ⎟ ⎠ ⎞ ⎜ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ 1 Matrix n Translatio Matrix Rotation Matrix Projection 1 n v u z y x

Foley/VanDam(745)

slide-6
SLIDE 6

6

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!

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

slide-7
SLIDE 7

7

Texture mapping

  • Texture Map Aliasing Applet

http://www.nbb.cornell.edu/neurobio/land/ 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 Texture Mapping

  • Mipmaps

Texture pipeline

  • Break

When we last left our hero

slide-8
SLIDE 8

8

Value transform function

  • Texture maps need not be just plain old

RGB.

  • Texture == data associated with an object

– 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

  • bject

Polygon remains physically flat, but appears bumpy

Jim Blinn

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
slide-9
SLIDE 9

9

Bump Mapping-Theory Bump Mapping

  • Perlin Dnoise example

Normal += Dnoise (point)

[Perlin85]

Texture Mapping

  • Bump Mapping

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

slide-10
SLIDE 10

10

Environment Mapping Environment Mapping

spherical Cube map

Texture Mapping

  • Environment mapping

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.

  • Demo
slide-11
SLIDE 11

11

Texture Mapping

  • Static

– Texture map image is taken under a single lighting condition – Q: What happens when lighting conditions of 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

Texture pipeline

  • Finally obtained data is applied in

illumination equation.

Layered Texture Mapping Layered Texture Mapping

  • Applet

http://users.interfriends.net/maurid/Bump Mapping.htm

Multipass Texture Rendering

  • Multiple textures for multiple parts of

illumination model rendered on multiple passes.

  • Modern hardware supports up to 10 passes
  • n a single frame.
slide-12
SLIDE 12

12

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

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?