Fillet Curve Node: Add a point selection input #100031

Open
opened 2022-07-27 19:49:47 +02:00 by Hans Goudey · 11 comments
Member

The node should have a point selection input in order to the limit the effect without having to adjust the "radius" input.

Some hints on the implementation:

  • Add a selection input, retrieved as an IndexMask from the field evaluator
  • Use slice_and_offset in calculate_result_offsets to get the IndexMask local to each curve
  • The existing implicit deselection of points with zero radius can be removed
    • To keep the behavior the same, the radius input can be connected to the new selection input in versioning code (Searching bNodeSocket in versioning_300.c gives some similar code).
The node should have a point selection input in order to the limit the effect without having to adjust the "radius" input. Some hints on the implementation: - Add a selection input, retrieved as an `IndexMask` from the field evaluator - Use `slice_and_offset` in `calculate_result_offsets` to get the `IndexMask` local to each curve - The existing implicit deselection of points with zero radius can be removed - To keep the behavior the same, the radius input can be connected to the new selection input in versioning code (Searching `bNodeSocket` in `versioning_300.c` gives some similar code).
Author
Member

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

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

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly

Added subscriber: @Shan-Huang

Added subscriber: @Shan-Huang
Shan Huang self-assigned this 2022-09-19 02:03:51 +02:00

Hi there! I was able to make some progress on this (WIP: D16009). A couple of questions:

  • I'm having trouble with getting slice_and_offset to localize the selection to each curve. To slice and offset, I first need a per-curve IndexRange to slice with, which seems tricky to compute without looping through the mask multiple times. My current approach is to extract inverse selection ranges and skip filleting the deselected points, which.. could be more efficient. If there's a more elegant way to do it, I'd love to know :)
  • Could you give a more specific bNodeSocket pointer in versioning_300? There are too many occurrences for a total noob like me to make sense of what's going on... @_@. Doc pointers are highly appreciated too!
Hi there! I was able to make some progress on this (WIP: [D16009](https://archive.blender.org/developer/D16009)). A couple of questions: - I'm having trouble with getting `slice_and_offset` to localize the selection to each curve. To slice and offset, I first need a per-curve `IndexRange` to slice with, which seems tricky to compute without looping through the mask multiple times. My current approach is to extract inverse selection ranges and skip filleting the deselected points, which.. could be more efficient. If there's a more elegant way to do it, I'd love to know :) - Could you give a more specific `bNodeSocket` pointer in `versioning_300`? There are too many occurrences for a total noob like me to make sense of what's going on... @_@. Doc pointers are highly appreciated too!
Author
Member

Hey @Shan-Huang, sorry for the late reply.

  • About slice_and_offset, I think you're right, it's a bit more complicated than I expected. We may have to resort to using boolean arrays, or build one extra array first to store the offset into the selection at the start of each curve (or something like that).
  • dedc679eca has some examples of versioning changes to node groups. There aren't too many docs about such things though.

Let me know if I can answer any other questions.

Hey @Shan-Huang, sorry for the late reply. - About `slice_and_offset`, I think you're right, it's a bit more complicated than I expected. We may have to resort to using boolean arrays, or build one extra array first to store the offset into the selection at the start of each curve (or something like that). - dedc679eca has some examples of versioning changes to node groups. There aren't too many docs about such things though. Let me know if I can answer any other questions.

Sweet. Thanks for the pointers! I've updated the patch and it's ready for review. It's my very first patch so please don't hold back any nits :)

Sweet. Thanks for the pointers! I've updated the patch and it's ready for review. It's my very first patch so please don't hold back any nits :)
Contributor

@HooglyBoogly is this issue still open ??

@HooglyBoogly is this issue still open ??
Author
Member

Yes, it's open.

Yes, it's open.
Shan Huang was unassigned by Hans Goudey 2024-01-23 15:31:48 +01:00
Contributor

@HooglyBoogly how close is this fix https://archive.blender.org/developer/D16009 with regards to the main one because I was reading through this fix and found a lot of stuff being fixed....

@HooglyBoogly how close is this fix https://archive.blender.org/developer/D16009 with regards to the main one because I was reading through this fix and found a lot of stuff being fixed....
Author
Member

I don't really remember. I'd expect whoever works on this task to do some testing and research to figure that out.

I don't really remember. I'd expect whoever works on this task to do some testing and research to figure that out.
Contributor

Ohhk I'll look into it then.

Ohhk I'll look into it then.
Iliya Katushenock added this to the Nodes & Physics project 2024-04-09 15:44:02 +02:00
Iliya Katushenock removed the
Module
Nodes & Physics
Status
Confirmed
labels 2024-04-09 15:44:08 +02: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 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#100031
No description provided.