Regression: Attribute capture yields broken results #98298

Closed
opened 2022-05-21 04:44:38 +02:00 by kursad k · 9 comments
Member

System Information
Operating system: Win 11

Blender Version
Broken: f600a2aa6d (3.3 alpha), 1a627d528c (3.2 beta)
Worked: 3.1 release

Behavior changed in 2e70af5cd5

Short description of error

It seems like the attribute capture in 3.3. and 3.2 generates some kind of broken range, when I say broken I am comparing it to the result I get from the 3.1 release. The node setup in the blend file generates edges with tubes from a given vertex group.

Please see the images below.

Blender 3.1 release, this is the expected result and it is the result that also worked in 3.2 at some point because I originally tested this in 3.2. It only works in 3.1 now.

image.png

Blender 3.2 and 3.3 result

blender_dMMOc3Aqx4.jpg

Exact steps for others to reproduce the error

Load the attached .blend file in 3.1

Load the attached .blend file in 3.2

Load the attached .blend file in 3.3

capture_20052022_2135_40.blend

**System Information** Operating system: Win 11 **Blender Version** Broken: f600a2aa6df1 (3.3 alpha), 1a627d528cf9 (3.2 beta) Worked: 3.1 release Behavior changed in 2e70af5cd5 **Short description of error** It seems like the attribute capture in 3.3. and 3.2 generates some kind of broken range, when I say broken I am comparing it to the result I get from the 3.1 release. The node setup in the blend file generates edges with tubes from a given vertex group. Please see the images below. Blender 3.1 release, this is the expected result and it is the result that also worked in 3.2 at some point because I originally tested this in 3.2. It only works in 3.1 now. ![image.png](https://archive.blender.org/developer/F13096000/image.png) Blender 3.2 and 3.3 result ![blender_dMMOc3Aqx4.jpg](https://archive.blender.org/developer/F13096002/blender_dMMOc3Aqx4.jpg) **Exact steps for others to reproduce the error** Load the attached .blend file in 3.1 Load the attached .blend file in 3.2 Load the attached .blend file in 3.3 [capture_20052022_2135_40.blend](https://archive.blender.org/developer/F13096005/capture_20052022_2135_40.blend)
Author
Member

Added subscriber: @kursadk

Added subscriber: @kursadk
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Can confirm, will check.

Can confirm, will check.
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Behavior changed in 2e70af5cd5

@JacquesLucke : this seems wrong on first sight, in the example there are zero weights that were captured as zero ints prior to 2e70af5cd5
{F13099819 size=full}

This might be intended behavior, looks like a bug to me though, can you clarify?
Will set to High prio for now since this seems like a regression, no?

Behavior changed in 2e70af5cd5 @JacquesLucke : this seems wrong on first sight, in the example there are zero weights that were captured as zero ints prior to 2e70af5cd5 {[F13099819](https://archive.blender.org/developer/F13099819/T98298.png) size=full} This might be intended behavior, looks like a bug to me though, can you clarify? Will set to High prio for now since this seems like a regression, no?
Philipp Oeser changed title from Attribute capture yields broken results to Regression: Attribute capture yields broken results 2022-05-23 09:48:18 +02:00
Member

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'
Member

From what I can tell, the Attribute Capture node works perfectly fine here (check with the Viewer node in the spreadsheet).
The problem is that the Mesh to Curve node expects an edge selection, however you provide a point attribute. That's generally not an issue, because the node would just interpolate the point to an edge attribute, but in this specific case the interpolation does not do what you want.

In your example, every point either has value 0 or 1 after the Capture node. When that is interpolated to edges, the following is done:

  • Edges where both points have value 0, also get value 0.
  • Edges where both points have value 1, also get value 1.
  • Edges where one point has value 0 and the other 1, get value 1. That's because when both values are mixed, the result is 0.5, and that is rounded to 1. This is what changed in 2e70af5cd5. Previously it would always simply cut off the decimal places, which was just wrong.

So the new behavior is indeed the expected behavior, and there is no bug.

Generally, the solution for you is to be more explicit about what you want and to rely less on the automatic type/domain conversion for selections. Here are two possible solutions:

  • Here the attribute is interpolated to edges as a float, so that there is a 0, 0.5 or 1 value per edge. Then a Compare node can be used to just select edges with value 1.
{F13099951}
  • Here the points that you don't want to create curves from are deleted first.
{F13099962}
From what I can tell, the Attribute Capture node works perfectly fine here (check with the Viewer node in the spreadsheet). The problem is that the `Mesh to Curve` node expects an edge selection, however you provide a point attribute. That's generally not an issue, because the node would just interpolate the point to an edge attribute, but in this specific case the interpolation does not do what you want. In your example, every point either has value 0 or 1 after the Capture node. When that is interpolated to edges, the following is done: * Edges where both points have value 0, also get value 0. * Edges where both points have value 1, also get value 1. * Edges where one point has value 0 and the other 1, get value 1. That's because when both values are mixed, the result is 0.5, and that is rounded to 1. This is what changed in 2e70af5cd5. Previously it would always simply cut off the decimal places, which was just wrong. So the new behavior is indeed the expected behavior, and there is no bug. Generally, the solution for you is to be more explicit about what you want and to rely less on the automatic type/domain conversion for selections. Here are two possible solutions: * Here the attribute is interpolated to edges as a float, so that there is a 0, 0.5 or 1 value per edge. Then a Compare node can be used to just select edges with value 1. ``` {F13099951} ``` * Here the points that you don't want to create curves from are deleted first. ``` {F13099962}
Member

Thx for the explanation @JacquesLucke , indeed my findings on the capture itself were wrong (this was based on the final outcome, not on the actual values in the spreadsheet)

Thx for the explanation @JacquesLucke , indeed my findings on the capture itself were wrong (this was based on the final outcome, not on the actual values in the spreadsheet)
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
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#98298
No description provided.