"Set normal from faces" operator does not work in a sensible way, needs decision on what is expected behavior here. #64419

Open
opened 2019-05-10 08:38:53 +02:00 by Johan Ernstsson · 6 comments

Reading current code of that operator, it's not making much sense…

  • It computes some averaged vertex normals out of select faces' normals only (without even complying to our generic, weighted computation for that).
  • It then does two different loops (over selected verts of edges of faces first, then over loops of verts), to set some custom normals to those weirdly averaged vertex normals computed at step 1.

I think what it is supposed to/trying to do here is actually the following:

For each clnor fan (i.e. set of contiguous faces around a given vertex, delimited by sharp edges, that share the same custom normal), properly compute the averaged normal from selected faces, and set it.

This will give predictable results, when a single face is selected for each custom normal it will just set to that face's normal, same in case all edges are sharp… And the 'keep sharp edges' option is not needed anymore, I do not see the reason for that one anyway, if you do not want a sharp edge, just do not tag it as such. ;)


Original Report

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 417.35

Blender Version
Broken: version: 2.80 (sub 60), branch: master, commit date: 2019-05-09 17:55, hash: 427c75e4c2
Worked: (optional)

Short description of error
[I can not use set normals from faces when selecting a specific face. When I split normals/make em sharp I expect that I can control specific face normal without it interfering with the other normals, this is at least how you do it in all other 3d packages]

Exact steps for others to reproduce the error
[Split/ make all edges sharp, select all vertexes, go to mesh/normal/rotate to make all normals crazy. Now try to set the normals from one of the faces.Normals.blend ]
[Based on the default startup or an attached .blend file (as simple as possible)]

Reading current code of that operator, it's not making much sense… - It computes some averaged vertex normals out of select faces' normals only (without even complying to our generic, weighted computation for that). - It then does two different loops (over selected verts of edges of faces first, then over loops of verts), to set some custom normals to those weirdly averaged vertex normals computed at step 1. I think what it is supposed to/trying to do here is actually the following: # For each clnor fan (i.e. set of contiguous faces around a given vertex, delimited by sharp edges, that share the same custom normal), properly compute the averaged normal from **selected** faces, and set it. This will give predictable results, when a single face is selected for each custom normal it will just set to that face's normal, same in case all edges are sharp… And the 'keep sharp edges' option is not needed anymore, I do not see the reason for that one anyway, if you do not want a sharp edge, just do not tag it as such. ;) ----------------- Original Report ----------------- **System Information** Operating system: Windows-10-10.0.17134 64 Bits Graphics card: GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 417.35 **Blender Version** Broken: version: 2.80 (sub 60), branch: master, commit date: 2019-05-09 17:55, hash: `427c75e4c2` Worked: (optional) **Short description of error** [I can not use set normals from faces when selecting a specific face. When I split normals/make em sharp I expect that I can control specific face normal without it interfering with the other normals, this is at least how you do it in all other 3d packages] **Exact steps for others to reproduce the error** [Split/ make all edges sharp, select all vertexes, go to mesh/normal/rotate to make all normals crazy. Now try to set the normals from one of the faces.[Normals.blend](https://archive.blender.org/developer/F7023944/Normals.blend) ] [Based on the default startup or an attached .blend file (as simple as possible)]

Added subscriber: @Ernstsson

Added subscriber: @Ernstsson
Member

Added subscribers: @mont29, @lichtwerk

Added subscribers: @mont29, @lichtwerk
Member

By quick glance this will work on all associated loops of the corresponding vert.
(I see the point where this is not desirable)

I think this could be changed to only alter loops of selected faces [at least if Keep sharp Edges is ON]

@mont29: not sure this is considered a bug? Should we put this on TODO [could try my luck on this if desired...]?

By quick glance this will work on all associated loops of the corresponding vert. (I see the point where this is not desirable) I think this could be changed to only alter loops of selected faces [at least if `Keep sharp Edges` is ON] @mont29: not sure this is considered a bug? Should we put this on TODO [could try my luck on this if desired...]?

Thank you for looking into this! It is crucial for game dev to be able to have full control of the normals.

Thank you for looking into this! It is crucial for game dev to be able to have full control of the normals.

The thing is that this used to be a "bug" and it got fixed a couple a months ago, but now it is back again.

The thing is that this used to be a "bug" and it got fixed a couple a months ago, but now it is back again.
Bastien Montagne was assigned by Sebastian Parborg 2019-06-11 14:54:58 +02:00

Hmmmpf… reading code of that operator, it's not making much sense…

  • It computes some averaged vertex normals out of select faces' normals only (without even complying to our generic, weighted computation for that).
  • It then does two different loops (over selected verts of edges of faces first, then over loops of verts), to set some custom normals to those weirdly averaged vertex normals computed at step 1.

I think what it is supposed to/trying to do here is actually the following:

For each clnor fan (i.e. set of contiguous faces around a given vertex, delimited by sharp edges, that share the same custom normal), properly compute the averaged normal from selected faces, and set it.

This will give predictable results, when a single face is selected for each custom normal it will just set to that face's normal, same in case all edges are sharp… And the 'keep sharp edges' option is not needed anymore, I do not see the reason for that one anyway, if you do not want a sharp edge, just do not tag it as such. ;)

@Ernstsson you claim that that was already reported and fixed, would be interested to see that previous report, might shed some light on that topic.

PS: I would not rush a fix here for 2.80 anyway, that code has been working that way since the beginning afaict, so this is more a TODO than a bug really.

Hmmmpf… reading code of that operator, it's not making much sense… - It computes some averaged vertex normals out of select faces' normals only (without even complying to our generic, weighted computation for that). - It then does two different loops (over selected verts of edges of faces first, then over loops of verts), to set some custom normals to those weirdly averaged vertex normals computed at step 1. I think what it is supposed to/trying to do here is actually the following: # For each clnor fan (i.e. set of contiguous faces around a given vertex, delimited by sharp edges, that share the same custom normal), properly compute the averaged normal from **selected** faces, and set it. This will give predictable results, when a single face is selected for each custom normal it will just set to that face's normal, same in case all edges are sharp… And the 'keep sharp edges' option is not needed anymore, I do not see the reason for that one anyway, if you do not want a sharp edge, just do not tag it as such. ;) @Ernstsson you claim that that was already reported and fixed, would be interested to see that previous report, might shed some light on that topic. PS: I would not rush a fix here for 2.80 anyway, that code has been working that way since the beginning afaict, so this is more a TODO than a bug really.
Bastien Montagne changed title from Set normal from faces do not respect sharp or splited normals. to "Set normal from faces" operator does not work in a sensible way, needs decision on what is expected behavior here. 2019-06-25 16:18:22 +02:00
Philipp Oeser removed the
Interest
Modeling
label 2023-02-09 15:29:52 +01:00
Bastien Montagne removed their assignment 2023-02-21 10:37:21 +01:00
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
3 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#64419
No description provided.