Author Topic: Bad AO bake  (Read 3784 times)

How do I prevent these kinds of bad bakes from happening? I don't wanna see artifacts like this. I'm posting a link to the picture because this website sometimes doesn't let me upload an image and it just stays stuck at "Uploading file..."
So here's what I mean:
https://ibb.co/NxgMjsN

Can you also show your MESH MAP in the 3D view for normals and AO?
I teach people how to use Substance Painter. :)

I haven't baked any normal details into it. But here's the AO mesh map (I don't know what a mesh map is):


For the normal mesh map the mesh just becomes a solid blue silhouette without any contours.

The "World space normal" mesh map looks like this:


This is a 4k texture by the way

This is what my baking window looks like before I bake:

Last Edit: May 30, 2020, 08:52:19 pm

Can you provide your mesh that you're using. I assume just a low poly as you don't have a high poly listed.

I'll show you how to make it look cleaner.
I teach people how to use Substance Painter. :)

Alright then, I'll try uploading it. I tried checking anti-aliasing in the baking window by the way and that didn't solve the problem.

You have some things to fix up with your mesh. You have stacked UVs (you have to offset when baking stacked UVs), UVs without sufficient padding, UV cuts need work (every sharp edge should be split - you don't want a single UV shell with a ton of sharps going around and through), your mesh has ngons, and you also have meshes that are merged but not continuous (these should be split to prevent baking errors). You should apply your transforms, your scale is not 1:1. All of these problems will produce issues as you work through your mesh.

In terms of your AO issue it is mostly because of your UVs. You have sharps marked but you're not splitting them.

See yours:



Now if I split it properly:



I only did that small section to show you. You also need to consider everything I wrote above as well because you have meshes joined that are not continuous.

So regarding your sharps:



You have one UV Shell but you're marking sharps throughout it...

You have to split it up:

I teach people how to use Substance Painter. :)

What does offset when baking stacked UVs mean?

When you say splitting sharps, do you mean extracting, like in Maya? I'm using Maya, so some language is different (sharp edges are hardened edges in Maya for example.)

If you split a UV, won't that break up the texture? I try to put cuts only in places where you're unlikely to see them, as much as possible, but should I cut every sharp edge and pad the UVs? I didn't know what UV padding was up until you mentioned it and I looked it up.

What do you mean when you say that edges are merged but not continuous? Do you mean non-manifold geometry?

Is it possible to make a 2nd alternate UV map and use that one for the AO and normal?
Last Edit: May 31, 2020, 11:47:52 pm

Offsetting refers to moving those UV Shells over to the 1-2 space. Painter will ignore anything outside of the 0-1 space so overlapped UVs can be moved leaving a single shell in the 0-1 space. If you don't do this you'll get baking errors due to overlapping.





If you're going to make a hard edge make sure it's split.

Example:



Splitting UVs in this context isn't referring to UV maps, but creating UV Shells. Essentially every sharp (hard edge) should be marked as a seam.

I didn't write anything about edges are merged but not continuous, I wrote 'meshes'. If you're merging meshes together you need to be sure to use the _low _high workflow and split them for baking.

https://docs.substance3d.com/bake/matching-by-name-182256530.html

Yes you can work with more than one UV channel but you have to do some manual work because Painter only works with your first UV (Channel 0)

Just for this example I will make the second UV smaller than the first but to show I make a texture on UVMap1 and AO on UVMap2 and apply it in Blender.

Here is the first UV Map



Here is the second UV Map



Now I make two objects to export. Each object is the same just I swap the UVs so Channel 0 (the first UV map) is different so I can get different texture sets.

I baked and textured the first one less AO:



Then I baked only the AO on the second one:





In Blender I hook up the texture set for the first UV Map:



Now for the second UV Map with our AO bake:



Merged together:



Now I don't normally use AO personally, but if you want to go outside of Painter's workflow then you'll need to improvise.
Last Edit: September 23, 2020, 03:57:22 am
I teach people how to use Substance Painter. :)

I think that clears a lot up, thank you very much for your effort. There's still a few things I'm uncertain about:

1. If instead of having no high poly mesh, I do have one, and I bake the high poly "sharp" edges (so soft beveled edges that look kind of like sharp edges because they're beveled) onto the low poly mesh, and the low poly mesh doesn't have any edges marked as sharp, it's all soft shading, do I still need to have a seem on those edges? In other words, do I ONLY have to split UVs when an edge is marked sharp, to prevent those baking artifacts? Because sometimes, for a castle wall for example, I want the UVs to not be padded, and all be close to each other and stacked as well, so that the grout lines of the castle bricks line up and you don't see any UV seems. For example:

(This is a work in progress, not everything lines up, it's a placeholder texture, I was just testing if it would work)
I accidentally uploaded the wrong image and now substance3d.com won't let me upload another one again, so here's a link to the one I meant to upload, which has the places of interested encircled: https://ibb.co/hfCw7WW
Here's an example of what the UV map of a similar asset looks like:

So the sides of the battlements overlap and line up with the fronts of the battlements so that there are no break-ups in the grout lines.


2. In this image you show that you've split the sharps (so you put a UV-seem along the edges that were marked as sharp), but it also appears you've straightened the shells, is this significant? I assume it's to prevent those "staircases" from appearing? Won't split UVs do that in and of itself because there's no bleeding?

I did not straighten any of your UVs, they're cut that way by default. If you look at your mesh the only reason your UVs were not straight is because you're unwrapping a section that has several edges and flowing in that shape. That has nothing to do with why your edges were "jagged" in your AO bake. You can manually straighten your prior UVs and see it makes no difference. The problem again was because you didn't make your sharps, seams.

Some manual testing on your part will show these things and help you understand better.
I teach people how to use Substance Painter. :)