Geometry Nodes: Random Integer min and max values half as frequent #93591

Closed
opened 2021-12-03 04:29:24 +01:00 by RoyTheKoi · 7 comments

System Information
Operating system: macOS Big Sur 11.2.3
Graphics card: AMD Radeon Pro 5500M 8 GB

Blender Version
Broken: 3.1.0 Alpha, 88e9e97ee9, master, 2021-11-30
Worked: Unknown

Short description of error
When using the random value node set to integer mode, the probability of each integer value appearing is not the same. Instead, the min and max values appear approximately half as frequently as other values.
Random_integer_nodes_and_data.png

Random_Integer_0_to_4_fixed_total.png

Exact steps for others to reproduce the error

  1. Open the attached blend file.
  2. In the spreadsheet editor change the value on the row filter to see the amount of each random integer. Notice that the quantity of min and max values is around half that of other values.
    Random_Integer_bug.blend
**System Information** Operating system: macOS Big Sur 11.2.3 Graphics card: AMD Radeon Pro 5500M 8 GB **Blender Version** Broken: 3.1.0 Alpha, 88e9e97ee907, master, 2021-11-30 Worked: Unknown **Short description of error** When using the random value node set to integer mode, the probability of each integer value appearing is not the same. Instead, the min and max values appear approximately half as frequently as other values. ![Random_integer_nodes_and_data.png](https://archive.blender.org/developer/F12682443/Random_integer_nodes_and_data.png) ![Random_Integer_0_to_4_fixed_total.png](https://archive.blender.org/developer/F12682465/Random_Integer_0_to_4_fixed_total.png) **Exact steps for others to reproduce the error** 1. Open the attached blend file. 2. In the spreadsheet editor change the value on the row filter to see the amount of each random integer. Notice that the quantity of min and max values is around half that of other values. [Random_Integer_bug.blend](https://archive.blender.org/developer/F12682455/Random_Integer_bug.blend)
Author

Added subscriber: @RoyTheKoi

Added subscriber: @RoyTheKoi

Added subscriber: @deadpin

Added subscriber: @deadpin

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

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

Confirmed here as well. This is due to how the node rounds the random floating point number to an integer using floorf(value + 0.5f)

Confirmed here as well. This is due to how the node rounds the random floating point number to an integer using `floorf(value + 0.5f)`

This issue was referenced by 99efb95441

This issue was referenced by 99efb954413890eab9e2c49b63fe4d905e111efd

This issue was referenced by f886f29355

This issue was referenced by f886f293550c275160a340b0815c48f1c9e23220
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Hans Goudey self-assigned this 2021-12-10 16:35:43 +01:00
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
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
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 & 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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & 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
4 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#93591
No description provided.