1
$\begingroup$

I have a simple cube that I'm using to make a wall. I had already duplicated the cube to make more walls and cut some doors and windows into them before I realized that the normals are getting messed up somehow. None of my other cubes have the problem, but I'd rather not repeat all of my work if it can be avoided.

The problem comes when I try apply the rotation and scale to the cubes so that I can use the bevel tool on the door hole. It happens on all the walls, even the one that doesn't have any modifications other than scale. The incorrect normals are visible if I switch to smooth shading, I'll see a diagonal shadow line going across the wall where the triangle would be if it were triangulated. I tried recalculating normals, but that didn't fix it.

If I view the normals before and after applying the transformation, I can see the problem. Before applying it, the vertex normals come straight out in the same direction as the face normals. Smooth shading works fine in this case. If I apply the transformations, the vertex normals change and come out at an angle instead of coming out straight. Nothing I do seems to be able to fix them.

The geometry is fairly simple, as I said one of the walls it happens to is just a scaled cube. It's only got 8 vertices. So there are no duplicate vertices, or hidden faces, or anything else I can think of that might cause the problem.

Is there something else I can try to properly rebuild these normals or am I going to have to model all my walls over again?

EDIT: I rebuilt the walls over again and the one that is a plain cube is no longer having the issue. Maybe when I was moving the vertices around for sizing I accidentally added on somewhere or something? The ones with the door cutouts are though. In this screenshot the whole thing is set to smooth shading. An edge split modifier only fixes it if I take the angle all the way down to 5 which no longer smooths the door frame. If I set the wall to flat, and individually set the door frame vertices to smooth, the problem goes away in shaded view but comes back in both Blenders textured view and when imported into Unity (whether I let Unity calculate normals or use Blender's)

Normal problem

Edit2: I just realized that I never applied the transform to the plain cube wall. When I do, the problem comes back. It looks just like the one in the screenshot except the messed up normal goes all the way from the top left to the bottom right.

Edit3: I've added the blend file for those asking about it. When the wall is set to flat shading and view mode is set to solid, the problem doesn't appear. But it does appear pretty bad in Unity whether it is set to flat shading or not and it's slightly noticeable in Blender when set to textured mode as well.

Blend file

$\endgroup$
5
  • 3
    $\begingroup$ Could you add some images or a .blend? I can't seem to reproduce this. $\endgroup$
    – gandalf3
    Jan 15, 2014 at 23:41
  • $\begingroup$ I added a screenshot. It may be a different issue now because I deleted the old walls and started over. The one that is just a cube is no longer having the problem. It persists in the two with cutouts though. $\endgroup$
    – John
    Jan 17, 2014 at 14:03
  • 1
    $\begingroup$ Have you tried the latest build other than the one you're using? Since it would possibly be a bug, and possibly be fixed already. Btw, It's true that "A picture paints a thousand words", but a .blend file is the straightest way to expose the issue to others, if possible. $\endgroup$ Jan 17, 2014 at 16:07
  • $\begingroup$ I just updated the question with a link the blend file. I'm already using 2.69, which is the latest version listed on the site. $\endgroup$
    – John
    Jan 17, 2014 at 23:28
  • $\begingroup$ I still can't reproduce the problem, even when using the linked file. Scaling and applying scale does not seem to affect the shading either. Tested with smooth shading in solid view. $\endgroup$
    – gandalf3
    Jan 18, 2014 at 7:36

5 Answers 5

2
$\begingroup$

The problem can also be caused by manifold meshes that have other issues, such as non-uniform normals. I ran into this issue just yesterday. I extruded a single plane into a prism, without realizing that the plane had preexisting issues with its normals.

As an aside: faces don't actually have normals. Each vert has a normal and a face's normal is calculated from its associated verts. One of my verts must have been upside-down, making the plane's normal... weird. As odd as that is to consider, it can happen.

The tricky part was that the resulting prism looked perfectly fine. The problem manifested in OTHER parts of the same object (as invisible faces), but that were not connected to the prism, even though there was nothing actually wrong with the part of the mesh where the issues manifested. It took me FOREVER to figure out, because I thought it was a non-manifold edge somewhere. Once I recalculated the normals on that prism, (because I'd tried EVERYTHING else) everything was fine.

All of which is to say, the problem may actually be in a part of your mesh that looks totally fine.

$\endgroup$
1
$\begingroup$

The most common cause for normals failing to calculate correctly is a non-manifold mesh. Manifold means that every edge has exactly two faces attached to it. Non-manifolds occur, for instance, when there are internal faces connected to the surface.

By pressing shiftaltctrl-m (edit mode, edge or vertex selection mode), you can select all non-manifold edges.

Then remove the "errors" manually one by one.

After this, pressing ctrl-n should give you the desired result.

$\endgroup$
2
  • $\begingroup$ The OP said that this is occurring on a cube. "The geometry is fairly simple, as I said one of the walls it happens to is just a scaled cube. It's only got 8 vertices. So there are no duplicate vertices, or hidden faces, or anything else I can think of that might cause the problem." $\endgroup$
    – gandalf3
    Jan 16, 2014 at 8:44
  • $\begingroup$ After redoing the walls, the problem is no longer there in the one that is just a scaled cube. The ones with the cutouts still have the problem, but selecting all non-manifold edges didn't select anything so I'm guessing that isn't the problem. $\endgroup$
    – John
    Jan 17, 2014 at 14:05
1
$\begingroup$

I don't think there is anything wrong with your normals. This is what happens if you set an edge where the 2 adjacent faces have an angle > ~50° to smooth shading. The interpolation fails / is a bit off. If you set a cube to smooth shading it will also not display correctly. I cannot check the blendfile, it is no longer available, but adding a bevel or edge split modifier should solve that problem.

$\endgroup$
1
$\begingroup$

After having the same issue today, I have found a solution quite simple:
"Clear Custom Split Normals Data"

  1. First Solution : Clearing Custom Split Normals Data

    Warning: This is a Mesh operation, so selection will not affect it !

    1. Press the Space-Bar
    2. Search "Clear Custom"
    3. And execute the command
    4. Et voilà !
  2. Second Solution : Sharp Edges
    • This might also due to sharp edges apparently : blend4web Fixing Normals - Sharp Edges In case it's going down :
      1. In Edit-Mode, open the side menu with N
      2. In Mesh Display, check Sharp
      3. Check for any unwanted sharp edge and select them
      4. Press Ctrl + V and select Clear Sharp Edges
$\endgroup$
1
$\begingroup$

After applying scale, if the normals/shading look(s) messed up, they can be fixed by selecting "Auto Smooth" under the Normals section of the Object Data tab (the icon with three vertices).

Also, if that does not fix it, check out the Normal Edit Modifier (AKA Set Split Normals Modifier). I suggest separating the messed up part of the mesh (unless the whole mesh is messed up) and then adding this Modifier. It will tell you to set Auto Smooth (see above) before proceeding. I did not use this modifier much (I believe offset values must be changed for it to have an effect, though) because my problem was fixed once I enabled Auto Smooth for normals, but hopefully the Modifier will help you.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .