Maniphest T93591

Geometry Nodes: Random Integer min and max values half as frequent
Closed, Resolved

Assigned To
Hans Goudey (HooglyBoogly)
Authored By
RoyTheKoi
Dec 3 2021, 4:29 AM
Tags
  • BF Blender
  • Nodes & Physics
Subscribers
Jesse Yurkovich (deadpin)
RoyTheKoi

Description

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.

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.

Revisions and Commits

rB Blender
D13474
D13474

Related Objects

Mentioned In
T93479: 3.0 Potential candidates for corrective releases
Mentioned Here
rB88e9e97ee907: Geometry Nodes: Add Point Count to Spline Length Node

Event Timeline

RoyTheKoi created this task.Dec 3 2021, 4:29 AM
RoyTheKoi updated the task description.Dec 3 2021, 4:32 AM
Jesse Yurkovich (deadpin) changed the task status from Needs Triage to Confirmed.Dec 3 2021, 5:03 AM
Jesse Yurkovich (deadpin) added a project: Nodes & Physics.
Jesse Yurkovich (deadpin) added a subscriber: Jesse Yurkovich (deadpin).

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)

Hans Goudey (HooglyBoogly) closed this task as Resolved by committing rBf886f293550c: Fix T93591: Random Value node first and last value proportion.Dec 10 2021, 4:35 PM
Hans Goudey (HooglyBoogly) claimed this task.
Hans Goudey (HooglyBoogly) added a commit: rBf886f293550c: Fix T93591: Random Value node first and last value proportion.
Philipp Oeser (lichtwerk) added a commit: rB99efb9544138: Fix T93591: Random Value node first and last value proportion.Jan 11 2022, 9:00 AM