Author Topic: Substance Designer 5.3.4 - Bad texture seams when baking AO  (Read 4677 times)

Hello,

We currently have a big issue when baking ambient occlusion maps. In areas we have uv cuts, there always is a very prominent difference in light values. See attachments.

It doesn't look like AO is handled by distance, so to speak rather than by uvlayout, if that makes sense? Expected behaviour would be that there are clean gradients over the edges, without as much difference at least. I found out that he exported after deleting the history in maya, effectively deleting smoothing groups. But even after fixing that it didn't really get better and using a high poly instead of the same model for the baker, didn't make a difference in that regard. The non mesh baker has the same issue.

Are you using the "Ambient Occlusion" or "Ambient Occlusion from Mesh" baker ?
Product Manager - Allegorithmic

We tried both, same effect.

I looked at your fbx, I think you have this seam because the baked texture does not have enough resolution compared to the polygon size. Here is 2K bake:



The baked details are not even 2 pixels.
You could solve/improve the situation by snapping the UVs to the pixel grid, or bake at a higher resolution.
Product Manager - Allegorithmic

Hi, thanks for checking it out, but I'm not convinced. Even with higher resolution the problem is the same. The pixels around the actual uv cuts are completely different, no matter how you look at it. There is no transition, not even a bad one that you could interpret as such. It's always like your bakers uvlayout for baking not the 3D object and then transfering it to the texture. I don't know your allgorithms, but even so it is no good result. Compare in the screenshot attached, the marked edge is the same.
XNormal has the same issue (even more so).
I also included my usual way of baking AO Maps (Vray Texture baking) with a simple vray Domelight. So it's more of a lightmap, but it does the same, just with more light information. The actual point though is that this way I don't have those extreme seams, they still are there, but are much less apparent, because I used actual light.

Do you have any suggestions for baker settings that could improve the result? Could you forward it to the devs and ask for feedback on it? I'd like a simple explanation of how the bakers work, that might help me to work accordingly. And maybe they can improve their bakers as well ;)


Last Edit: October 03, 2016, 01:01:54 pm

I've some difficulties understanding what your first screenshot shows ..

The bakers works by creating an image the size you have defined, for each pixel where there are UV coordinates a first ray will be cast in 3D space in the direction of the surface normal (averaged or not depending on the option) to find the "high definition mesh", the ray distance is defined by the "Max frontal/Rear distance" parameter. If you use the same mesh for low and high, you should set these distance to the minimum value: 0.0001.

Then when the high definition mesh has been hit, in the case of the ambient occlusion, we cast secondary rays to compute the occlusion. It works the same way as the "Vray Dirt" shader and most Ambient Occlusion shader out there.

At the end, we apply post processes to make the resulting image "bleed" over the UVs borders. These post processes are dilation (iterative process that kind of duplicates the pixel borders) and diffusion ( accumulation of the mip maps).
These effects are meant to minimise visible seams when mips maps are being used.
Product Manager - Allegorithmic

I suspect that might be an Ambient Occlusion limitation in general, I've been baking with light for a while now, so that didn't really get my attention until now. I'll try it with Vray Dirt too, but I expect that the issue will be the same.

bakingissue.jpg: result of the SD baker assigned in maya with the uvset on the right, pretty much a collage between Maya viewport and the edge in the uv editor in both positions to point out the surroundings of the edge have completely different values.
vrayambientocclusionmap.jpg: Result of my usual "ambientocclusion" setup. I guess lightmap would be the correct naming, but I use it for ambient occlusion purposes. Since light comes from all sides, the lighting in areas that would have AO is similar, but it has more detail in regards to folds. Also better for texture cuts apparently.

textureseamsvray.jpg: vraymap applied in Maya viewport

I think a similar result like I have with vray can be achieved with any renderer, it's just a different workflow. I'm not sure if we can get a better result with the bakers as they are, diliation shouldn't be the issue, because the faces already have very different values around the edges, min distance value is already like that by default.
Guess the right way to do it would be to let the baker compare the pixel values on both sides of the edges and find the average (pretty sure that would improve all maps and generators in SD in general) or using sphere casting the rays onto the mesh. But that's nothing I'm able to do in SD I guess, so I will hope for improvements and use Vray for those maps until I find a better solution.