I'm looking for a way to get a random value between 2 given integers.
Thanks in advance!
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
This can be solved with some (for my level) clever use of the math node:
A quick rundown of what the nodes do in this case:
Subtract: calculates the difference between your desired minimum and maximum value. In other words, the maximum amount of variation that could happen, in this case 2500.
Multiply: Multiplies the previous calculated value with the output from the Random value of the Object Info node, which lies between 0 and 1. This creates a random value between, in this case, 0 and 2500.
Add: Adds the randomly generated value of the Multiply node to the mininum value you have specified, resulting in a random number which cannot go below your desired minimum or above your desired maximum.
In this case what happens is: 3000 + value between 0 and 2500 = value between 3000 and 5500
(No i do not know the proper math symbols, but I think you get the point.)