Vertex Normal Tools not working/buggy #69019

Closed
opened 2019-08-22 00:29:27 +02:00 by Ulyses · 19 comments

The new normal tools, whilst extremely appreciated, seem to not work, crash the program, or are half the time, buggy as hell. Well, at least these two, which are arguably the best of the bunch.
Here they are recreated in gif forms:

Mesh>Normals>Point to target crashes blender any time a button is pressed that isnt "accept": https://gyazo.com/3a879f6a26ba3548bbb7d81c9a8881bd
(here I press M, and it immediately crashes blender)

Mesh>Normals> Copy/Paste Vectors do absolutely nothing: https://gyazo.com/00af80b3427f83644f860002593645fa
(Had to do it fast because of limitations of gyazo, but unless I press on "absolute coordinates", which just points the vertex normal towards the origin point, nothing happens)

Hope this is fixed soon, as it'd be incredible if they worked correctly!, thank you very much for your hard work!

The new normal tools, whilst extremely appreciated, seem to not work, crash the program, or are half the time, buggy as hell. Well, at least these two, which are arguably the best of the bunch. Here they are recreated in gif forms: Mesh>Normals>Point to target crashes blender any time a button is pressed that isnt "accept": https://gyazo.com/3a879f6a26ba3548bbb7d81c9a8881bd (here I press M, and it immediately crashes blender) Mesh>Normals> Copy/Paste Vectors do absolutely nothing: https://gyazo.com/00af80b3427f83644f860002593645fa (Had to do it fast because of limitations of gyazo, but unless I press on "absolute coordinates", which just points the vertex normal towards the origin point, nothing happens) Hope this is fixed soon, as it'd be incredible if they worked correctly!, thank you very much for your hard work!
Ulyses self-assigned this 2019-08-22 00:29:27 +02:00
Author

Added subscriber: @Yoolie

Added subscriber: @Yoolie
Ulyses removed their assignment 2019-08-22 00:40:29 +02:00

Added subscriber: @mont29

Added subscriber: @mont29

Cannot reproduce either of those issues from quick test.

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.
Videos and/or links to external sites etc. are not acceptable as bug report (they can be provided as additional information only).

Cannot reproduce either of those issues from quick test. Please follow our [submission template and guidelines](https:*developer.blender.org/maniphest/task/edit/form/1/), also read [these tips about bug reports](https:*wiki.blender.org/wiki/Process/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. Videos and/or links to external sites etc. **are not acceptable** as bug report (they can be provided as additional information **only**).
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Does this happen with Factory Settings as well?

(been noticing you are getting the "Move Selected items" popup, are you getting this when pressing M? this shouldnt be there...)
Maybe there is something in your keymap conflicting? (It shouldnt really, but just trying to get closer to the issue...)

Does this happen with Factory Settings as well? (been noticing you are getting the "Move Selected items" popup, are you getting this when pressing `M`? this shouldnt be there...) Maybe there is something in your keymap conflicting? (It shouldnt really, but just trying to get closer to the issue...)

Added subscriber: @capnm

Added subscriber: @capnm

I could this one easy reproduce:

$ blender --factory-startup
a; x
add plane; enter edit mode
mesh → normals → point to target
hit m (point to mouse)

Writing: /tmp/blender.crash.txt
Segmentation fault

cat /tmp/blender.crash.txt

# Blender 2.81 (sub 3), Commit date: 2019-08-22 03:23, Hash 0356c8f25b96
bpy.ops.object.select_all(action='SELECT')  # Operator
bpy.ops.object.delete(use_global=False)  # Operator
Deleted 3 object(s)  # Info
bpy.ops.mesh.primitive_plane_add(size=2, enter_editmode=False, location=(0, 0, 0))  # Operator
bpy.ops.object.editmode_toggle()  # Operator
bpy.ops.object.editmode_toggle()  # Operator
bpy.ops.object.editmode_toggle()  # Operator

# backtrace
b8(BLI_system_backtrace+0x33) [0x56213dce94d3]
b8(+0x1283010) [0x56213dac0010]
/lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f28eea7ff20]
b8(ED_view3d_win_to_3d+0x2e) [0x56213e661d7e]
b8(ED_view3d_win_to_3d_int+0x38) [0x56213e662088]
b8(+0x1d287fa) [0x56213e5657fa]
b8(+0x168ac11) [0x56213dec7c11]
b8(+0x168bf15) [0x56213dec8f15]
b8(+0x168d5ec) [0x56213deca5ec]
b8(wm_event_do_handlers+0x390) [0x56213decad40]
b8(WM_main+0x20) [0x56213dec08b0]
b8(main+0x33d) [0x56213da73cad]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f28eea62b97]
b8(_start+0x2a) [0x56213dabc55a]
Thread 1 "b8" received signal SIGSEGV, Segmentation fault.
ED_view3d_win_to_3d (v3d=v3d@entry=0x7fffce673c08, ar=ar@entry=0x7fffccfe7c48, depth_pt=depth_pt@entry=0x7fffffffd76c, mval=mval@entry=0x7fffffffd6b0, 
    r_out=r_out@entry=0x7fffffffd754) at source/blender/editors/space_view3d/view3d_project.c:554
