Baking problems

Hi! I’ve got some problems baking normal and ambient occlusion maps. I have succeeded while trying to generate normal and ambient occlusion maps for other models, but for some reason it just doesn’t work with my sword. Here’s the best result I get while trying to bake the normals:

Sometimes the normal map just turns solid grey or solid blue.

I tried to fix this for a while but later gave up and decided to move on to the ambient occlusion map when I realized that I wasn’t going to be able to fix it on my own. While the ambient occlusion map generally turns out better than the normal one it’s still not good. Blender generates the ambient occlusion map from the lowpoly to lowpoly, so understandably it doesn’t look anywhere near as good as I wanted.

Alright, here’s what I’ve thought was the reasons for all these problems (but obviously wasnt):

  1. Overlapping geometry. I just modeled a quarter of my model and then mirrored it along the X and Y axis. The geometry was overlapping but I then shrank the mirrored copies and placed them where they wouldn’t overlap anything.
  2. Overlapping geometry in the model. I tried removing doubles but there were nothing to delete and no other model underneath the one I wanted either.
  3. Normals problem. I looked at both the models and the normals seemed to be facing outwards.
  4. Modifiers. Appearently you should use as few modifiers as possible while generating normal maps so I removed every one of them.

BTW I have activated the Selected To Active button as well so that ain’t the problem either.

The green normal map is the result of a normals error. If your lowpoly is all outwards-facing and correct, flip the highpoly. I think Blender sometimes generates these inside-out normals even when both objects have correct normals, but I’m not sure about that - either way, flipping normals will fix this.

Secondly, overlapping UVs are indeed a problem with baking - you’ve got Blender baking four different bakes on the same space. There’s an easy fix for this, though. Move the duplicate UVs outside the 0-1 UV space. So you select all the UVs except for one set that you want to bake onto, press G and type in the width of your texture. That’ll move these UVs outside of the standard window, but since that’s all tiled, the end result is the same - except that they’re ignored in the baking process. (image)


Change normal space from camera to Tangent and you will get the blue style normal map.

Alright, so I tried what you suggested, Zwebbie. I tried flipping the normals and then move the overlapping UV faces outside of the map, but Blender still seems to calculate those, at least that is the impression I got from the result:
The flipping of the normals didn’t seems to have any effect at all on this UV layout, but when I tried it with the old layout (with the overlapping parts just shrunken and still inside the UV map, the colors pretty much just inverted. The parts that were green turned blue and the ones that were blue turned green.

Waternz: Yeah, I forgot to mention that I already had chosen to generate Tangent Space normal maps, but thanks anyway.

Ah, I can’t quite remember what causes grey noise. Could you attach a .blend, perhaps?

As for the normal-flipping; that’s sort of what’s supposed to happen; the green values are inverted normals, so they’re all supposed to be blue in the end. Again, a .blend file would help, since there are multiple things that can cause this.

Ok, I’ve uploaded the model here:

I see what’s going on here :slight_smile: .

Turn off your texture in the Material Buttons -> Texture panel. That should get rid of the grey noise.

It’ll make a lot of your stuff green-ish, which is inverted - simply invert those parts on your highpoly mesh.

There are some areas where blue and green colours are both on one object - you’ve got doubles here. For example on the Icospheres, just select a face, Ctrl+L to link to all attached faces and delete. There’s an identical copy underneath.

You’ll also find some areas where the colours are all good blue, but they show faces outlines and come off crappy - that’s fixed by moving the UVs, as I detailed above.

Lastly, you’ve got a Bias value of 0 in your baking panel - that means that it’ll always use the face who is closest to 0 away from the lowpoly. In the case of the handle, those are sometimes inner faces and it’s also why the little bits on the end of the grip aren’t baked. Making the Bias value a little higher should solve that (.1 seems to be enough, but I haven’t checked thoroughly).