All Topics  
Bump mapping

 

   Email Print
   Bookmark   Link






 

Bump mapping



 
 
Bump mapping is a computer graphics
Computer graphics

Computer graphics are graphics created by computers and, more generally, the representation and manipulation of pictorial data by a computer....
 technique where at each pixel
Pixel

In digital imaging, a pixel is the smallest item of information in an image. Pixels are normally arranged in a 2-dimensional grid, and are often represented using dots, squares, or rectangles....
, a perturbation to the surface normal
Surface normal

A surface normal, or simply normal, to a Flatness is a vector which is perpendicular to that surface. A normal to a non-flat surface at a Point P on the surface is a vector perpendicular to the Tangent space to that surface at P....
 of the object being rendered
Rendering (computer graphics)

Rendering is the process of generating an image from a 3D model, by means of computer programs. The model is a description of three-dimensional objects in a strictly defined language or data structure....
 is looked up in a heightmap
Heightmap

In computer graphics, a heightmap or heightfield is a raster graphics used to store values, such as surface elevation data, for display in 3D computer graphics....
 and applied before the illumination calculation is done (see, for instance, Phong shading
Phong shading

Phong shading refers to a set of techniques in 3D computer graphics. Phong shading includes a model for the reflection of light from surfaces and a compatible method of estimating pixel colors by interpolation surface normals across rasterized polygons....
).






Discussion
Ask a question about 'Bump mapping'
Start a new discussion about 'Bump mapping'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Bump Map Demo Smooth
Orange Bumpmap
Bump Map Demo Bumpy
Bump mapping is a computer graphics
Computer graphics

Computer graphics are graphics created by computers and, more generally, the representation and manipulation of pictorial data by a computer....
 technique where at each pixel
Pixel

In digital imaging, a pixel is the smallest item of information in an image. Pixels are normally arranged in a 2-dimensional grid, and are often represented using dots, squares, or rectangles....
, a perturbation to the surface normal
Surface normal

A surface normal, or simply normal, to a Flatness is a vector which is perpendicular to that surface. A normal to a non-flat surface at a Point P on the surface is a vector perpendicular to the Tangent space to that surface at P....
 of the object being rendered
Rendering (computer graphics)

Rendering is the process of generating an image from a 3D model, by means of computer programs. The model is a description of three-dimensional objects in a strictly defined language or data structure....
 is looked up in a heightmap
Heightmap

In computer graphics, a heightmap or heightfield is a raster graphics used to store values, such as surface elevation data, for display in 3D computer graphics....
 and applied before the illumination calculation is done (see, for instance, Phong shading
Phong shading

Phong shading refers to a set of techniques in 3D computer graphics. Phong shading includes a model for the reflection of light from surfaces and a compatible method of estimating pixel colors by interpolation surface normals across rasterized polygons....
). The result is a richer, more detailed surface representation that more closely resembles the details inherent in the natural world. Normal mapping
Normal mapping

In 3D computer graphics, normal mapping is an application of the technique known as bump mapping. Normal mapping is sometimes referred to as "Dot3 bump mapping"....
 is the most commonly used bump mapping technique, but there are other alternatives, such as parallax mapping
Parallax mapping

Parallax mapping is an enhancement of the bump mapping or normal mapping techniques applied to textures in 3D rendering applications such as video games....
.

The difference between displacement mapping
Displacement mapping

Displacement mapping is an alternative computer graphics technique in contrast to bump mapping, normal mapping, and parallax mapping, using a texture mapping or heightmap to cause an effect where the actual geometric position of points over the textured surface are displaced, often along the Locally surface normal, according to the valu...
 and bump mapping is evident in the example images; in bump mapping, the normal alone is perturbed, not the geometry itself. This leads to artifacts in the silhouette of the object (the sphere still has a circular silhouette).

Bump mapping basics

Bump mapping is a computer graphics
Computer graphics

Computer graphics are graphics created by computers and, more generally, the representation and manipulation of pictorial data by a computer....
 technique that aims to make a rendered
Rendering (computer graphics)

Rendering is the process of generating an image from a 3D model, by means of computer programs. The model is a description of three-dimensional objects in a strictly defined language or data structure....
 surface look more realistic by modeling the interaction of a bumpy surface texture
Texture

Texture refers to the properties held and sensations caused by the external surface of objects received through the sense of somatosensory system....
 with lights in the environment. Bricks
Bricks

Bricks may refer to:* Brick, an artificial stone made by forming clay into rectangular blocks* Brick , a slang term for a device that cannot function due to internal failure...
 are a common bump mapped texture. Bump mapping does this by changing the brightness of the pixels on the surface in response to a heightmap
Heightmap

