I've been trying to figure this out for a while, but I'm kind of stuck. I have an Object Instancer that duplicates an object a random number of times (between 5 and 30)

I want to have this number to stay constant for x amount of time before resetting (0) and then chooses a new random number.

I've gotten as far as to have the number of instances change every x frames (see attached Tree Node), but I can't figure out how to make it go to 0 before picking a new number.

Any help would be greatly appreciated.

Node Tree

  • $\begingroup$ Have you give a look to Add/Animation then TimeInfo, Delay, Repeat? $\endgroup$ – lemon Mar 24 '18 at 12:10
  • $\begingroup$ yes I tried messing around with that, but didn't get it to do what I wanted to. $\endgroup$ – oyztein Mar 25 '18 at 9:52

You can multiply the output of the Random Number Node with a value that is one for all frames except those that are multiple of $x$. We can detect if a value is a multiple of $x$ using modulo as follows:

Node Tree

Th result of the previous node tree is as follows:


The number of objects briefly goes to zero and change into a random number every 10 frames.

  • $\begingroup$ Hi Omar, thank you for your answer. I'm not sure I understand how to implement this to achieve what I wanted. I want to generate a random number for the object instancer, this number to stay constant for x amount of time, then briefly go to 0 before generating a new random number that stays constant for x amount of time and so on. Could you show me in this example blender file? dropbox.com/s/am0pg7767m3hpsy/clone_test.blend?dl=0 $\endgroup$ – oyztein Mar 25 '18 at 10:11
  • $\begingroup$ @oyztein, you can store information in an additional (hidden) object, for instance in its vertices. From that I think you can easily control when the value is to be changed depending on the current frame. $\endgroup$ – lemon Mar 25 '18 at 10:30
  • $\begingroup$ @oyztein I added a full example in my answer. Is it more clear now? $\endgroup$ – Omar Emara Mar 25 '18 at 14:11
  • $\begingroup$ @OmarAhmad Yes I got it now, thank you so much! $\endgroup$ – oyztein Mar 25 '18 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.