Brain Dump

Texture Mapping

Tags
computer-graphics

Applies a pattern of colour to an object. The challenge of texture mapping is:

[see page 6, [Projection](COM3503-w05-textures-01)] ([Sampling](/brain/20201105142051-sampling/)) - Given a pixel from a texture where should this pixel be on an objects surface.

2D texture mapping pastes a bitmap onto the surface of an object. 3D texture mapping is like having a pattern/image and then carving an object onto it.

Textures can add [see page 4, detail] to otherwise simple objects. Even reacting to the surface of an object and normals to add shadow. You can even [see page 38, animate] textures. You can even [see page 22, combine] texture maps.

2D vs 3D

See [see page 21, comparison] to 2D texture-mapping. Highlights:

  • It's difficult to apply to deformed objects. We need to keep track of both deformed and undeformed coordinates (using the undeformed for noise-lookup and deformed for texture lookup).
  • 2D texture-mapping is awkward for curving surfaces (anywhere where there's a large change in pixels over a short area).