Equal Vs. Not Equal does not have opposite effect. #98317

Closed
opened 2022-05-22 15:54:26 +02:00 by Gerstmann Bradley · 11 comments

System Information
Operating system: Windows-10-10.0.17134-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 970M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.11

Blender Version
Broken: version: 3.2.0 Beta, branch: master, commit date: 2022-05-20 15:07, hash: bf352df27a
Worked: (newest version of Blender that worked as expected)

Short description of error
[Equal Not Equal].mp4
Equal Not Equal.blend

**System Information** Operating system: Windows-10-10.0.17134-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 970M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.11 **Blender Version** Broken: version: 3.2.0 Beta, branch: master, commit date: 2022-05-20 15:07, hash: `bf352df27a` Worked: (newest version of Blender that worked as expected) **Short description of error** [[Equal Not Equal].mp4](https://archive.blender.org/developer/F13097630/_Equal_Not_Equal_.mp4) [Equal Not Equal.blend](https://archive.blender.org/developer/F13097629/Equal_Not_Equal.blend)

Added subscriber: @Bradley_G

Added subscriber: @Bradley_G
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

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

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

The Not Equal code uses the expression abs(a.x - b.x) > epsilon && abs(a.y - b.y) > epsilon && abs(a.z - b.z) > epsilon while it probably should be abs(a.x - b.x) > epsilon || abs(a.y - b.y) > epsilon || abs(a.z - b.z) > epsilon.

The Not Equal code uses the expression `abs(a.x - b.x) > epsilon && abs(a.y - b.y) > epsilon && abs(a.z - b.z) > epsilon` while it probably should be `abs(a.x - b.x) > epsilon || abs(a.y - b.y) > epsilon || abs(a.z - b.z) > epsilon`.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Not sure I am getting the usecase right, these should all be equal, right (we are comparing the same points so to speak)? So we are in the realm of numerical floating point imprecissions?

Not sure I am getting the usecase right, these should all be equal, right (we are comparing the same points so to speak)? So we are in the realm of numerical floating point imprecissions?
Member

Thx checking @OmarEmaraDev

Thx checking @OmarEmaraDev

No, they shouldn't be all equal.
Given two spheres with the same radius, Geometry Proximity's positional output should be the same as sphere's own origin, only if there's no intersection.
When there's intersection, position will be attracted by the other sphere's origin.
In this bug report, "Not Equal" is giving wrong result, because it should have selected these intersecting vectors, as you see in "Equal Not".

No, they shouldn't be all equal. Given two spheres with the same radius, Geometry Proximity's positional output should be the same as sphere's own origin, only if there's no intersection. When there's intersection, position will be attracted by the other sphere's origin. In this bug report, "Not Equal" is giving wrong result, because it should have selected these intersecting vectors, as you see in "Equal Not".

This issue was referenced by e07b1b8316

This issue was referenced by e07b1b8316392ebf3c51a4671d8b56dc4b222f02
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Jacques Lucke self-assigned this 2022-05-24 09:50:21 +02:00

This is a little confusing from a mathematical perspective. All other operations in the Compare node are of the form:
all(A.component <op> B.component)

But now the Not Equal operation is of the form:
any(A.component <op> B.component)

I understand that this seems to be more intuitive for non-mathematically inclined users, but I wonder if the wording could be made more clear that this is happening. It may not be practical because something like Not Equal (any component) is too verbose to fit in the node.

This is a little confusing from a mathematical perspective. All other operations in the `Compare` node are of the form: `all(A.component <op> B.component)` But now the `Not Equal` operation is of the form: `any(A.component <op> B.component)` I understand that this seems to be more intuitive for non-mathematically inclined users, but I wonder if the wording could be made more clear that this is happening. It may not be practical because something like `Not Equal (any component)` is too verbose to fit in the node.
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#98317
No description provided.