Geometry Nodes: Resample Edges node #113427

Open
Iliya Katushenock wants to merge 12 commits from mod_moder/blender:resample_edges_node into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

Resample Edges node. Like the Resample Curve node, edge resampler
is used to increase amount of points in one poly line. Usually, result is the
N-Gon mesh topology. Node can be used in way to create round holes in
faces or for other shapes from mesh faces. Resampling of loose edges will allow
to avoid conversion to curve to did resample as well.

Holes Fractal resampling and triangulation
image image
Resample Edges node. Like the Resample Curve node, edge resampler is used to increase amount of points in one poly line. Usually, result is the N-Gon mesh topology. Node can be used in way to create round holes in faces or for other shapes from mesh faces. Resampling of loose edges will allow to avoid conversion to curve to did resample as well. | Holes | Fractal resampling and triangulation | | -- | -- | | ![image](/attachments/69c1c46d-9335-4e4f-a1d7-dbac7f52d534) | ![image](/attachments/ed094942-0d0d-4fcc-9629-75a097409bf8) |
Iliya Katushenock added the
Interest
Geometry Nodes
label 2023-10-08 22:06:18 +02:00
Iliya Katushenock added 1 commit 2023-10-08 22:06:30 +02:00
Iliya Katushenock added this to the Nodes & Physics project 2023-10-08 22:07:28 +02:00
Iliya Katushenock changed title from Geometry Nodes: Resample Edge node to Geometry Nodes: Resample Edges node 2023-10-08 22:07:41 +02:00
Iliya Katushenock added 1 commit 2023-10-08 22:36:46 +02:00
Iliya Katushenock added 2 commits 2023-10-09 21:06:01 +02:00
Iliya Katushenock added 3 commits 2023-10-10 20:47:12 +02:00
Iliya Katushenock requested review from Jacques Lucke 2023-10-10 20:59:50 +02:00
Iliya Katushenock requested review from Hans Goudey 2023-10-10 20:59:51 +02:00
Member

Can you show an example for how you use this node to create the holes?

Can you show an example for how you use this node to create the holes?
Author
Member

Basically, i resample face edges, set it shape to circle and delete it.
image

Basically, i resample face edges, set it shape to circle and delete it. ![image](/attachments/b33faf54-e321-4ce4-9425-738566e750a1)
First-time contributor

This would be incredibly useful with a selection input.

This would be incredibly useful with a selection input.
Member

Hm, currently I'm not convinced that this node makes too much sense by itself. With a selection input it would be more useful. I can see that it might be more useful in conjunction with the tesselate node, but I'd have to try them both together.

You might be able to change my mind with a more compelling example. A selection input would help for that example as well of course. Generally it would be nice to avoid having huge ngons as an intermediate step, but I'm not sure if that can be avoided in general.

Hm, currently I'm not convinced that this node makes too much sense by itself. With a selection input it would be more useful. I can see that it might be more useful in conjunction with the tesselate node, but I'd have to try them both together. You might be able to change my mind with a more compelling example. A selection input would help for that example as well of course. Generally it would be nice to avoid having huge ngons as an intermediate step, but I'm not sure if that can be avoided in general.
Author
Member

Well, just to clarify, Count input is a field, so Selection input doesn't make sense. Also, i see now, some node like Squaring (Kind of Triangulate node, but for 4-gons) will make loop cut much easier for user (such splitting still allow to polygonize any n-gon geometry or resample any edges/meshes in different task). Edge Rings node also in this area.. but yeah, all of this request artist feedback too.

Well, just to clarify, `Count` input is a field, so `Selection` input doesn't make sense. Also, i see now, some node like `Squaring` (Kind of `Triangulate` node, but for 4-gons) will make loop cut much easier for user (such splitting still allow to polygonize any n-gon geometry or resample any edges/meshes in different task). Edge Rings node also in this area.. but yeah, all of this request artist feedback too.
First-time contributor

I think this node would be very useful: without it you have to convert the edge to a curve, delete neighboring faces of the edge, create as many curve circles for each edge as many faces were deleted, resample the circles based on old faces vertex count + added cuts on the edge, distribute the circles in a grid so they don't overlap, fill curves (which is very slow), then position the vertices of new circles on the spot of the old face, and I'm not sure at the moment on how to correctly map the indices…

Creating holes is I think a very nice example, because creating holes or circular extrusions is just so common in modelling.

Another example could be adaptive subdivision, which is made so much easier when you can split edges, subdivide selection, and subdivide edges of inverse selection (and merge by distance). One could even use Catmul-Clark without boundary preservation if he wouldn't mind (or ensure not to produce) non-coplanar n-gons surrounding the selection…

Is it possible to replicate adaptive subdivision in geometry nodes?
How to subdivide a selection of faces in geometry nodes
How to create gradual face subdivide effect with geometry nodes?

In general we need more subdivision methods, considering how some subdivision methods exist in Vanilla Blender in Edit Mode, but not in geonodes: How to subdivide triangles into four triangles with Geometry Nodes?

I think this node could compare favorably to some other nodes in regards to how hard is it to reproduce this functionality in existing nodes, how much performance it saves, how often it is used: corner of edge, corner of face, dual mesh - the last I think may get a nice synergy with this new "Resample Edge" node...

BTW, maybe instead of "Resample Edge" it should be "Subdivide Edge"?

