Page MenuHome

Vertex Normal Tools not working/buggy
Closed, ArchivedPublic

Description

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!

Event Timeline

Ulyses (Yoolie) removed Ulyses (Yoolie) as the assignee of this task.Aug 22 2019, 12:40 AM
Bastien Montagne (mont29) lowered the priority of this task from 90 to 30.Aug 22 2019, 11:29 AM

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).

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...)

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
Philipp Oeser (lichtwerk) raised the priority of this task from 30 to 50.Aug 22 2019, 12:26 PM

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

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...

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

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 rBdf712d74a25b and also mentioned as being bad in T67370)
  • 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 @William Reynish (billreynish) (regarding Copy Vectors vs. Copy Vector or Copy)
CC @Bastien Montagne (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?)

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

@Philipp Oeser (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?

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:

  • 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?

@Philipp Oeser (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.

Philipp Oeser (lichtwerk) lowered the priority of this task from 50 to 30.Aug 27 2019, 3:00 PM

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, ...).

Bastien Montagne (mont29) changed the task status from Unknown Status to Unknown Status.Sep 10 2019, 10:01 AM

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