r/blenderhelp • • 2d ago

Solved Edge artifacts when baking a normal map

I modeled a basic exterior wall with siding and am trying to bake the siding normals so I can use them on a plain cube. When I bake, I am getting these dark purple artifacts on the bottom edges of the siding.

The attached images show:

  1. The siding and wall models
  2. Siding model in Edit mode, it's shaded smooth so I used Set Sharpness by Angle so it has a sharp bottom edge.
  3. My bake attempt, you can see the diagonal pattern of darker purple on the bottom of each piece of siding. Feels like the giant dark purple bar on the bottommost piece should be a clue too.
  4. The baked normal map applied to the wall model, you can see the diagonal banding appears

Any pointers on how to fix this?

2 Upvotes

7 comments sorted by

•

u/AutoModerator 2d ago

Welcome to r/blenderhelp, Emotional_Heat_4726! Please make sure you followed the rules below, so we can help you efficiently (This message is just a reminder, your submission has NOT been deleted):

  • Post full screenshots of your Blender window (more information available for helpers), not cropped, no phone photos (In Blender click Window > Save Screenshot, use Snipping Tool in Windows or Command+Shift+4 on mac).
  • Give background info: Showing the problem is good, but we need to know what you did to get there. Additional information, follow-up questions and screenshots/videos can be added in comments. Keep in mind that nobody knows your project except for yourself.
  • Don't forget to change the flair to "Solved" by including "!Solved" in a comment when your question was answered.

Thank you for your submission and happy blendering!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Party-Dimension-3571 2d ago

I'd check two separate things.

Diagonal banding: that usually comes from smooth shading on the high poly. Only your bottom edge is sharp, so the other 90 degree edges (like the end caps) are still smooth, and the normals bend across a very long thin face. Once it's triangulated you get exactly that diagonal gradient. Select all in Edit Mode and run Edge > Set Sharpness by Angle at about 30 degrees, or just Shade Flat for a test bake. You can also delete the end caps and any back faces, the bake doesn't need them.

Dark strips under each board: the underside of the lip points straight down, 90 degrees to the wall. A flat wall can't represent that, the rays hit it edge-on or only on a few pixels. Slant the underside so it faces a bit outward (a 30 to 45 degree chamfer). It will look almost the same on the wall and bake much cleaner.

The thick bar on the lowest board: check in side view that the board doesn't hang below the bottom of the wall, and keep Extrusion just a little bigger than the distance from the wall to the outermost board, so the edge rays don't catch the underside.

Also keep the wall shaded flat for this, and the normal image set to Non-Color.

1

u/Emotional_Heat_4726 1d ago

Thanks, these suggestions didn't fix it directly but did get me thinking about shading. I created a new Siding2 model and used Shade Auto Smooth and it now looks as expected! BUT when I apply Shade Auto Smooth to the original Siding model it still shows the artifacts. I did adjust that underside of the lip so it was less than 90 degrees, but the new Siding2 model has an even more severe angle as it tucks back toward the wall, so I don't know if this was a problem.

I guess this is !solved since I have a model that works, though I still don't understand what is wrong with the first model. The new Siding2 model is blue below, the original one is tan behind it. Both have the same modifiers and Bake settings.

The original Normal map is on top, new one on bottom.

1

u/Party-Dimension-3571 1d ago • Bravo

The more severe tuck is probably why the new one is clean. With a flat low poly, the bake rays come straight at the wall. If the underside of the lip tucks back behind the front edge, the rays never see it, so only the front face gets recorded. If any of that underside is still visible from straight ahead, it gets baked as a nearly sideways normal, which is your purple strip.

You can check it in Front/Side orthographic view looking directly at the wall: any underside you can see on the old model will show up in the map.

If the old one still differs after that, look for leftovers on it: unapplied scale, a flipped face (Overlays > Face Orientation), doubled verts (Merge by Distance), or custom normals (Object Data > Geometry Data > Clear Custom Split Normals).

1

u/Emotional_Heat_4726 14h ago

Aha, I get it now and you're right, I get the purple strip precisely when that underside lip face peeks out below the front edge. Thanks again!

1

u/AutoModerator 1d ago

You typed "!solved". The flair for this submission has been changed to "Solved".

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/DHTechdev 2d ago

Those purple bars usually mean the rays are hitting something they shouldn't. With Selected to Active, Extrusion and Max Ray Distance that are too big make the rays from the low poly bottom edge hit the board below it. Drop both to just a bit more than the siding depth (like 0.02 to 0.05 m) and rebake. Also make sure the low poly plane has the same orientation and scale applied, and bake with Normal set to Tangent and the right Swizzle (+X +Y +Z).