Group Index input for the fill curve node #102285

Closed
opened 2022-11-05 10:52:52 +01:00 by Hans Goudey · 16 comments
Member

Add a "Group ID" integer input to the node, evaluated on the curve domain.
This will allow limiting intersections between separate curves, which can be helpful
as a performance optimization and for a simpler result.

The default value should be a single value of zero, and the number button should be hidden on the node.
To fill each curve separately, the "Index" node can be connected the group index.

Implementation

  • The filling function do_cdt can have a new IndexMask argument
  • This is similar to the sample curve node which uses a MultiValueMap to find groups of related indices
  • When the group index is a single value, creating the full IndexMask and map can be skipped
  • The total size of the mesh should be calculated based on all of the intersection results, then the results can be converted directly into subsets of the output mesh
Add a "Group ID" integer input to the node, evaluated on the curve domain. This will allow limiting intersections between separate curves, which can be helpful as a performance optimization and for a simpler result. The default value should be a single value of zero, and the number button should be hidden on the node. To fill each curve separately, the "Index" node can be connected the group index. **Implementation** - The filling function `do_cdt` can have a new `IndexMask` argument - This is similar to the sample curve node which uses a `MultiValueMap` to find groups of related indices - When the group index is a single value, creating the full `IndexMask` and map can be skipped - The total size of the mesh should be calculated based on all of the intersection results, then the results can be converted directly into subsets of the output mesh
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: @mod_moder

Added subscriber: @mod_moder
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123

Added subscriber: @Swesik-Ramineni

Added subscriber: @Swesik-Ramineni

Hello, I'm brand new to the Blender developer community and was hoping to work on this issue, but I was confused about a few points. What exactly is the "Group Index", how does it relate to the IndexMask, and what are these supposed to do in do_cdt exactly? Thank you in advance for any guidance.

Hello, I'm brand new to the Blender developer community and was hoping to work on this issue, but I was confused about a few points. What exactly is the "Group Index", how does it relate to the IndexMask, and what are these supposed to do in do_cdt exactly? Thank you in advance for any guidance.

@Swesik-Ramineni The group index is the key that the individual curves have. By concatenating the indices of curves with the same key into one array to obtain from its IndexMask (standert iterator factory, what know span of indices), we can iterate over all curves of single key. Due to this, it is possible to split all curves into several IndexMask and generate for each key its own instance - geometry from a set of filled curves.

@Swesik-Ramineni The group index is the key that the individual curves have. By concatenating the indices of curves with the same key into one array to obtain from its `IndexMask` (standert iterator factory, what know span of indices), we can iterate over all curves of single key. Due to this, it is possible to split all curves into several `IndexMask` and generate for each key its own instance - geometry from a set of filled curves.

Thank you so much for the response. Just to clarify, for each index in IndexMask, I should append the evaluated points of the curve at that index to a new curve, which I pass as an input to delaunay_2d_calc?

Thank you so much for the response. Just to clarify, for each index in IndexMask, I should append the evaluated points of the curve at that index to a new curve, which I pass as an input to delaunay_2d_calc?

Thank you so much for the response. Just to clarify, for each index in IndexMask, I should append the evaluated points of the curve at that index to a new curve, which I pass as an input to delaunay_2d_calc?

The whole task is reduced to sweeping this iterator constructor over the entire list of curves (index_range) to an external IndexMask pointing to the list of curves belonging to the group.

{https://developer.blender.org/diffusion/B/browse/master/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc$53}

(Of course, this is only a cursory answer to the question. I'm afraid if you write down everything that needs to be changed, then it will just be a diff patch to implement this)

> Thank you so much for the response. Just to clarify, for each index in IndexMask, I should append the evaluated points of the curve at that index to a new curve, which I pass as an input to delaunay_2d_calc? The whole task is reduced to sweeping this iterator constructor over the entire list of curves (`index_range`) to an external `IndexMask` pointing to the list of curves belonging to the group. {https://developer.blender.org/diffusion/B/browse/master/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc$53} (Of course, this is only a cursory answer to the question. I'm afraid if you write down everything that needs to be changed, then it will just be a diff patch to implement this)

@Swesik-Ramineni Also, if you have any more questions, you can always ask them in the geometry nodes chat to those who are online there (me, hans, and others)

@Swesik-Ramineni Also, if you have any more questions, you can always ask them in the geometry nodes chat to those who are online there (me, hans, and others)
swesik self-assigned this 2022-11-15 01:45:28 +01:00

Added subscriber: @emilis

Added subscriber: @emilis
swesik was unassigned by Hans Goudey 2023-01-18 21:57:51 +01:00
Contributor

FYI, I've picked this up, and I believe I have it working locally for regular curves. I just need to extend the behavior to grease pencil curves, since the Fill Curve node recently gained support for those via #113602.

FYI, I've picked this up, and I believe I have it working locally for regular curves. I just need to extend the behavior to grease pencil curves, since the Fill Curve node recently gained support for those via #113602.
Contributor

Ack, I'm not able to create a test .blend file for the grease pencil because GPv3 is currently very broken on MacOS: #113601

I get the sense that's not expected to be fixed particularly soon, so I will see if I can get someone else to create a simple test file for me.

Ack, I'm not able to create a test `.blend` file for the grease pencil because GPv3 is currently very broken on MacOS: #113601 I get the sense that's not expected to be fixed particularly soon, so I will see if I can get someone else to create a simple test file for me.
Contributor

I was able to work around the current GPv3 issues on MacOS well enough to be able to verify my implementation works for GPv3. The PR is #114048.

I was able to work around the current GPv3 issues on MacOS well enough to be able to verify my implementation works for GPv3. The PR is #114048.
Contributor

@HooglyBoogly, I just noticed this issue is still open, but I assume you meant to close it when you merged in #114048.

@HooglyBoogly, I just noticed this issue is still open, but I assume you meant to close it when you merged in #114048.
Author
Member

Right, thanks!

Right, thanks!
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2023-12-10 06:46:47 +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
6 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#102285
No description provided.