I have terrain divided to patches of size 33x33.
I calc lightmap coordinates for every vertex:
vx=33
vz=33
for (i=0;i<vx;i++)
for (j=0;j<vz;j++)
lightcoords[i+j*vx].u=(float)i/vx; lightcoords[i+j*vx].v=(float)j/vz;
every lightmap is texture with size 32x32
So I draw 32x32 texture on 33x33 vertex array. I use multitexturing.
I think lightmaps are generated correctly, becouse they look OK on hills. However, there is a problem. There is “border” on every lightmap. Two lightmaps almost fit together, but there are vertical and horizontal lines around patches.
Have you ever had something like this? I have seen someone asked this question 2 years ago on Usenet, but he haven’t solved his problem.