In computer graphics, a heightmap or heightfield is a raster graphics used to store values, such as surface elevation data, for display in 3D computer graphics....
 that is specified for each surface.

When rendering a 3D scene, the brightness and colour of the pixels on the screen are determined by the interaction of the specified 3D model
3D modeling

In 3D computer graphics, 3D modeling is the process of developing a Mathematics, wire frame model representation of any Three-dimensional space object via 3d computer graphics software....
 with lights in the scene. After the geometry
Geometry

Geometry arose as the field of knowledge dealing with spatial relationships. Geometry was one of the two fields of pre-modern mathematics, the other being the study of numbers....
 calculation determines that an object is visible and should be displayed, trigonometry
Trigonometry

Trigonometry is a branch of mathematics that deals with triangle s, particularly those plane triangles in which one angle has 90 degrees . Trigonometry deals with relationships between the sides and the angles of triangles and with the trigonometric functions, which describe those relationships....
 is used to calculate the 'geometric' surface normal
Surface normal

A surface normal, or simply normal, to a Flatness is a vector which is perpendicular to that surface. A normal to a non-flat surface at a Point P on the surface is a vector perpendicular to the Tangent space to that surface at P....
 of the object, defined as a vector
Vector

Vector may refer to:...
 at each pixel position on the object.

In the absence of bump mapping the geometric surface normal then defines how strongly the object interacts with light coming from a given direction using Phong shading
Phong shading

Phong shading refers to a set of techniques in 3D computer graphics. Phong shading includes a model for the reflection of light from surfaces and a compatible method of estimating pixel colors by interpolation surface normals across rasterized polygons....
 or a similar lighting algorithm. In essence, light traveling perpendicular
Perpendicular

In geometry, two line or plane , are considered perpendicular to each other if they form congruence adjacent angles angles . The term may be used as a noun or adjective....
 to the surface interacts with it most strongly while light parallel
Parallel

From Greek language: pa???????? Parallel may refer to:...
 to the surface does not interact with it at all and the surface appears black. After the initial geometry calculations, a coloured texture
Texture

Texture refers to the properties held and sensations caused by the external surface of objects received through the sense of somatosensory system....
 is often applied to the model to make the object appear more realistic but this has no effect on the bump mapping process.

After texturing, a calculation is performed at each pixel
Pixel

In digital imaging, a pixel is the smallest item of information in an image. Pixels are normally arranged in a 2-dimensional grid, and are often represented using dots, squares, or rectangles....
 on the object's surface:
  1. the renderer looks up the heightmap
    Heightmap

    In computer graphics, a heightmap or heightfield is a raster graphics used to store values, such as surface elevation data, for display in 3D computer graphics....
     corresponding to that position on the surface,
  2. then uses further trigonometry to calculate the surface normal of the heightmap,
  3. adds the bump map surface normal from step 2 to the geometric surface normal (also known as perturbing the surface normal) so that the normal points in a new direction
  4. calculates the interaction of the new 'bumpy' surface with lights in the scene using, for example, Phong shading


The result is a surface that appears to have real depth, is more detailed and appears more similar to objects in the real world. Bump mapping also ensures that the surface appearance changes as lights in the scene move around, for example if the viewer is carrying a light source. Normal mapping
Normal mapping

In 3D computer graphics, normal mapping is an application of the technique known as bump mapping. Normal mapping is sometimes referred to as "Dot3 bump mapping"....
 is the most commonly used bump mapping technique, but there are other alternatives, such as parallax mapping
Parallax mapping

Parallax mapping is an enhancement of the bump mapping or normal mapping techniques applied to textures in 3D rendering applications such as video games....
.

The difference between displacement mapping
Displacement mapping

Displacement mapping is an alternative computer graphics technique in contrast to bump mapping, normal mapping, and parallax mapping, using a texture mapping or heightmap to cause an effect where the actual geometric position of points over the textured surface are displaced, often along the Locally surface normal, according to the valu...
, also known as 'true' bump mapping and 'fake' or '2D' bump mapping, which is more common and is often just called 'bump mapping' (see below), is that in fake bump mapping the normal alone is perturbed, not the geometry. In this case, the silhouette of the object is still defined by the underlying, often simple, geometry. In 'true' bump mapping the bumps are applied to the geometry, leading to a 'bumpy' silhouette. Fake bump mapping is computationally efficient and can be performed in real-time by 3D accelerator cards while true bump mapping is generally reserved for off-line (non-realtime) ray-traced images.

For the purposes of rendering in real-time bump mapping is often referred to as a 'pass', as in multi-pass rendering and can be implemented as multiple passes (often three or four) to reduce the number of trigonometric calculations that are required.

Fake bump mapping


Programmer
Programmer

