Texture Mapping

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/22

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

23 Terms

1
New cards

What is texture mapping?

A method of adding surface details to a 3D model to improve realism where the mesh itself and additional lighting is not sufficient.

2
New cards

What is the mapping process?

The process of associating 2D texture image information to a 3D surface. Technically, mapping is the process of identifying the correspondence between a texel and a screen pixel (fragment).

3
New cards

What is a texture image?

Also called an ‘atlas’, a texture image often contains several sub-images which show the sides of objects painted to appear more detailed. Texture maps are usually 1024 × 512 pixels, occupying 16 MB of memory.

4
New cards

What are the four steps of the mapping process?

  1. We first use code to paint the image onto a texture image - a 2D array of colour values called texels.

  2. We assign (s, t) texture coordinates to every vertex with object coordinates (x, y, z, w).

  3. We use an interpolated (s, t) for texel lookup at each pixel locations and retrieve the colour value.

  4. We then modify the colour value.

5
New cards

What is the parametric coordinate system?

Mapped by (u, v), this is a logical coordinate system for processing the surface and the internal space of a 3D object in 2D, like in a net or flattened version of itself. This will be placed on top of the texture image in (s, t) texture coordinates for texture mapping.

6
New cards

What are two types of texture mapping for simple shapes? When can we use these techniques?

  • Forward texture mapping

  • Inverse texture mapping

We use these techniques when we are trying to map an image directly onto the image to be rendered, not to the object.

7
New cards

What is forward texture mapping? What is the problem with this method?

When we compute the 3D positions of texture points (find texture coordinate, map to object), and project them onto the image plane.
x = x(s,t), y = y(s, t), z = z(s, t)
Adjacent texture points may project onto non-adjacent image points, thus creating a non-coloured area.

8
New cards

What is inverse texture mapping?

We select every pixel in the image plane and identify which point of the texture image is projected there (find vertices visible, map to texture image).
s = s(x, y, z), t = t(x, y, z).
This makes sure every object point has a corresponding texel with the visibility of the object considered.

9
New cards

What are complicated shapes that we can break down using a UV map? (3)

  • cylindrical map

  • spherical map

  • box map

10
New cards

Generally, whats the idea if you have a complex image?

You break it down into flat shapes and go from there.

11
New cards

What is cylindrical mapping?

Where s = u and t = v, we map a rectangle around the shaft of the cylinder.

12
New cards

What is spherical mapping?

We can use a parametric sphere but we must decide where the distortion is applied.

13
New cards

What is box mapping?

The best mapping! It’s basically an orthographic projection.

14
New cards

What are the other mapping techniques that we need to know! (7)

  • MIP-mapping

  • Normal mapping

  • bump mapping

  • displacement mapping

  • environment mapping

  • light mapping

  • fog mapping

15
New cards

What is MIP-mapping?

MIP-mapping is the process of using image pyramids to precompute more coarse versions of a texture to avoid aliasing and over-sampling problems. We can store a whole pyramid in a single block of memory, so this is very useful.

16
New cards

What is normal mapping?

This is when we encode normal vectors with RGB displacing geometric normals on local coordinates as an image to be mapped onto a low poly model so it appears more detailed than its actual geometry suggests - applying lighting to this surface produces a visually 3D effect. There is no extra performance overhead from this, but it makes models look much better.

17
New cards

What is bump mapping?

This is when we treat a texture as a height function encoded with greyscale and compute the normal from partial derivatives. The heights encode the amount by which to perturb the (u, v) parametric coordinates of the object’s surface. This is harder to implement than normal mapping, but easier to specify.

18
New cards

What is displacement mapping?

This is when we use a texture map to move actual surface points on a polygon model. The geometry must all be displaced, despite visibility, so this takes a lot of processing power and complex implementation.

19
New cards

What is environment mapping?

When we simulate reflections using the direction of the reflected ray to index a spherical texture map at infinity, assuming all reflected rays begin at the same point. You can also use a cube for this, in an orthographic projection of the environment.

20
New cards

What is light mapping?

Realistic lighting can be achieved through expensive calculations during pre-process to avoid runtime overhead. These expensive calculations involve using a light map after diffuse and ambient reflections are calculated, and they show how light interacts with surface more specifically than creating directional/point light objects specifically.

21
New cards

What is fog mapping?

The process of dynamically modifying light-maps which put fog objects in the scene - computing where they intersect with geometry and what their density is.

Thus a fog map is just a light map with an extra texture.

22
New cards

What are the filters we can apply to texture maps, and what do they do?

  • gl.TEXTURE_MAG_FILTER - magnification, one texel to many pixels.

  • gl.TEXTURE_MIN_FILTER - minification, many texels to one pixel.

23
New cards

What is texture wrapping?

Texture wrapping describes the behaviour of the sampler when the texture coordinates fall outside the range of 0 and 1. Common commands are CLAMP_TO_EDGE, REPEAT and MIRRORED_REPEAT.