I think this node would be very useful: without it you have to convert the edge to a curve, delete neighboring faces of the edge, create as many curve circles for each edge as many faces were deleted, resample the circles based on old faces vertex count + added cuts on the edge, distribute the circles in a grid so they don't overlap, fill curves (which is very slow), then position the vertices of new circles on the spot of the old face, and I'm not sure at the moment on how to correctly map the indices… Creating holes is I think a very nice example, because creating holes or circular extrusions is just so common in modelling. Another example could be adaptive subdivision, which is made so much easier when you can split edges, subdivide selection, and subdivide edges of inverse selection (and merge by distance). One could even use Catmul-Clark without boundary preservation if he wouldn't mind (or ensure not to produce) non-coplanar n-gons surrounding the selection… [Is it possible to replicate adaptive subdivision in geometry nodes?](https://blender.stackexchange.com/q/298717/60486) [How to subdivide a selection of faces in geometry nodes](https://blender.stackexchange.com/q/274918/60486) [How to create gradual face subdivide effect with geometry nodes?](https://blender.stackexchange.com/q/288467/60486) In general we need more subdivision methods, considering how some subdivision methods exist in Vanilla Blender in Edit Mode, but not in geonodes: [How to subdivide triangles into four triangles with Geometry Nodes?](https://blender.stackexchange.com/q/291926/60486) I think this node could compare favorably to some other nodes in regards to how hard is it to reproduce this functionality in existing nodes, how much performance it saves, how often it is used: corner of edge, corner of face, dual mesh - the last I think may get a nice synergy with this new "Resample Edge" node... BTW, maybe instead of "Resample Edge" it should be "Subdivide Edge"?
First-time contributor

Now that I realize the input is a field, yes, this would be incredibly useful. I've been wanting something like this for ages.

Now that I realize the input is a field, yes, this would be incredibly useful. I've been wanting something like this for ages.
First-time contributor

Another example could be adaptive subdivision, which is made so much easier when you can split edges, subdivide selection, and subdivide edges of inverse selection (and merge by distance). One could even use Catmul-Clark without boundary preservation if he wouldn't mind (or ensure not to produce) non-coplanar n-gons surrounding the selection…

Yeah, I was trying to make adaptive subdivision in GN a few days ago and realized that this node is a perfectly match.

BTW, maybe instead of "Resample Edge" it should be "Subdivide Edge"?

Both sounds good to me.

> Another example could be adaptive subdivision, which is made so much easier when you can split edges, subdivide selection, and subdivide edges of inverse selection (and merge by distance). One could even use Catmul-Clark without boundary preservation if he wouldn't mind (or ensure not to produce) non-coplanar n-gons surrounding the selection… Yeah, I was trying to make adaptive subdivision in GN a few days ago and realized that this node is a perfectly match. > BTW, maybe instead of "Resample Edge" it should be "Subdivide Edge"? Both sounds good to me.
Member

Well, just to clarify, Count input is a field, so Selection input doesn't make sense.

It should still have a selection. That's more consistent (see e.g. Duplicate Elements), easier to use and easier to optimize for us.

Can you change your example that adds a hole to a face so that it does not generate more geometry than necessary? I haven't looked too much into tesselation yet, but it seems like that would provide a more straight forward way to add a hole to many faces, even without this node.

maybe instead of "Resample Edge" it should be "Subdivide Edge"?

I prefer Subdivide Edges as well.

> Well, just to clarify, Count input is a field, so Selection input doesn't make sense. It should still have a selection. That's more consistent (see e.g. `Duplicate Elements`), easier to use and easier to optimize for us. Can you change your example that adds a hole to a face so that it does not generate more geometry than necessary? I haven't looked too much into tesselation yet, but it seems like that would provide a more straight forward way to add a hole to many faces, even without this node. > maybe instead of "Resample Edge" it should be "Subdivide Edge"? I prefer `Subdivide Edges` as well.
Author
Member

Oh, i just checked, Resample Curve have Selection input too... will add.
I really don't like references to Subdivide, this is not fractal subdivide operation.

Oh, i just checked, Resample Curve have `Selection` input too... will add. I really don't like references to `Subdivide`, this is not fractal subdivide operation.
Iliya Katushenock added 5 commits 2023-10-15 13:29:24 +02:00
Author
Member

Can you change your example that adds a hole to a face so that it does not generate more geometry than necessary?

Done
image

> Can you change your example that adds a hole to a face so that it does not generate more geometry than necessary? Done ![image](/attachments/7b8e2388-216a-49ea-8092-3bdeab3c15ff)
Contributor

Can you change your example that adds a hole to a face so that it does not generate more geometry than necessary?

Done
image

Could this do also holes that don't unnecessarily subdivide outer edges of the quads? The geometry on the screenshot above still would not be very usable. Could it be used to achieve something like this?:
image

> > Can you change your example that adds a hole to a face so that it does not generate more geometry than necessary? > > Done > ![image](/attachments/7b8e2388-216a-49ea-8092-3bdeab3c15ff) Could this do also holes that don't unnecessarily subdivide outer edges of the quads? The geometry on the screenshot above still would not be very usable. Could it be used to achieve something like this?: ![image](/attachments/c78545f4-49c1-4f37-9418-365be8aabb1c)
899 KiB
Author
Member

Yes, just need some edges to be deselected.

Yes, just need some edges to be deselected.
First-time contributor

Looks to be the missing piece for loop cuts and adaptive subdivision. Would appreciate a buildbot build when the conflict is resolved.

Looks to be the missing piece for loop cuts and adaptive subdivision. Would appreciate a buildbot build when the conflict is resolved.
First-time contributor

Any news? Seems very useful and would make it easier to make new types of modeling tools and modifiers that is not possible currently.

Any news? Seems very useful and would make it easier to make new types of modeling tools and modifiers that is not possible currently.
This pull request has changes conflicting with the target branch.
  • source/blender/blenkernel/BKE_node.h
  • source/blender/nodes/geometry/CMakeLists.txt

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u resample_edges_node:mod_moder-resample_edges_node
git checkout mod_moder-resample_edges_node
Sign in to join this conversation.
No reviewers
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
8 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#113427
No description provided.