<s>
In	O
computer	O
graphics	O
,	O
a	O
heightmap	B-Data_Structure
or	O
heightfield	B-Data_Structure
is	O
a	O
raster	B-Algorithm
image	I-Algorithm
used	O
mainly	O
as	O
Discrete	O
Global	O
Grid	O
in	O
secondary	O
elevation	O
modeling	O
.	O
</s>
<s>
A	O
heightmap	B-Data_Structure
can	O
be	O
used	O
in	O
bump	O
mapping	O
to	O
calculate	O
where	O
this	O
3D	O
data	O
would	O
create	O
shadow	O
in	O
a	O
material	O
,	O
in	O
displacement	O
mapping	O
to	O
displace	O
the	O
actual	O
geometric	O
position	O
of	O
points	O
over	O
the	O
textured	O
surface	O
,	O
or	O
for	O
terrain	O
where	O
the	O
heightmap	B-Data_Structure
is	O
converted	O
into	O
a	O
3D	B-Algorithm
mesh	I-Algorithm
.	O
</s>
<s>
A	O
heightmap	B-Data_Structure
contains	O
one	O
channel	B-Algorithm
interpreted	O
as	O
a	O
distance	O
of	O
displacement	O
or	O
"	O
height	O
"	O
from	O
the	O
"	O
floor	O
"	O
of	O
a	O
surface	O
and	O
sometimes	O
visualized	B-Application
as	O
luma	O
of	O
a	O
grayscale	O
image	O
,	O
with	O
black	O
representing	O
minimum	O
height	O
and	O
white	O
representing	O
maximum	O
height	O
.	O
</s>
<s>
When	O
the	O
map	O
is	O
rendered	O
,	O
the	O
designer	O
can	O
specify	O
the	O
amount	O
of	O
displacement	O
for	O
each	O
unit	O
of	O
the	O
height	O
channel	B-Algorithm
,	O
which	O
corresponds	O
to	O
the	O
“	O
contrast	O
”	O
of	O
the	O
image	O
.	O
</s>
<s>
Heightmaps	B-Data_Structure
can	O
be	O
stored	O
by	O
themselves	O
in	O
existing	O
grayscale	O
image	O
formats	O
,	O
with	O
or	O
without	O
specialized	O
metadata	O
,	O
</s>
<s>
or	O
in	O
specialized	O
file	O
formats	O
such	O
as	O
Daylon	B-Application
Leveller	I-Application
,	O
GenesisIV	O
and	O
Terragen	B-Algorithm
documents	O
.	O
</s>
<s>
One	O
may	O
also	O
exploit	O
the	O
use	O
of	O
individual	O
color	B-Algorithm
channels	I-Algorithm
to	O
increase	O
detail	O
.	O
</s>
<s>
By	O
using	O
colors	O
,	O
a	O
greater	O
number	O
of	O
heights	O
can	O
be	O
stored	O
(	O
for	O
a	O
24-bit	O
image	O
,	O
2563	O
=	O
16,777,216	O
heights	O
can	O
be	O
represented	O
(	O
2564	O
=	O
4,294,967,296	O
if	O
the	O
alpha	O
channel	B-Algorithm
is	O
also	O
used	O
)	O
)	O
.	O
</s>
<s>
Heightmaps	B-Data_Structure
are	O
commonly	O
used	O
in	O
geographic	B-Application
information	I-Application
systems	I-Application
,	O
where	O
they	O
are	O
called	O
digital	B-Application
elevation	I-Application
models	I-Application
.	O
</s>
<s>
Heightmaps	B-Data_Structure
can	O
be	O
created	O
by	O
hand	O
with	O
a	O
classical	O
paint	O
program	O
or	O
a	O
special	O
terrain	O
editor	O
.	O
</s>
<s>
Another	O
method	O
is	O
to	O
reconstruct	B-Algorithm
heightmaps	B-Data_Structure
from	O
real	O
world	O
data	O
,	O
for	O
example	O
using	O
synthetic	B-Application
aperture	I-Application
radar	I-Application
.	O
</s>
<s>
Heightmaps	B-Data_Structure
are	O
widely	O
used	O
in	O
terrain	O
rendering	O
software	O
and	O
modern	O
video	O
games	O
.	O
</s>
<s>
Heightmaps	B-Data_Structure
are	O
an	O
ideal	O
way	O
to	O
store	O
digital	O
terrain	O
elevations	O
;	O
compared	O
to	O
a	O
regular	O
polygonal	B-Algorithm
mesh	I-Algorithm
,	O
they	O
require	O
substantially	O
less	O
memory	O
for	O
a	O
given	O
level	O
of	O
detail	O
.	O
</s>
<s>
Most	O
modern	O
3D	O
computer	O
modelling	O
programs	O
are	O
capable	O
of	O
using	O
data	O
from	O
heightmaps	B-Data_Structure
in	O
the	O
form	O
of	O
bump	O
,	O
normal	B-Application
,	O
or	O
displacement	O
maps	O
to	O
quickly	O
and	O
precisely	O
create	O
complex	O
terrain	O
and	O
other	O
surfaces	O
.	O
</s>
<s>
In	O
the	O
earliest	O
games	O
using	O
software	O
rendering	O
,	O
the	O
elements	O
often	O
represented	O
heights	O
of	O
columns	O
of	O
voxels	B-Algorithm
rendered	O
with	O
ray	B-Algorithm
casting	I-Algorithm
.	O
</s>
<s>
In	O
most	O
newer	O
games	O
,	O
the	O
elements	O
represent	O
the	O
height	O
coordinate	O
of	O
polygons	B-Algorithm
in	I-Algorithm
a	I-Algorithm
mesh	I-Algorithm
.	O
</s>
<s>
Although	O
the	O
terms	O
heightmap	B-Data_Structure
and	O
heightfield	B-Data_Structure
are	O
often	O
indistinguishable	O
from	O
each	O
other	O
,	O
there	O
is	O
still	O
a	O
small	O
difference	O
in	O
the	O
terms	O
.	O
</s>
<s>
Heightmap	B-Data_Structure
comes	O
from	O
the	O
mathematical	O
term	O
'	O
map	O
 '	O
and	O
heightfield	B-Data_Structure
comes	O
from	O
the	O
mathematical	O
term	O
'	O
vector	O
field	O
 '	O
.	O
</s>
<s>
Heightmap	B-Data_Structure
is	O
the	O
more	O
correct	O
description	O
because	O
most	O
heightfields	B-Data_Structure
are	O
not	O
a	O
(	O
vector	O
)	O
field	O
in	O
mathematical	O
terms	O
but	O
they	O
are	O
always	O
a	O
map	O
(	O
in	O
mathematical	O
terms	O
as	O
well	O
as	O
in	O
the	O
visual	B-Application
representation	I-Application
)	O
.	O
</s>
