Flipping Custom Split Normal Data leads to artifacts #71488

Closed
opened 2019-11-11 09:20:47 +01:00 by Manuel Albert · 16 comments

System Information
Operating system: Windows 10 64bit
Graphics card: Quadro RTX 5000

Blender Version
Broken: 2.80 Official Release and late
Worked: Unknown

Short description of error
At blenderconference I had a quick conversation with @mont29 about this issue and tried to explain it as good as possible.
When you try to flip the normals of a mesh with custom split normal data it results in artifacts. I started conversation as a feature request but he said it is supposed to work and should be filed as a bug report.

Exact steps for others to reproduce the error
Based on the default startup or an attached .blend file (as simple as possible).

  1. Go to edit mode
  2. Object > Normals > Flip
  3. Go back to object mode and see the result

flipping_custom_normals.blend

3_wrong_shading.png

2_flipping_the_normals.png

1_flipped_normals.png

**System Information** Operating system: Windows 10 64bit Graphics card: Quadro RTX 5000 **Blender Version** Broken: 2.80 Official Release and late Worked: Unknown **Short description of error** At blenderconference I had a quick conversation with @mont29 about this issue and tried to explain it as good as possible. When you try to flip the normals of a mesh with custom split normal data it results in artifacts. I started conversation as a feature request but he said it is supposed to work and should be filed as a bug report. **Exact steps for others to reproduce the error** Based on the default startup or an attached .blend file (as simple as possible). 1) Go to edit mode 2) Object > Normals > Flip 3) Go back to object mode and see the result [flipping_custom_normals.blend](https://archive.blender.org/developer/F8028739/flipping_custom_normals.blend) ![3_wrong_shading.png](https://archive.blender.org/developer/F8028745/3_wrong_shading.png) ![2_flipping_the_normals.png](https://archive.blender.org/developer/F8028744/2_flipping_the_normals.png) ![1_flipped_normals.png](https://archive.blender.org/developer/F8028743/1_flipped_normals.png)
Author

Added subscribers: @mont29, @ManuelAlbert

Added subscribers: @mont29, @ManuelAlbert

Added subscriber: @ideasman42

Added subscriber: @ideasman42

That this is not a bug in fact, just a TODO.

Thing is, that operator does not actually flips the normals, it only reverts the face winding, which implies a revert of the automatically computed normals, and custom normals are stored in some kind of difference from auto normals, so they do get inverted as well, but in a weird way.

@ideasman42, I think we can do two things here:

  • Keep current operator as-is, but probably rename it (although I guess something like 'revert face winding' would not be really easy to understand for most users), and add a real invert normal operator that would take into account clnors.
  • Edit current operator to become aware of clnors (basically, it’d have to store them before inverting the winding, then invert those vectors, and store them back after winding and auto-normals have been inverted).

I think option two makes more sense, just not sure whether keeping the ability to only invert winding is important or not? We could also keep it as an option of the operator (something like 'Only Invert Face Winding')?

That this is not a bug in fact, just a TODO. Thing is, that operator does not actually flips the normals, it only reverts the face winding, which implies a revert of the automatically computed normals, and custom normals are stored in some kind of difference from auto normals, so they do get inverted as well, but in a weird way. @ideasman42, I think we can do two things here: - Keep current operator as-is, but probably rename it (although I guess something like 'revert face winding' would not be really easy to understand for most users), and add a real invert normal operator that would take into account clnors. - Edit current operator to become aware of clnors (basically, it’d have to store them before inverting the winding, then invert those vectors, and store them back after winding and auto-normals have been inverted). I think option two makes more sense, just not sure whether keeping the ability to only invert winding is important or not? We could also keep it as an option of the operator (something like 'Only Invert Face Winding')?
Bastien Montagne self-assigned this 2019-11-12 11:11:25 +01:00

Added subscriber: @Stan_Pancakes

Added subscriber: @Stan_Pancakes

See also #47041, and its recent manifestation on BA . Blender lacks general awareness of custom normal data for tools and modifiers (i.e. from a user's perspective, flipping, mirroring, etc. should "just work" on custom normals too, and the current behavior is unexpected).

See also #47041, and its recent [manifestation on BA ](https://blenderartists.org/t/weird-shading-being-so-dark-in-viewport/1190468). Blender lacks general awareness of custom normal data for tools and modifiers (i.e. from a user's perspective, flipping, mirroring, etc. should "just work" on custom normals too, and the current behavior is unexpected).

Added subscriber: @ZsoltStefan

Added subscriber: @ZsoltStefan

I was just having the same problem. Trying to invert custom normals of a mesh rotates them in a weird way. There used to be an addon (for 2.79) called Custom Normal Toolsthat could do that. It was removed for 2.80 (see here https://developer.blender.org/D3794) but was never replaced with an internal operator. @mont29 any chance for this?

I was just having the same problem. Trying to invert custom normals of a mesh rotates them in a weird way. There used to be an addon (for 2.79) called *Custom Normal Tools*that could do that. It was removed for 2.80 (see here https://developer.blender.org/D3794) but was never replaced with an internal operator. @mont29 any chance for this?

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

Implemented by 516e1b4031

Implemented by 516e1b4031

Added subscriber: @ZedDB

Added subscriber: @ZedDB

Changed status from 'Resolved' to: 'Confirmed'

Changed status from 'Resolved' to: 'Confirmed'

This is not fixed yet.
This seems to be an other issue than the one I fixed as simply flipping the custom normals is ok.
But when we flip both face winding and custom normals, it fails to produce good flipping results.

Normals that were not split before are split sometimes or the flipped direction is off by a bit leading to ugly shading.

This is not fixed yet. This seems to be an other issue than the one I fixed as simply flipping the custom normals is ok. But when we flip both face winding and custom normals, it fails to produce good flipping results. Normals that were not split before are split sometimes or the flipped direction is off by a bit leading to ugly shading.
Bastien Montagne was unassigned by Sebastian Parborg 2020-08-04 12:49:23 +02:00
Sebastian Parborg self-assigned this 2020-08-04 12:49:23 +02:00

Added subscriber: @psychoboy852

Added subscriber: @psychoboy852

This issue was referenced by e4370eccdf

This issue was referenced by e4370eccdf8e718b4d20ad6121145883407f686e

This issue was referenced by 0d3b5a5068

This issue was referenced by 0d3b5a50689187e574355b925225e1f909144c77

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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
7 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#71488
No description provided.