A programmer is someone who writes computer software. The term computer programmer can refer to a specialist in one area of computer programming or to a generalist who writes code for many kinds of software....
s of 3D graphics sometimes use a computationally lower quality, fake bump mapping technique in order to simulate bump mapping. One such method uses texel
Texel (graphics)

A texel, or texture element is the fundamental unit of texture space, used in computer graphics. Textures are represented by arrays of texels, just as pictures are represented by arrays of pixels....
 index alteration instead of altering surface normals, often used for '2D' bump mapping. As of GeForce 2 class cards this technique is implemented in graphics accelerator hardware.

Full-screen 2D fake bump mapping, which could be easily implemented with a very simple and fast rendering loop, was a common visual effect
Demo effect

Demo effects are computer-based real-time visual effects found in Demo created by the demoscene.The main purpose of demo effects in demos is to show off the skills of the programmer....
 when bump-mapping was first introduced.

Environment Mapped Bump Mapping

G400techdemo01
The Matrox G400
Matrox G400

The G400 is a video card made by Matrox, released in September 1999. The graphics processor contains a 2D Graphical user interface, video, and Direct3D 6.0 3D accelerator....
 chip supports, in hardware, a texture-based surface detailing method called Environment Mapped Bump Mapping (EMBM). It was originally developed by BitBoys Oy
BitBoys Oy

Bitboys Osakeyhti? is a hardware development and licensing company based in Finland, founded in 1991 and acquired by ATI Technologies for up to USD44M on May 2, 2006....
 and licensed to Matrox. EMBM was first introduced in DirectX 6.0.

The Radeon 7200
Radeon R100

The Radeon R100 is the first generation of Radeon graphics chips from ATI Technologies. The line features 3D computer graphics based upon Direct3D 7.0 and OpenGL, a major improvement in features and performance compared to the preceding ATI Rage design....
 also includes hardware support for EMBM, which was demonstrated in the tech demo "Radeon's Ark". However, EMBM was not supported by other graphics chips such as NVIDIA
NVIDIA

Nvidia is a multinational corporation specializing in the manufacture of graphics processing unit technologies for workstations, desktop computers, and mobile devices....
's GeForce 256
GeForce 256

The GeForce 256 was the first of Nvidia's "GeForce" product-line. Released on August 31 1999, the GeForce 256 improved on its predecessor by increasing the number of fixed pixel pipelines, offloading host geometry calculations to a transform and lighting engine, and adding hardware motion compensation for MPEG-2 video....
 through GeForce 2, which only supported the simpler Dot-3 BM. Due to this lack of industry-wide support, and its toll on the limited graphics hardware of the time, EMBM only saw limited use during G400's time. Only a few games supported the feature, such as Dungeon Keeper 2
Dungeon Keeper 2

Dungeon Keeper 2 is a strategy game developed by Bullfrog Productions and published by Electronic Arts in 1999 for Microsoft Windows. It was released in Europe and North America in June 1999....
 and Millennium Soldier: Expendable
Millennium Soldier: Expendable

Millennium Soldier: Expendable is the title of a shoot 'em up video game that was released by British developer Rage Software for Microsoft Windows in 1998, the Sega Dreamcast in 1999, and the Sony PlayStation in 2000....
.

EMBM initially required specialized hardware within the chip for its calculations, such as the Matrox G400 or Radeon 7200. It could also be rendered by the programmable pixel shaders of later DirectX 8.0 accelerators like the GeForce 3 and Radeon 8500.

See also

  • Texture mapping
    Texture mapping

    Texture mapping is a method for adding detail, surface texture, or colour to a computer-generated imagery or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in his Ph.D....
  • Normal mapping
    Normal mapping

    In 3D computer graphics, normal mapping is an application of the technique known as bump mapping. Normal mapping is sometimes referred to as "Dot3 bump mapping"....
  • Parallax mapping
    Parallax mapping

    Parallax mapping is an enhancement of the bump mapping or normal mapping techniques applied to textures in 3D rendering applications such as video games....
  • Displacement mapping
    Displacement mapping

    Displacement mapping is an alternative computer graphics technique in contrast to bump mapping, normal mapping, and parallax mapping, using a texture mapping or heightmap to cause an effect where the actual geometric position of points over the textured surface are displaced, often along the Locally surface normal, according to the valu...
  • Relief Texture Mapping


External links

  • Bump Mapping tutorial using CG and C++
  • (shows a simple creating vectors per pixel of a grayscale for a bump map to work and more)
  • Bump Mapping example (Java applet
    Java applet

    A Java applet is an applet delivered to the users in the form of Java bytecode. Java applets can run in a Web browser using a Java Virtual Machine , or in Sun Microsystems's AppletViewer, a stand-alone tool for testing applets....
    )