Distribute Points On Faces generates ID integers so big that they create floating point errors down the line. #103325

Open
opened 2022-12-18 22:14:41 +01:00 by Antoine · 7 comments

System Information
Operating system: Win 11
Graphics card: rtx 2060s

Blender Version
Broken: 3.5 alpha, 3.4 stable

Distribute Points On Faces generates an ID field with extremely large integers which causes rounding errors when they are implicitly converted to floats later in the node tree.

The problem is noticeable in the setup provided. The point IDs are captured on curves so that each spline is filled with the same ID. The curves are then subdivided which causes the IDs to be interpolated for new points. One would expect the new interpolated integers to match their neighbors exactly as all points share the same ID. However due to the size of the integers, the interpolation introduces a precision error and produces very unexpected results.

I'm not sure if this qualifies as a bug because each node works independently as designed, but from a user's perspective the problem looks and feels like a bug. I think the IDs are generated this way to minimize the possible chances of collision? I can't think of a good solution but someone smarter might.

ID integer bugs.jpg
ID integer bugs.blend

Based on the file provided:

  1. make sure the viewer is active
  2. turn the subdivide node on and off
**System Information** Operating system: Win 11 Graphics card: rtx 2060s **Blender Version** Broken: 3.5 alpha, 3.4 stable Distribute Points On Faces generates an ID field with extremely large integers which causes rounding errors when they are implicitly converted to floats later in the node tree. The problem is noticeable in the setup provided. The point IDs are captured on curves so that each spline is filled with the same ID. The curves are then subdivided which causes the IDs to be interpolated for new points. One would expect the new interpolated integers to match their neighbors exactly as all points share the same ID. However due to the size of the integers, the interpolation introduces a precision error and produces very unexpected results. I'm not sure if this qualifies as a bug because each node works independently as designed, but from a user's perspective the problem looks and feels like a bug. I think the IDs are generated this way to minimize the possible chances of collision? I can't think of a good solution but someone smarter might. ![ID integer bugs.jpg](https://archive.blender.org/developer/F14070666/ID_integer_bugs.jpg) [ID integer bugs.blend](https://archive.blender.org/developer/F14070668/ID_integer_bugs.blend) Based on the file provided: 1. make sure the viewer is active 2. turn the subdivide node on and off
Author

Added subscriber: @AntoineP

Added subscriber: @AntoineP

Added subscriber: @mod_moder

Added subscriber: @mod_moder

Will check...

Will check...

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly

I can confirm that there is an error. Since the attribute originally belongs to curves, it's a little strange that interpolation is still used, which implies factorial blending.
But it's a precision issue and a feature request...
Also, here is an example of how you can make it use a simpler and more reliable interpolation method:
image.png

I think this might be a known issue, but for now I'll leave that to you. @HooglyBoogly

I can confirm that there is an error. Since the attribute originally belongs to curves, it's a little strange that interpolation is still used, which implies factorial blending. But it's a precision issue and a feature request... Also, here is an example of how you can make it use a simpler and more reliable interpolation method: ![image.png](https://archive.blender.org/developer/F14071066/image.png) I think this might be a known issue, but for now I'll leave that to you. @HooglyBoogly
Author

Thank you Illiya, I had come up with this solution as well as a few others like dividing down the ID field or just using captured index numbers. The reason I still decided to submit a report is because this use of the ID attribute seems basic and within its intended use.

Thank you Illiya, I had come up with this solution as well as a few others like dividing down the ID field or just using captured index numbers. The reason I still decided to submit a report is because this use of the ID attribute seems basic and within its intended use.
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
2 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#103325
No description provided.