554	  if (rv3d->is_persp) {
(gdb) l
549	
550	  float ray_origin[3];
551	  float ray_direction[3];
552	  float lambda;
553	
--> 554	  if (rv3d->is_persp) {
555	    float plane[4];
556	
557	    copy_v3_v3(ray_origin, rv3d->viewinv[3]);
558	    ED_view3d_win_to_vector(ar, mval, ray_direction);
(gdb) bt
- 0  0x0000555557378d7e in ED_view3d_win_to_3d (v3d=v3d@entry=0x7fffce673c08, ar=ar@entry=0x7fffccfe7c48, depth_pt=depth_pt@entry=0x7fffffffd76c, mval=mval@entry=0x7fffffffd6b0, r_out=r_out@entry=0x7fffffffd754) at source/blender/editors/space_view3d/view3d_project.c:554
- 1  0x0000555557379088 in ED_view3d_win_to_3d_int (v3d=v3d@entry=0x7fffce673c08, ar=ar@entry=0x7fffccfe7c48, depth_pt=depth_pt@entry=0x7fffffffd76c, mval=mval@entry=0x7fffa6765624, r_out=r_out@entry=0x7fffffffd754) at source/blender/editors/space_view3d/view3d_project.c:605
#2  0x000055555727c7fa in edbm_point_normals_modal (C=0x7fffcf06d488, op=<optimized out>, event=0x7fffa6765608)
    at source/blender/editors/mesh/editmesh_tools.c:7988
- 3  0x0000555556bdec11 in wm_handler_operator_call (C=C@entry=0x7fffcf06d488, handlers=handlers@entry=0x7fffccf42898, handler_base=handler_base@entry=0x7fffa679fa18, event=event@entry=0x7fffa6765608, properties=properties@entry=0x0) at source/blender/windowmanager/intern/wm_event_system.c:2188
- 4  0x0000555556bdff15 in wm_handlers_do_intern (C=C@entry=0x7fffcf06d488, event=event@entry=0x7fffa6765608, handlers=handlers@entry=0x7fffccf42898)
    at source/blender/windowmanager/intern/wm_event_system.c:2905
#5  0x0000555556be15ec in wm_handlers_do (C=C@entry=0x7fffcf06d488, event=event@entry=0x7fffa6765608, handlers=handlers@entry=0x7fffccf42898)
    at source/blender/windowmanager/intern/wm_event_system.c:2953
- 6  0x0000555556be1d40 in wm_event_do_handlers (C=C@entry=0x7fffcf06d488) at source/blender/windowmanager/intern/wm_event_system.c:3331
- 7  0x0000555556bd78b0 in WM_main (C=0x7fffcf06d488) at source/blender/windowmanager/intern/wm.c:417
#8  0x000055555678acad in main (argc=2, argv=0x7fffffffdda8) at source/creator/creator.c:491
I could this one easy reproduce: $ blender --factory-startup a; x add plane; enter edit mode mesh → normals → point to target hit m (point to mouse) Writing: /tmp/blender.crash.txt Segmentation fault cat /tmp/blender.crash.txt ``` # Blender 2.81 (sub 3), Commit date: 2019-08-22 03:23, Hash 0356c8f25b96 bpy.ops.object.select_all(action='SELECT') # Operator bpy.ops.object.delete(use_global=False) # Operator Deleted 3 object(s) # Info bpy.ops.mesh.primitive_plane_add(size=2, enter_editmode=False, location=(0, 0, 0)) # Operator bpy.ops.object.editmode_toggle() # Operator bpy.ops.object.editmode_toggle() # Operator bpy.ops.object.editmode_toggle() # Operator # backtrace b8(BLI_system_backtrace+0x33) [0x56213dce94d3] b8(+0x1283010) [0x56213dac0010] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f28eea7ff20] b8(ED_view3d_win_to_3d+0x2e) [0x56213e661d7e] b8(ED_view3d_win_to_3d_int+0x38) [0x56213e662088] b8(+0x1d287fa) [0x56213e5657fa] b8(+0x168ac11) [0x56213dec7c11] b8(+0x168bf15) [0x56213dec8f15] b8(+0x168d5ec) [0x56213deca5ec] b8(wm_event_do_handlers+0x390) [0x56213decad40] b8(WM_main+0x20) [0x56213dec08b0] b8(main+0x33d) [0x56213da73cad] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f28eea62b97] b8(_start+0x2a) [0x56213dabc55a] ``` ``` Thread 1 "b8" received signal SIGSEGV, Segmentation fault. ED_view3d_win_to_3d (v3d=v3d@entry=0x7fffce673c08, ar=ar@entry=0x7fffccfe7c48, depth_pt=depth_pt@entry=0x7fffffffd76c, mval=mval@entry=0x7fffffffd6b0, r_out=r_out@entry=0x7fffffffd754) at source/blender/editors/space_view3d/view3d_project.c:554 554 if (rv3d->is_persp) { (gdb) l 549 550 float ray_origin[3]; 551 float ray_direction[3]; 552 float lambda; 553 --> 554 if (rv3d->is_persp) { 555 float plane[4]; 556 557 copy_v3_v3(ray_origin, rv3d->viewinv[3]); 558 ED_view3d_win_to_vector(ar, mval, ray_direction); (gdb) bt - 0 0x0000555557378d7e in ED_view3d_win_to_3d (v3d=v3d@entry=0x7fffce673c08, ar=ar@entry=0x7fffccfe7c48, depth_pt=depth_pt@entry=0x7fffffffd76c, mval=mval@entry=0x7fffffffd6b0, r_out=r_out@entry=0x7fffffffd754) at source/blender/editors/space_view3d/view3d_project.c:554 - 1 0x0000555557379088 in ED_view3d_win_to_3d_int (v3d=v3d@entry=0x7fffce673c08, ar=ar@entry=0x7fffccfe7c48, depth_pt=depth_pt@entry=0x7fffffffd76c, mval=mval@entry=0x7fffa6765624, r_out=r_out@entry=0x7fffffffd754) at source/blender/editors/space_view3d/view3d_project.c:605 #2 0x000055555727c7fa in edbm_point_normals_modal (C=0x7fffcf06d488, op=<optimized out>, event=0x7fffa6765608) at source/blender/editors/mesh/editmesh_tools.c:7988 - 3 0x0000555556bdec11 in wm_handler_operator_call (C=C@entry=0x7fffcf06d488, handlers=handlers@entry=0x7fffccf42898, handler_base=handler_base@entry=0x7fffa679fa18, event=event@entry=0x7fffa6765608, properties=properties@entry=0x0) at source/blender/windowmanager/intern/wm_event_system.c:2188 - 4 0x0000555556bdff15 in wm_handlers_do_intern (C=C@entry=0x7fffcf06d488, event=event@entry=0x7fffa6765608, handlers=handlers@entry=0x7fffccf42898) at source/blender/windowmanager/intern/wm_event_system.c:2905 #5 0x0000555556be15ec in wm_handlers_do (C=C@entry=0x7fffcf06d488, event=event@entry=0x7fffa6765608, handlers=handlers@entry=0x7fffccf42898) at source/blender/windowmanager/intern/wm_event_system.c:2953 - 6 0x0000555556be1d40 in wm_event_do_handlers (C=C@entry=0x7fffcf06d488) at source/blender/windowmanager/intern/wm_event_system.c:3331 - 7 0x0000555556bd78b0 in WM_main (C=0x7fffcf06d488) at source/blender/windowmanager/intern/wm.c:417 #8 0x000055555678acad in main (argc=2, argv=0x7fffffffdda8) at source/creator/creator.c:491 ```
Member

OK, getting it from the menu, too.
Works from Alt+N though...

OK, getting it from the menu, too. Works from `Alt`+`N` though...
Philipp Oeser self-assigned this 2019-08-22 12:45:27 +02:00
Member

Since in the case of calling this from the menu, this is coming from RGN_TYPE_HEADER not RGN_TYPE_WINDOW, so doing RegionView3D *rv3d = ar->regiondata fails.
I think we had similar issues before, let me dig them up...

Since in the case of calling this from the menu, this is coming from RGN_TYPE_HEADER not RGN_TYPE_WINDOW, so doing `RegionView3D *rv3d = ar->regiondata` fails. I think we had similar issues before, let me dig them up...
Member

Committed a fix for the crash, the Copy / Paste issue needs another look...

Committed a fix for the crash, the `Copy` / `Paste` issue needs another look...
Member

Added subscriber: @WilliamReynish

Added subscriber: @WilliamReynish
Member

Regarding the Copy / Paste functionality:

  • documentation is a little sparse here :)
  • from reading code it looks like you can only copy from a single face or single vertex (so Copy Vectors / Paste Vectors should be renamed back to Copy / Paste [or at least Vector -- singular], was done in df712d74a2 and also mentioned as being bad in #67370)
  • in case of copying from a single selected vertex (thats what you do) there is also a check that all loop normals are the same (this is hard to tell in your video), otherwise the previous copy buffer is left untouched [or zero even]
  • so in your case it would only work if all split normals are actually the same on the selected vertex when copying (e.g. by running Average > Custom Normal prior) -- it is kinda hard to tell in the video if that is the case..
  • if these split normals are all the same when copying, then pasting works like a charm here...

CC @WilliamReynish (regarding Copy Vectors vs. Copy Vector or Copy)
CC @mont29 (regarding the fact that we are pretending to copy from non-equal-split-normals [which we dont do, without any User feedback whatsoever...]; shouldnt we warn here that copying didnt take place? Or just copy the Average in that case?)

@Yoolie : can you confirm this works for you if you are copying from an "averaged-all-the-same" Custom Normal?

Regarding the Copy / Paste functionality: - documentation is a little sparse here :) - from reading code it looks like you can only copy from a single face or single vertex (so `Copy Vectors` / `Paste Vectors` should be renamed back to `Copy` / `Paste` [or at least Vector -- singular], was done in df712d74a2 and also mentioned as being bad in #67370) - in case of copying from a single selected vertex (thats what you do) there is also a check that all loop normals are the same (this is hard to tell in your video), otherwise the previous copy buffer is left untouched [or zero even] - so in your case it would only work if all split normals are actually the same on the selected vertex when copying (e.g. by running `Average` > `Custom Normal` prior) -- it is kinda hard to tell in the video if that is the case.. - if these split normals are all the same when copying, then pasting works like a charm here... CC @WilliamReynish (regarding `Copy Vectors` vs. `Copy Vector` or `Copy`) CC @mont29 (regarding the fact that we are pretending to copy from non-equal-split-normals [which we dont do, without any User feedback whatsoever...]; shouldnt we warn here that copying didnt take place? Or just copy the Average in that case?) @Yoolie : can you confirm this works for you if you are copying from an "averaged-all-the-same" Custom Normal?
Author

@lichtwerk : I've done what you asked, I ran Average > Custom Normal prior to copy pasting on a simpler model (subdivided cube), and it still doesn't work. as seen here: https://gyazo.com/66c225f3b4265a5c68bb82f8017f48bf
I must add though, it does indeed work in face select mode; which is actually an incredibly nice behaviour and I don't know why I didn't think of doing it that way as it states "copy vectors" I thought it was the vertices! so maybe I've just been using it wrong all this time, and it wasn't ever meant for vertices, just faces!
Anyways, if it was actually mean to work in vertex mode, it's not doing much and the question still stands; if it was never meant to work in vertex mode... I guess nothing was broken in the first place?

@lichtwerk : I've done what you asked, I ran Average > Custom Normal prior to copy pasting on a simpler model (subdivided cube), and it still doesn't work. as seen here: https://gyazo.com/66c225f3b4265a5c68bb82f8017f48bf I must add though, it *does* indeed work in face select mode; which is actually an incredibly nice behaviour and I don't know why I didn't think of doing it that way as it states "copy vectors" I thought it was the vertices! so maybe I've just been using it wrong all this time, and it wasn't ever meant for vertices, just faces! Anyways, if it was actually mean to work in vertex mode, it's not doing much and the question still stands; if it was never meant to work in vertex mode... I guess nothing was broken in the first place?
Member

It is meant for faces as well as vertices [well only one at a time for either faces or vertices].
In the case of faces, it just copies the face normal.
But it should work for vertices as well, try this:
#69019.blend

  • open .blend
  • (it already has averaged Custom Split Normals)
  • Copy Vectors from the already selected vertex
  • Paste Vectors to the other vertex (circled in blue)
  • should come out like, no?
    #69019.png
It is meant for faces as well as vertices [well only one at a time for either faces or vertices]. In the case of faces, it just copies the face normal. But it should work for vertices as well, try this: [#69019.blend](https://archive.blender.org/developer/F7693121/T69019.blend) - open .blend - (it already has averaged Custom Split Normals) - Copy Vectors from the already selected vertex - Paste Vectors to the other vertex (circled in blue) - should come out like, no? ![#69019.png](https://archive.blender.org/developer/F7693129/T69019.png)
Author

@lichtwerk I've tried what you asked and made a quick gif showing the results: https://gyazo.com/6abd38ff8ac5741f2dd9200268d45fab
It seems to do something now, as the vertex normal actually moved, but it doesn't seem to be actually copying the normals from the "copied" vertex normal. I haven't changed or done anything to the file btw, the colors are just my blender theme, and I believe I just moved the camera a bit.

@lichtwerk I've tried what you asked and made a quick gif showing the results: https://gyazo.com/6abd38ff8ac5741f2dd9200268d45fab It seems to do something now, as the vertex normal actually moved, but it doesn't seem to be actually copying the normals from the "copied" vertex normal. I haven't changed or done anything to the file btw, the colors are just my blender theme, and I believe I just moved the camera a bit.
Member

Please try this in a current build from https://builder.blender.org/download/ and report back if it works for you there.
(2.80 -- assume you are using this -- doesnt have above fix, and also seems to display Custom Split Normals wrong)
In a current build, all seems to work nicely for me (shading, normals display, ...).

Please try this in a current build from https://builder.blender.org/download/ and report back if it works for you there. (2.80 -- assume you are using this -- doesnt have above fix, and also seems to display Custom Split Normals wrong) In a current build, all seems to work nicely for me (shading, normals display, ...).

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

More than a week without reply or activity. Due to the policy of the tracker archiving for until required info/data are provided.

More than a week without reply or activity. Due to the policy of the tracker archiving for until required info/data are provided.

Removed subscriber: @capnm

Removed subscriber: @capnm
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
4 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#69019
No description provided.