Random Value on Window Collection set

posted to: Separate Elements
I had an issue (in both the file that I have been using and the tutorial example files, the same issue exists). I suspect an update to the way this works may have changed it. If you add the ID value into the Random Value for selecting a random collection, the output is only true if both the random value generated AND the index for that random value is the same. In my instance setting the seed value to a number between 0 and 4 had no matches, 5 matched index 2, and 6 matched on 0,1 and 4. I resolved it by just using an integer constant set to 0 plugged into the ID value. Not sure if Im doing something wrong. My node setup inside separate elements: Collection Info (BITY_windowSet_residential) -> Realise Instances (Depth 1) -> Domain Size (Instances) -> Subtract 1 -> Random Value (Min:0, Max:From Subtract, ID from Group Input, Seed (tested with values between 0 and 10) -> Equal: Integer (A from Index and B from Random Value) Add Viewer Node with Realize Instance for Geometry and result from Equal as input) and set to Instances. Set seed value to 6 - in Viewer 0,1 and 4 are selected. set seed to 4 and none are selected. Set ID to 0 and scrube through seed values: there is always only a single collection set selected.
1 love
Reply
  • Martin Bergwerf replied

    Hi Andre,

    Could you provide a link to your (don't forget to Pack Resources!) .blend file (via Dropbox. Googledrive, or so)?

    These Geometry Nodes setups are very hard to troubleshoot from screenshots, let alone from only text descriptions. (Also, it's been a few years since I did  this Course.)

    Oh, and please mention the Blender Version you are using. That'll save me some time.

    1 love
  • Andre Labuschagne(AndreLab) replied

    Sure thing: https://drive.google.com/drive/folders/1etEz7y5F2c52yZRUl5Uz6Y5PdIqR4hJ-?usp=sharing

    There are two files here: one where it uses the ID value and one where it uses a fixed integer value (named appropriately)
    Resources are packed and I'm using v5.2

    I did try opening the example provided in the course files in v4.3 as well, and I think it works there, although I'm not seeing the buildings once I get out of the Group and I've not done any troubleshooting there.

    As an aside, I'm having a great time with this course, so thank you for that!

    1 love
  • Martin Bergwerf replied

    Hi Andre,

    I'm really glad that you are enjoying this Course, but just to be clear, I am not the creator of this Course. I am just trying to help.

    Anyway, the problem why your ID isn't working, is because there is nothing plugged into your ID:

    BCity_01.png

    Not exactly sure where you are in the Course, but the ID comes from a For Each Element Node (this is from my .blend from the end of Chapter 5):

    Bcity_02.png

    Everything inside your SeperateElements Group looks correct to me.

    1 love
  • Andre Labuschagne(AndreLab) replied

    Thank you! I'm back on track now. I have added the Integer constant outside the Separate Elements group and everything now seems to be working. As you say, I'll feed the ID when I get to the part of the course dealing with the For Each Element.

    • 👍
    1 love