Geometry Nodes: Split Edges Node randomly reindexes all edges #110480

Closed
opened 2023-07-25 23:19:54 +02:00 by Mike · 10 comments

Blender Version
Broken: Blender 3.6.1 8bda729fe4dc 07/17/23 blender-4.0.0-alpha+main.4150152d0fda 07/24/23
Worked: blender-3.6.0-beta+v36.43fe7bec4fa5 05/22/23

Short description of error
Using the node "Split Edges" randomly reindexes all the edges.

Exact steps for others to reproduce the error
Add node "Split edges" to anything.

To illustrate the bug, mute the "Split edges" node in the example.

Video demonstrating bug VS working correctly:
https://youtu.be/Tc9dP-AxhK8

When fixing this issue, please be sure not to reintroduce the bug reported here that was fixed in 4.0:
#110172

**Blender Version** Broken: Blender 3.6.1 8bda729fe4dc 07/17/23 blender-4.0.0-alpha+main.4150152d0fda 07/24/23 Worked: blender-3.6.0-beta+v36.43fe7bec4fa5 05/22/23 **Short description of error** Using the node "Split Edges" randomly reindexes all the edges. **Exact steps for others to reproduce the error** Add node "Split edges" to anything. To illustrate the bug, mute the "Split edges" node in the example. Video demonstrating bug VS working correctly: https://youtu.be/Tc9dP-AxhK8 When fixing this issue, please be sure not to reintroduce the bug reported here that was fixed in 4.0: https://projects.blender.org/blender/blender/issues/110172
Mike added the
Status
Needs Triage
Type
Report
Severity
Normal
labels 2023-07-25 23:19:54 +02:00

If the geometry changes, the indices can be anything?

