Q: You claim GForge heightfields tile perfectly, but I put them into
my POV scene and there are gaps.
A: Ahh, yes. This is the infamous POV 2.2 Heightfield Tiling Problem.
The heightfields from gforge really will tile properly; you can demonstrate
this to yourself with my "grid" or "xgrid" previewer. Unfortunately one of
the few bugs with POV 2.2 is that tiling glitch. It may not have been
noticed earlier because, until gforge, tilable heightfields were uncommon.
I have not fully worked it out myself, but what seems to happen is that POV
strips off the last pixel on all four edges of the heightfield, such that a
100x100 HF is displayed as 98x98. This could be overcome by adding a
sacrificial perimeter of pixels around the HF, except that the scaling is
also off so that the heightfield does not fill the unit square but is about
0.5 pixels smaller on two edges. You can figure it out exactly by trying
extremely low-resolution HFs and adjusting their spacing till the gap is
gone.
I haven't spent the time to figure it out exactly since this bug is fixed
in the POV 3.0 beta version now at ftp://ftp.povray.org/ and
http://www.povray.org/.
By the way you may ask yourself what "exact tiling" means. Does it mean the
pixels on the left edge are identical to those on the right, or that they
are just different enough so that the slope would be continuous if you
added a copy of the HF against that edge? Gforge output follows the latter
definition. This means true tilablilty in the rendered output requires the
renderer to know that the HFs are tilable and to join last_pixel of HF#1 to
first_pixel of HF#2 in the polygon mesh, rather than simply abutting the
edges. For a "smoothed" heightfield the renderer has to realize it should
interpolate surface normals across the boundary. I haven't checked if POV 3
can do this; it's a bit of a subtle point and may not have been considered.