Geometry Nodes: Extrdue Mesh, Faces, Individual is non-deterministic. #109429

Closed
opened 2023-06-28 02:00:08 +02:00 by Mike · 6 comments

Blender 3.6

The indexing for new faces/edges when using extrude Mesh with individual checked is in the wrong order.
When individual is not checked, everything is in the correct order.

https://youtu.be/tSQ5b7zBOa0

Solution:
I noticed you have two completely different functions that are called for "individual_Mesh_Faces" and "Mesh_Faces".
You have everything you already in place.
Inside " poly_selection.foreach_index"
37eabb171a/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc (L1184)

Have a function call for that one face to "static void extrude_mesh_face_regions"
37eabb171a/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc (L701)

This will result in the same mesh as currently, but with the faces/edges having the correct new indices.

While I know what to do to fix it, I don't know all the syntax, or how to use GIT. (Every attempt at using Linux and/or GIT results in weeks of frustration and failure...)

Before you say "this is not a bug, it's a feature request". It's a bug. Ask Hans. Having indices in a consistent and correct order is a requirement for Nodes.

Thanks! ^_^

Blender 3.6 The indexing for new faces/edges when using extrude Mesh with individual checked is in the wrong order. When individual is not checked, everything is in the correct order. https://youtu.be/tSQ5b7zBOa0 Solution: I noticed you have two completely different functions that are called for "individual_Mesh_Faces" and "Mesh_Faces". You have everything you already in place. Inside " poly_selection.foreach_index" https://github.com/blender/blender/blob/37eabb171a71d4d76c0f6ded9c205aa091a51f72/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc#L1184 Have a function call for that one face to "static void extrude_mesh_face_regions" https://github.com/blender/blender/blob/37eabb171a71d4d76c0f6ded9c205aa091a51f72/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc#L701 This will result in the same mesh as currently, but with the faces/edges having the correct new indices. While I know *what* to do to fix it, I don't know all the syntax, or how to use GIT. (Every attempt at using Linux and/or GIT results in weeks of frustration and failure...) Before you say "this is not a bug, it's a feature request". It's a bug. Ask Hans. Having indices in a consistent and correct order is a requirement for Nodes. Thanks! ^_^
Mike added the
Type
Report
Status
Needs Triage
Priority
Normal
labels 2023-06-28 02:00:08 +02:00

Hey, thanks for report. Just to be sure, can you added to extrude selection mask not just one but 2~3 polygone (connected) and deduce: if rings of extrusion now have changed topology, did we have to randomize indices of new faces in new rings?

Hey, thanks for report. Just to be sure, can you added to extrude selection mask not just one but 2~3 polygone (connected) and deduce: if rings of extrusion now have changed topology, did we have to randomize indices of new faces in new rings?
Iliya Katushenock added the
Interest
Geometry Nodes
Interest
Nodes & Physics
labels 2023-06-28 02:13:10 +02:00
Author

Not entirely sure what you're asking.

But the bug persists regardless of number of faces extruded and if they are physically connected before extruding. The indexing gets worse the more faces there are.

Not *entirely* sure what you're asking. But the bug persists regardless of number of faces extruded and if they are physically connected before extruding. The indexing gets worse the more faces there are.
Author

Just having the "extrude_individual_mesh_faces" Call the function "extrude_mesh_face_regions" one face at a time will result in the same mesh that we get now, but with the correct face/edge/vertex indexes.

Just having the "extrude_individual_mesh_faces" Call the function "extrude_mesh_face_regions" one face at a time will result in the same mesh that we get now, but with the correct face/edge/vertex indexes.
Member

Thanks for the report and for digging into the code, but this actually isn't a bug. The two functions use different implementations for performance reasons; the "individual" mode is much faster than the face region extrude.

The guarantee we make about indices for geometry nodes is that they will be the same given the same inputs-- nodes don't necessarily have to produce "good" indices, they just have to be deterministic. The output of this node is deterministic because it's the same every time with the same settings and input mesh. The order of the faces around each individual extrusion is based on the winding order of the face.

Thanks for the report and for digging into the code, but this actually isn't a bug. The two functions use different implementations for performance reasons; the "individual" mode is much faster than the face region extrude. The guarantee we make about indices for geometry nodes is that they will be the same given the same inputs-- nodes don't necessarily have to produce "good" indices, they just have to be deterministic. The output of this node is deterministic because it's the same every time with the same settings and input mesh. The order of the faces around each individual extrusion is based on the winding order of the face.
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-06-28 04:36:03 +02:00
Author

Thanks for the report and for digging into the code, but this actually isn't a bug. The two functions use different implementations for performance reasons; the "individual" mode is much faster than the face region extrude.

The guarantee we make about indices for geometry nodes is that they will be the same given the same inputs-- nodes don't necessarily have to produce "good" indices, they just have to be deterministic. The output of this node is deterministic because it's the same every time with the same settings and input mesh. The order of the faces around each individual extrusion is based on the winding order of the face.

Ok, I'm trying to write an Addon that translates Blender Geometry Nodes into Unreal's Dynamic Mesh system. Could you explain how it comes up with order of edges being extruded?

I'm not saying change it, just explain it so I can replicate it. (If that's not to big an ask) Thanks Hans.

> Thanks for the report and for digging into the code, but this actually isn't a bug. The two functions use different implementations for performance reasons; the "individual" mode is much faster than the face region extrude. > > The guarantee we make about indices for geometry nodes is that they will be the same given the same inputs-- nodes don't necessarily have to produce "good" indices, they just have to be deterministic. The output of this node is deterministic because it's the same every time with the same settings and input mesh. The order of the faces around each individual extrusion is based on the winding order of the face. Ok, I'm trying to write an Addon that translates Blender Geometry Nodes into Unreal's Dynamic Mesh system. Could you explain how it comes up with order of edges being extruded? I'm not saying change it, just explain it so I can replicate it. (If that's not to big an ask) Thanks Hans.
Author

Never mind. I figured it out. It starts with the edge that has the lowest summation of edge indices. Then goes to the edge connected to B vertex of "current edge".

Never mind. I figured it out. It starts with the edge that has the lowest summation of edge indices. Then goes to the edge connected to B vertex of "current edge".
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
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
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
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#109429
No description provided.