Cone node outputs wrong "Bottom" selection, when creating cone with no base fill #95738

Closed
opened 2022-02-12 21:47:03 +01:00 by Leon Schittek · 7 comments
Member

System Information
Operating system: macOS-11.6.2-x86_64-i386-64bit 64 Bits
Graphics card: Intel Iris OpenGL Engine Intel Inc. 4.1 INTEL-16.5.7

Blender Version
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-02-11 22:58, hash: 35c261dfcf
Worked: never (also broken in 3.1.0 when the feature was introduced by 431524aebc)

Short description of error
The "Bottom" selection output of the Cone node only selects one vertex, when the "Radius Top" is set to 0 and the "Fill Type" to None.
The entire bottom rim should be selected.
master_cone-primitive-bottom-selection_top-is-point.png

Exact steps for others to reproduce the error
Open the attached blend file with the scene shown in the screenshot. Only one vertex should be selected (colored green by the shader).
cone-primitive-bottom-selection-bug.blend

**System Information** Operating system: macOS-11.6.2-x86_64-i386-64bit 64 Bits Graphics card: Intel Iris OpenGL Engine Intel Inc. 4.1 INTEL-16.5.7 **Blender Version** Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-02-11 22:58, hash: `35c261dfcf` Worked: never (also broken in 3.1.0 when the feature was introduced by 431524aebc) **Short description of error** The "Bottom" selection output of the Cone node only selects one vertex, when the "Radius Top" is set to *0* and the "Fill Type" to *None*. The entire bottom rim should be selected. ![master_cone-primitive-bottom-selection_top-is-point.png](https://archive.blender.org/developer/F12864099/master_cone-primitive-bottom-selection_top-is-point.png) **Exact steps for others to reproduce the error** Open the attached blend file with the scene shown in the screenshot. Only one vertex should be selected (colored green by the shader). [cone-primitive-bottom-selection-bug.blend](https://archive.blender.org/developer/F12864098/cone-primitive-bottom-selection-bug.blend)
Author
Member

Added subscriber: @lone_noel

Added subscriber: @lone_noel
Member

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

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

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Comes from

    if (config.bottom_is_point) {
      selection[config.last_vert] = true;
    }

Which seems to be incorrectly assigning the last point to the selection.

Comes from ``` if (config.bottom_is_point) { selection[config.last_vert] = true; } ``` Which seems to be incorrectly assigning the last point to the selection.
Author
Member

@Blendify That made me curious, because bottom_is_point should only be true, when "Radius Bottom" is 0. That seems to be fine, though.

The following works for me without breaking any other cases, but I'm currently too tired to really make sense of all the indices and see if this is a good solution or not...

diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
index d84a2e73172..e960376343a 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc
@@ -512,7 +512,7 @@ static void calculate_selection_outputs(Mesh *mesh,
     }
     else {
       selection
-          .slice(config.bottom_faces_start,
+          .slice(face ? config.bottom_faces_start : (config.last_ring_verts_start + 1),
                  face ? config.bottom_faces_len : config.circle_segments)
           .fill(true);
     }

@Blendify That made me curious, because `bottom_is_point` should only be true, when "Radius Bottom" is 0. That seems to be fine, though. The following works for me without breaking any other cases, but I'm currently too tired to really make sense of all the indices and see if this is a good solution or not... ``` diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc index d84a2e73172..e960376343a 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc @@ -512,7 +512,7 @@ static void calculate_selection_outputs(Mesh *mesh, } else { selection - .slice(config.bottom_faces_start, + .slice(face ? config.bottom_faces_start : (config.last_ring_verts_start + 1), face ? config.bottom_faces_len : config.circle_segments) .fill(true); } ```
Leon Schittek self-assigned this 2022-02-13 23:25:29 +01:00

This issue was referenced by 801d7b4921

This issue was referenced by 801d7b4921dce55d1fb0d2989935408db1e1691e
Member

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
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#95738
No description provided.