Inconsistensy between two vertex extrusion methods (skin modifier) Bug? #87174

Open
opened 2021-04-03 20:08:58 +02:00 by Vyacheslav Kobozev · 6 comments

System Information
Operating system: Windows-8.1-6.3.9600-SP0 64 Bits
Graphics card: GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 461.40

Blender Version
Broken: Since 2.79b and later (tested with latest 2.93.0 Alpha, branch: master, commit date: 2021-04-01 15:32, hash: 76cdcc2bca)

Short description of error
When I use E, skin root moves with extrusion. When I use Ctrl+RMB, root remains at 1st vertex.
I expect keeping root in both cases.

skin extrude.mp4

If it is intended, I can`t see the difference between two extrusions.

**System Information** Operating system: Windows-8.1-6.3.9600-SP0 64 Bits Graphics card: GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 461.40 **Blender Version** Broken: Since 2.79b and later (tested with latest 2.93.0 Alpha, branch: master, commit date: 2021-04-01 15:32, hash: `76cdcc2bca`) **Short description of error** When I use E, skin root moves with extrusion. When I use Ctrl+RMB, root remains at 1st vertex. I expect keeping root in both cases. [skin extrude.mp4](https://archive.blender.org/developer/F9919120/skin_extrude.mp4) If it is intended, I can`t see the difference between two extrusions.

Added subscriber: @Vyach

Added subscriber: @Vyach
Member

Added subscriber: @filedescriptor

Added subscriber: @filedescriptor
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

I can confirm this on the latest 2.93.0 Alpha, branch: master, commit date: 2021-04-07 05:32, hash: 2fbee4598c.

I can confirm this on the latest 2.93.0 Alpha, branch: master, commit date: 2021-04-07 05:32, hash: `2fbee4598c`.
Member

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Member

Took a look at this. Here is what I found.
So the two operations use different operators. MESH_OT_extrude_verts_indiv by pressing E and MESH_OT_dupli_extrude_cursor with Ctrl+RMB.

MESH_OT_extrude_verts_indiv will duplicate the vert (which will also copy the MVERT_SKIN_ROOT flag) and then remove the flag from the original vert. So the fact that the root "moves" along when extruding seems to be very much intended.
This is the crucial part of the code (bmo_extrude_vert_indiv_exec in blender/source/blender/bmesh/operators/bmo_extrude.c:244):

dupev = BM_vert_create(bm, v->co, v, BM_CREATE_NOP); // `v` is the original vertex, `dupev` the duplicated vertex
[...]

if (has_vskin) {
  bm_extrude_disable_skin_root(bm, v); // <-- Notice that we disable the flag on the original vertex `v`
}

MESH_OT_dupli_extrude_cursor will call bmo_extrude_face_region_exec instead. Here the vertices also get duplicated, but the bm_extrude_disable_skin_root will be called on "geom.out" which I belive will remove the flag from the duplicated vertices.
This is the crucial part of the code (bmo_extrude_face_region_exec in blender/source/blender/bmesh/operators/bmo_extrude.c:423):

/* disable root flag on all new skin nodes */
if (CustomData_has_layer(&bm->vdata, CD_MVERT_SKIN)) {
  BMO_ITER (v, &siter, dupeop.slots_out, "geom.out", BM_VERT) { // <-- notice that we remove the flag from the vertices of the output of dupeop
    bm_extrude_disable_skin_root(bm, v);
  }
}

In summary: Both bmo_extrude_face_region_exec and bmo_extrude_edge_only_exec seem to remove the flag on the duplicate verts. bmo_extrude_vert_indiv_exec will remove it on the original vert.

@ideasman42 Do you think this inconsistency should be fixed? Would this classify as a bug?

Took a look at this. Here is what I found. So the two operations use different operators. `MESH_OT_extrude_verts_indiv` by pressing `E` and `MESH_OT_dupli_extrude_cursor` with Ctrl+RMB. `MESH_OT_extrude_verts_indiv` will duplicate the vert (which will also copy the `MVERT_SKIN_ROOT` flag) and then **remove the flag from the original vert**. So the fact that the root "moves" along when extruding seems to be very much intended. This is the crucial part of the code (`bmo_extrude_vert_indiv_exec` in `blender/source/blender/bmesh/operators/bmo_extrude.c:244`): ``` dupev = BM_vert_create(bm, v->co, v, BM_CREATE_NOP); // `v` is the original vertex, `dupev` the duplicated vertex [...] if (has_vskin) { bm_extrude_disable_skin_root(bm, v); // <-- Notice that we disable the flag on the original vertex `v` } ``` `MESH_OT_dupli_extrude_cursor` will call `bmo_extrude_face_region_exec` instead. Here the vertices also get duplicated, but the `bm_extrude_disable_skin_root` will be called on "geom.out" which I belive will **remove the flag from the duplicated vertices**. This is the crucial part of the code (`bmo_extrude_face_region_exec` in `blender/source/blender/bmesh/operators/bmo_extrude.c:423`): ``` /* disable root flag on all new skin nodes */ if (CustomData_has_layer(&bm->vdata, CD_MVERT_SKIN)) { BMO_ITER (v, &siter, dupeop.slots_out, "geom.out", BM_VERT) { // <-- notice that we remove the flag from the vertices of the output of dupeop bm_extrude_disable_skin_root(bm, v); } } ``` In summary: Both `bmo_extrude_face_region_exec` and `bmo_extrude_edge_only_exec` seem to remove the flag on the duplicate verts. `bmo_extrude_vert_indiv_exec` will remove it on the original vert. @ideasman42 Do you think this inconsistency should be fixed? Would this classify as a bug?
Philipp Oeser removed the
Interest
Modeling
label 2023-02-09 15:28:36 +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
2 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#87174
No description provided.