Wrong direction with recalculate normals #43848

Closed
opened 2015-03-01 12:44:19 +01:00 by Mikhail Rachinskiy · 15 comments

System Information
Windows 8.1 x64
Renderer: GeForce GTX 860M/PCIe/SSE2

Blender Version
Broken: 2.73.9 9f6f151

Short description of error
Normals recalculated inside with certain geometry.

Exact steps for others to reproduce the error

The difference between models:
diff.png

**System Information** Windows 8.1 x64 Renderer: GeForce GTX 860M/PCIe/SSE2 **Blender Version** Broken: 2.73.9 9f6f151 **Short description of error** Normals recalculated inside with certain geometry. **Exact steps for others to reproduce the error** - Open blend file: [normals_outside.blend](https://archive.blender.org/developer/F146508/normals_outside.blend) - Press Ctrl N (see how normals turned inside on the left model) The difference between models: ![diff.png](https://archive.blender.org/developer/F146506/diff.png)
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @MikhailRachinskiy

Added subscriber: @MikhailRachinskiy
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

There is an option in the Redo Panel called "Inside" which should help you getting the desired result.
recalculate_normals_bug.png Does that help?

There is an option in the Redo Panel called "Inside" which should help you getting the desired result. ![recalculate_normals_bug.png](https://archive.blender.org/developer/F146526/recalculate_normals_bug.png) Does that help?
Author
Member

No, it does not help, because then normals on the right model will turn inside.

No, it does not help, because then normals on the right model will turn inside.

Added subscriber: @mont29

Added subscriber: @mont29

Not sure this is actually a bug… At least, it behaves accordingly to what you may expect from our code.

Thing is, we choose a first face, and if its normal is not 'aligned' with the vector from an average center point to that face's center, we flip it. Then, all other faces are aligned to that reference one.

Now, currently, we choose the farthest face as ref one, in that case the tip-top one, and you can see that the line between that face's center and the average center of the mesh is nearly orthogonal to its normal…

There are two things that annoy me in our code, though:

  • Why choose the farthest face? Do not see any particular reason (pro or con) for that…
  • Our average center point does not takes into account faces' surface, which means a set of small faces tend to 'drag' that center point to them, facilitating extreme cases like in this example. Tried taking surfaces' area into account and did not change anything in this case though.

Campbell, would like your feedback on this one?

Not sure this is actually a bug… At least, it behaves accordingly to what you may expect from our code. Thing is, we choose a first face, and if its normal is not 'aligned' with the vector from an average center point to that face's center, we flip it. Then, all other faces are aligned to that reference one. Now, currently, we choose the farthest face as ref one, in that case the tip-top one, and you can see that the line between that face's center and the average center of the mesh is nearly orthogonal to its normal… There are two things that annoy me in our code, though: * Why choose the farthest face? Do not see any particular reason (pro or con) for that… * Our average center point does not takes into account faces' surface, which means a set of small faces tend to 'drag' that center point to them, facilitating extreme cases like in this example. Tried taking surfaces' area into account and did not change anything in this case though. Campbell, would like your feedback on this one?

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Member

@MikhailRachinskiy, even though I agree with Bastien that this could/should be improved, I think you can get the desired result by doing the normal correction on each mesh island separately, so you select one by mouse hovering it and pressing L, correct normals, then the same with the other one. You can then use the "Inside" option for the one that doesn't look correct. For me this seems to work fine.

@MikhailRachinskiy, even though I agree with Bastien that this could/should be improved, I think you can get the desired result by doing the normal correction on each mesh island separately, so you select one by mouse hovering it and pressing L, correct normals, then the same with the other one. You can then use the "Inside" option for the one that doesn't look correct. For me this seems to work fine.

@JulianEisel this is not the issue here. The question is, that algo is supposed to recompute normals outside, and in this case it fails.

This is of course not a dramatic bug (if we even consider this a bug), it’s easy to work around it, but there’s no reason to tag this as incomplete, issue is easily confirmed.

@JulianEisel this is not the issue here. The question is, that algo is supposed to recompute normals **outside**, and in this case it fails. This is of course not a dramatic bug (if we even consider this a bug), it’s easy to work around it, but there’s no reason to tag this as incomplete, issue is easily confirmed.
Author
Member

@JulianEisel I have an addon which turns non-manifold geometry in to manifold and then execute boolean operation, this is where I use "Make Normals Consisten" operator, so in my case I cannot manually check each object for bad normals.

@JulianEisel I have an addon which turns non-manifold geometry in to manifold and then execute boolean operation, this is where I use "Make Normals Consisten" operator, so in my case I cannot manually check each object for bad normals.

This issue was referenced by 6373078321

This issue was referenced by 63730783218cc2c7f21fe4547beecd470397f35c

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 6373078321.

Closed by commit 6373078321.

Note, This solution failed in some cases.

Committed alternate fix 92ab3ba385

Note, This solution failed in some cases. Committed alternate fix 92ab3ba385
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#43848
No description provided.