Sub topic 16
Diagnosing and Fixing Bake Artifacts
This chapter assumes you can set up a Selected to Active bake in Cycles, you know what a UV seam is, and you have already baked a tangent-space normal map and an ambient occlusion (AO) map. The goal here is to look at a bad bake, name the cause, and change the one setting that fixes it.
A method for diagnosing a bad bake
Most bake problems come from a short list of causes: the rays hit the wrong surface, the UV layout is wrong, the image is color-managed wrongly, or the normal map is read with the wrong convention. Change one thing at a time and rebake. If you change three settings at once, you will not know which one fixed the problem.
Ask these questions in order:
- Is the artifact on the baked image itself, or only when the image is applied in a material?
- Is the artifact in the same place on every bake, or does it change with the cage and distance settings?
- Does it follow UV island borders, mesh edges, or the high-poly surface?
If the artifact is already in the image, the cause is the bake setup. If the image looks fine and the mesh looks wrong, the cause is in the material, the color space, or the engine's normal convention.
Ray misses and wrong-surface hits
In a Selected to Active bake, Blender casts a ray from each point on the low-poly surface toward the high-poly mesh. Two settings control the ray. The cage extrusion pushes the start of the ray outward from the low-poly surface. The max ray distance limits how far the ray travels. A value of 0.0 for max ray distance means no limit.
Two opposite failures appear here.
- Ray misses. The low-poly surface sits outside the high-poly mesh in some places, or the extrusion is too small to reach the high-poly surface. The result is flat or blank patches, often in concave areas or where the low-poly mesh is far from the sculpt. Fix it by raising the cage extrusion in small steps, for example from 0.02 to 0.05, and rebake.
- Wrong-surface hits. The extrusion is so large that rays start beyond a nearby part of the model and hit that part instead. A gap between two fingers or a fold in a cloth is a typical place. The details from the wrong part appear stamped onto the surface. Fix it by lowering the extrusion, or set a max ray distance so a ray cannot travel to the distant surface.
Use the two settings together. A moderate extrusion gets the ray started outside the surface. A small max ray distance stops it from traveling too far. If one global value cannot work for the whole model, use a custom cage object, or move the high-poly parts apart so they do not overlap each other's rays.
Skewed, wavy, or stretched details
Details that look sheared, wavy, or pulled in one direction usually come from one of three causes.
- Overlapping or stretched UVs. If two parts of the low-poly mesh share UV space, the second bake overwrites the first. Stretched UV faces smear the detail along the stretch. Check with a checker texture and fix the unwrap. Overlap is not allowed for a bake unless the overlapping faces are meant to look identical and sit in the same orientation.
- Mismatched shading. The tangent-space normal map is the difference between the high-poly normal and the low-poly shading normal. If you change the low-poly shading after baking (for example, from flat to smooth, or by adding Weighted Normal or Auto Smooth edits), the map no longer matches the surface it was made for. Finalize the low-poly shading and mark sharp edges before you bake, and do not change them afterward.
- Unapplied transforms. A non-uniform scale on either object distorts the rays and the extrusion distance. Apply scale with Ctrl+A before baking.
Hard edges and faceted shading
Tangent-space maps work best when the low-poly shading is smooth and the UV island borders match the hard edges. If you mark an edge sharp, split the UV island there as well. When a sharp edge runs through the middle of a UV island, the normal map has to store a sudden jump, and a smooth gradient of pixels cannot represent it. You see a dark or bright line along the edge.
A common rule is that every sharp edge in the low-poly mesh should be a UV seam, and every smoothed surface should be one continuous UV island. Using a bevel on the high-poly edges, not just on the low-poly ones, also helps, because the baked bevel then catches light as a small highlight.
Seams and edge bleeding
Colored or dark fringes at UV island borders have two causes.
- Margin too small. The bake only fills pixels inside the islands. Texture filtering and mipmaps then sample pixels just outside the island and pick up the empty background color. The Margin setting extends the baked pixels outward past the island edge. A value of 16 pixels is a reasonable value at 2048 resolution. Use a smaller value at lower resolutions, but make it larger when the model will be viewed from far away, because mipmaps blur wider areas together.
- Islands too close together. If the gap between two islands is smaller than the margin, one island's padding overwrites its neighbor. Leave a gap in the UV layout at least as wide as the margin.
A visible seam in the shaded model that follows a UV border is a separate problem. It often means the tangent basis differs between where the map was baked and where it is displayed. Bake and render with the same tangent calculation. Blender uses MikkTSpace for its own renders, and most engines use it too. If your engine uses a different one, the seams will show in that engine, and you will need to set up the export for it.
Color space and appearance errors
If the normal map is applied and the surface looks far too bumpy, too flat, or oddly tinted, check the image color space first. Normal and AO images hold data, not color, so both must be set to Non-Color. In sRGB, the values are curved, and the normals tilt in the wrong directions. This is easy to miss because the baked image itself looks nearly correct when you view it.
Check the following in the Image Texture node:
- The color space reads Non-Color.
- The image is connected through a Normal Map node set to Tangent, not directly into the BSDF.
- The Normal Map node's UV Map field matches the UV map that you baked on, if the object has more than one.
Inverted lighting and the Y convention
If the details look like they are lit from the wrong side, so that bumps look like dents, the normal map's green channel is flipped. OpenGL maps (Blender's default) point green up. DirectX maps point green down. When you bring a map into an engine that expects the other convention, invert the green channel, either in the engine's import settings or with a Separate Color, Invert, and Combine Color chain in Blender. Do not rebake just to change this.
| Symptom | Likely cause | Fix |
|---|---|---|
| Blank or flat patches | Ray misses | Raise cage extrusion, check cage object |
| Details from the wrong part | Extrusion too large | Lower extrusion, set max ray distance |
| Fringes along island borders | Margin too small | Raise margin, widen island gaps |
| Smeared or sheared details | Stretched or overlapping UVs | Re-unwrap, check with a checker texture |
| Line along a hard edge | Sharp edge not on a UV seam | Split the UV island at the sharp edge |
| Surface too bumpy or tinted | Image set to sRGB | Set to Non-Color |
| Bumps look like dents | Green channel convention | Invert the green channel |
Checking the result
After a fix, test the bake in the conditions where it will be used. Apply the map in a material, set up a light that moves around the object, and look for changes in how each detail is lit. A good bake keeps the same detail from every light direction. A bad one shows lines, flat areas, or reversed shading as the light moves.
You can also use a second object as a test. Duplicate the low-poly mesh, assign the baked material, and compare it next to the high-poly mesh. Differences stand out when two objects sit next to each other.
Exercise
A baked normal map shows clean details on most of the model. On the inner side of a bent arm, the detail from the upper arm appears stamped on the forearm. The cage extrusion is 0.2 and the max ray distance is 0.0. Which setting do you change first, and why?
Show answer
Lower the cage extrusion, and set a small max ray distance. The large extrusion starts rays far outside the low-poly surface, so inside the bend a ray can pass the forearm and hit the upper arm. A smaller extrusion keeps the ray start close to its own surface, and a limited max ray distance stops it from reaching the other part.
Exercise
Your normal map bake looks correct as an image, but in the material the surface looks too bumpy, and the lighting is oddly tinted. List the two things you check in the Image Texture and Normal Map nodes.
Show answer
Check that the image color space is Non-Color and not sRGB. Then check that the image goes through a Normal Map node set to Tangent space, with the UV Map field matching the baked UV map, before it reaches the Principled BSDF Normal input.