I'm trying to get my lightmapper producing decent results and the last major barrier I have is smoothing groups. Because the entire area of a triangle has the same surface normal, when you calculate the light value using that normal, you get sharp changes in the light/shade on the edge of every quad/triangle. So your smoothing groups are effectively wiped out.
So obviously the answer is to generate per-pixel surface normals instead of per-vertex, and I'm doing that with BaryCentric interpolation, and getting almost good results. There is a good smooth lighting value spread over the triangle, but there are little seams between the triangles which are actually slightly lighter than both sides. I can reduce the effect they have by blurring the final texture, and that's helpful, but ideally I'd like to get a really smooth lighting result over edges without resorting to brute force blurring.
Is there something else I need to do apart from interpolating the vertex normals across each triangle, is there a little adjustment needed to barycentric interpolation or have I just got a little bug somewhere?
So obviously the answer is to generate per-pixel surface normals instead of per-vertex, and I'm doing that with BaryCentric interpolation, and getting almost good results. There is a good smooth lighting value spread over the triangle, but there are little seams between the triangles which are actually slightly lighter than both sides. I can reduce the effect they have by blurring the final texture, and that's helpful, but ideally I'd like to get a really smooth lighting result over edges without resorting to brute force blurring.
Is there something else I need to do apart from interpolating the vertex normals across each triangle, is there a little adjustment needed to barycentric interpolation or have I just got a little bug somewhere?