Page MenuHome

Normal-Edit-modified mesh doesn't respect normals
Closed, ArchivedPublic


System Information
Operating system: Windows 8.1 x64
Graphics card: Nvidia GTX 960m, Intel HD Graphics 4600

Blender Version
Blender 2.79 official release

Short description of error
If you use the Normal Edit modifier on Directional mode on all vertices of a mesh, the mesh will not display according to the edited normals.

Exact steps for others to reproduce the error

  • Create a sphere, an empty and a lamp.
  • Add a Normal Edit modifier to the sphere, set it to Directional mode, turn on Parallel Normals and set the empty as target object.
  • Move the empty up, so every single normal of the mesh points up.
  • Apply the modifier and render the scene. The mesh will not display as it should.

I didn't post this in the Modifiers area because the modifiers and the mesh-displayed normals seem to be working right (see the image below with the purple normals), but the mesh doesn't respect the edited normals when rendered or when viewed in viewport-render mode or viewport-material mode.

If you set the viewport display mode to solid then it does look right: the entire mesh has one flat shade, since all normals point in the same direction.



Event Timeline

Bastien Montagne (mont29) triaged this task as Needs Information from User priority.

Please follow our submission template and guidelines, also read these tips about bug reports, and make a complete, valid bug report, with required info, precise description of the issue (only ONE issue per report!), precise steps to reproduce it, small and simple .blend and/or other files to do so if needed, etc.

A test scene with the problem:

Bastien Montagne (mont29) closed this task as Archived.Jan 12 2019, 2:53 PM
Bastien Montagne (mont29) claimed this task.

Ok Thanks. I think what you mean by 'not render correctly' is the small (or not so small) dark faces on the left side near the lit/shadowed limit on the sphere? Those are terminator issues, caused by vertices normals being nearly aligned with the surface. That is not something you want to have if you expect consistent, predictable shading.

I guess more basic workbench drawing is not affected because it has some much simpler processing on lighting and shading.

In any case, see no bug here, just common CG limitation, thanks for the report anyway.

No, it's a bug.
The level of shading on a vertex depends on its normal.
If all vertices have the exact same normals, then all vertices should have the exact same shading, regardless of the shape of the mesh.

There should be no terminator (a transition between lit and unlit), because there's only one level of shading for the entire mesh.

I wish we could get a second opinion before archiving this.

No it’s not a bug. Check for 'shading terminator' on the web…

Sure @Brecht Van Lommel (brecht) or @Clément Foucault (fclem) can confirm, if you need a second opinion. :)

I put together a shader sandbox demo, for context:

Images based on that demo:

On Blender 2.79, Cycles:

The terminator problem is about shadows based on actual geometry not matching fake shading normals. Without shadows there is no problem.

Using 2.79, Blender Render engine, Material viewport-shade mode:

  1. Standard scene:
  1. Material viewport-shade mode (sun ray-traced shadow is set to a red color):
  1. Now using custom normals with the Normal Edit modifier:
  1. Material viewport-shade mode, using custom normals:

The visuals in #4 also happen with rendered Blender Render and rendered Cycles, and I'd imagine rendered Eevee too (untested).
If you need more information let me know. Thank you for triaging.

This seems to confirm it is the shadow terminator problem, which we do not consider a bug.

Hi Brecht.
Can you explain to me why the black faces in image #4 advance way further than the terminator seen in #2? (Considering that the scene layout is the same, just settings changed)

In fact, the black faces advance up to the specular highlights.

Rafael Navega (RN) added a comment.EditedJan 14 2019, 10:26 AM

This problem seems to be described in here:

But the "lock face winding" option was removed from the modifier UI in 2.79, it seems.

Edit: and thank you for the article.

Ok, so for anyone coming to this in the future, set your custom normals with scripting rather than with the Normal Edit modifier. The modifier changes face winding and that's what causes the blocky patches, not a shading problem.

If you set your custom normals from a script (like an add-on tool) then the mesh renders as expected.