Identity attribute - map range question

Dear Chris, 

Isn't it still tricky to use the rectified id (using the map range with a very large max number)? I still think there might be a chance of collision (what is random for the underlying prog language, right :-)?). So why not upscale the frame number with the number of points generated per frame? In my example below I just subracted 1, as I prefer to have my Identity to start form 0 :-).


BTW: I really love this course and how you build it up! Thank you for that





1 love
Reply
  • Martin Bergwerf replied

    Hi Michallis,

    You are absolutely right and your solution is great (and simple)!

    It isn't even because of how the random numbers are generated in a programming language, but with random numbers in general, they're not all gonna be different. There is this famous example, that in a class of 23 children, the chance that 2 have the same birthday is more than 0.5 (or 50% for barbarians).

    Maybe it doesn't matter if two identity's are the same, when they are far enough apart in time (I can't remember exactly how the Identity is used here), but your way is certainly fool-proof.

    2 loves
  • Michallis Pashidis(michallis) replied

    Funny example, I will remember that one, thank you very much for the feedback

    1 love
  • Martin Bergwerf replied

    You can make a visualiser in GN, to show what the chances of a duplicate are for any number. For instance with a random Integer between 1 and 100,000 the chance of two numbers being the same is just over 0.5 when you pick 373 numbers:Chance.png

    2 loves
  • Michallis Pashidis(michallis) replied

    Woow Martin, That is cool! Thank you for sharing this interesting approach

    • 👍