If the geometry changes, the indices can be anything?
Iliya Katushenock added the
Interest
Geometry Nodes
Interest
Nodes & Physics
labels 2023-07-25 23:40:52 +02:00
Iliya Katushenock changed title from Split Edges Node randomly reindexes all edges in 4.0 (Geometry Nodes to Geometry Nodes: Split Edges Node randomly reindexes all edges 2023-07-25 23:41:09 +02:00
Author

If the geometry changes, the indices can be anything?

No.

> If the geometry changes, the indices can be anything? No.
Mike closed this issue 2023-07-26 00:05:40 +02:00
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-07-26 00:05:43 +02:00
Author

When you split an edge, all existing edges keep their index, and the new one gets the first available index.

It's not supposed to just jumble them up. It worked fine in 3.6 beta.

When you split an edge, all existing edges keep their index, and the new one gets the first available index. It's not supposed to just jumble them up. It worked fine in 3.6 beta.
Mike reopened this issue 2023-07-26 00:06:47 +02:00
Blender Bot added
Status
Needs Triage
and removed
Status
Archived
labels 2023-07-26 00:06:48 +02:00
Author

It's hard to tell, but it looks like this revision broke indexing:

#108826

It looks like 430 randomly shuffles the index around for no reason, breaking Split Edges entirely, if one uses indices. One can't be digging around trying to figure out what the edge changed to 'this time' each time a node is used, when there are thousands of edges, and hundreds of split edges nodes used.
There shouldn't be any reason to change indicates of edges. Just leave everything the same and add a new edge with a new index for each edge.

Anyway, Thanks for all your hard work! ^_^

It's hard to tell, but it looks like this revision broke indexing: https://projects.blender.org/blender/blender/pulls/108826 It looks like 430 randomly shuffles the index around for no reason, breaking Split Edges entirely, if one uses indices. One can't be digging around trying to figure out what the edge changed to 'this time' each time a node is used, when there are thousands of edges, and hundreds of split edges nodes used. There shouldn't be any reason to change indicates of edges. Just leave everything the same and add a new edge with a new index for each edge. Anyway, Thanks for all your hard work! ^_^

This story actually has a much longer-running fix: #110005 (comment)

This story actually has a much longer-running fix: https://projects.blender.org/blender/blender/issues/110005#issuecomment-980607
Member

As mentioned in the documentation, indices are not guaranteed to have a particular order after geometry operations, and they shouldn't be relied on for this purpose. Additionally, changes to geometry processing algorithms in Blender may change how indices are affected. Basically, it isn't recommended to rely on indices for selections across topology changes.

As mentioned in the [documentation](https://docs.blender.org/manual/en/latest/modeling/geometry_nodes/geometry/read/input_index.html), indices are not guaranteed to have a particular order after geometry operations, and they shouldn't be relied on for this purpose. Additionally, changes to geometry processing algorithms in Blender may change how indices are affected. Basically, it isn't recommended to rely on indices for selections across topology changes.
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-07-26 02:14:26 +02:00
Author

o_0
I have to use indices. There is no other options to select exactly the points/edges/faces I need.
There isn't any reason to go through all the extra work to change indices of existing edges for split edges, when they can just stay the same and work better/faster.

And it's something you're already re-writing. Just asking to keep existing indexes the same.

o_0 I *have* to use indices. There is no other options to select exactly the points/edges/faces I need. There isn't any reason to go through all the extra work to *change* indices of existing edges for split edges, when they can just stay the same and work better/faster. And it's something you're already re-writing. Just asking to keep existing indexes the same.
Member

There is no other options to select exactly the points/edges/faces I need.

I would suggest using a boolean attribute for selections. Did you consider that?

There isn't any reason to go through all the extra work to change indices of existing edges for split edges

It's just not that simple at all. There are so many other factors inside an algorithm like this.

>There is no other options to select exactly the points/edges/faces I need. I would suggest using a boolean attribute for selections. Did you consider that? >There isn't any reason to go through all the extra work to change indices of existing edges for split edges It's just not that simple at all. There are so many other factors inside an algorithm like this.
Author

I would suggest using a boolean attribute for selections. Did you consider that?

-_- You're kidding right?

One of my projects is over 18,000 nodes. There's no realistic way to know where anyone one one point is at any given point during the execution to be able to select it. It requires extremely high precision, only doable using indices.

"boolean attribute " I'm not exactly sure what you mean by this, I'm speculating that you're talking about some math formula to select specific points/edges/faces based on position? If you're talking about something else, please explain.

"It's just not that simple at all. There are so many other factors inside an algorithm like this."
Seems like you're vastly over-complicating what should be a simple task.

It does 4 things:
For (Each face beyond the first)
{
Create New Edge with same verts as old
Set NewEdge.Triangle[A] to OldEdge.Triangle[B]
Set OldEdge.Triangle[B] to "nothing"
For (Both Vertex of New Edge) {If Vertex has edges missing a triangle {Make new vertex and Set New Edge to New Vertex and OldEdge.Triangle[B].ReplaceVertex (Old to New)}}
Update the triangles/facecorners with the new edges/verts
}

Why would it be any more complicated than this?

I'd write it myself and submit it, but I have extreme difficulty parsing the syntax of how you guys write.

Please don't misunderstand. I'm not trying to step on anyone's toes, and I greatly appreciate what you've done.

If you really must reindex, instead of using "face_corner_edge" as iterator, why not "Edge" as the iterator, to keep them in the same order?

Worst case scenario, I can create an INT Named Attribute that keeps track of what should be the index. Just seems so sub-optimal to waste all that data storage.

> I would suggest using a boolean attribute for selections. Did you consider that? -_- You're kidding right? One of my projects is over 18,000 nodes. There's no realistic way to know where anyone one one point is at any given point during the execution to be able to select it. It requires extremely high precision, only doable using indices. "boolean attribute " I'm not *exactly* sure what you mean by this, I'm speculating that you're talking about some math formula to select specific points/edges/faces based on position? If you're talking about something else, please explain. "It's just not that simple at all. There are so many other factors inside an algorithm like this." Seems like you're vastly over-complicating what should be a simple task. It does 4 things: For (Each face beyond the first) { Create New Edge with same verts as old Set NewEdge.Triangle[A] to OldEdge.Triangle[B] Set OldEdge.Triangle[B] to "nothing" For (Both Vertex of New Edge) {If Vertex has edges missing a triangle {Make new vertex and Set New Edge to New Vertex and OldEdge.Triangle[B].ReplaceVertex (Old to New)}} Update the triangles/facecorners with the new edges/verts } Why would it be any more complicated than this? I'd write it myself and submit it, but I have extreme difficulty parsing the syntax of how you guys write. Please don't misunderstand. I'm not trying to step on anyone's toes, and I greatly appreciate what you've done. If you really must reindex, instead of using "face_corner_edge" as iterator, why not "Edge" as the iterator, to keep them in the same order? Worst case scenario, I can create an INT Named Attribute that keeps track of what should be the index. Just seems so sub-optimal to waste all that data storage.
Member

By "Boolean Attribute" I mean a "true/false" value per geometry element. Those are interpolated properly by nodes like this. There's more info here: https://docs.blender.org/manual/en/latest/modeling/geometry_nodes/attributes_reference.html

Why would it be any more complicated than this?

Your pseudocode just isn't anything like it works internally. Anyway, I don't have time to continue this conversation here. This isn't a bug, and further questions should probably go to a community forum. More info: https://wiki.blender.org/wiki/Reference/Not_a_bug

By "Boolean Attribute" I mean a "true/false" value per geometry element. Those are interpolated properly by nodes like this. There's more info here: https://docs.blender.org/manual/en/latest/modeling/geometry_nodes/attributes_reference.html >Why would it be any more complicated than this? Your pseudocode just isn't anything like it works internally. Anyway, I don't have time to continue this conversation here. This isn't a bug, and further questions should probably go to a community forum. More info: https://wiki.blender.org/wiki/Reference/Not_a_bug
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
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#110480
No description provided.