Problem:
Using surface normals you get visible seams between UV islands.
Using nearest point improves seam artifacts but generates other 'errors' in tight spaces such as sharp corners and creases.
Normally you'd like to bake with a 'smoothed' cage, but the cage mode doesn't render at all (Looks like it's because in this mode the target mesh has no udim attribute). When it does render the cage doesn't work the way I would expect, so I played around with the setup:
Cage mesh:
- Just the low poly followed by a peak node.
Maps baker SOP changes:
- Using target mesh instead of cage mesh to plug into the baking for loop (This also solves the missing udim attr), getting tracing direction and distance (normals) by comparing vertex positions of target and cage mesh (same uvs).
Maps baker COP changes:
- Using OUT_ORIGINAL instead of OUT_LOW_TARGET in the conversion from world space to tangent space normals (Nt node).
- Using Alpha instead of uvalpha as mask in the following extrapolateboundaries node.
This gives me better results and the cage works the way I expect it (the surface of the cage geo in relation to the target gives direction and distance NOT just the normal value of the cage mesh verts).
I haven't tested if this would work with a udims workflow, or with other types of maps.
The baker crashed when I swapped out OUT_LOW_TARGET for OUT_ORIGINAL (COP change #1 above) but seems to be fine now.
I included the scene files, you could probably improve the uv mapping to get better bakes, and I probably broke stuff along the way. It's just an example where this kind of workflow improves the end result.