Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Maxon Cinema 4D Xpresso random seed issue

  • Xpresso random seed issue

    Posted by Corrado Carlevaro on August 20, 2019 at 12:05 pm

    Hi everybody,
    in TP preset Standard Emitter there’s a Random node feeded with a random seed taken from PGetData/Random Seed output to randomize e.g. the size of particles. It returns one (not changing with time) random number for each random seed.

    Why is that if I feed the very same (with same settings of course) Random seed with a Constant node it returns different random numbers every frame?!?

    (I’m using a Mograph Matrix as emitter so I need to use the Index number as Random Seed)

    Thank you
    Corrado

    Corrado Carlevaro replied 6 years, 8 months ago 2 Members · 7 Replies
  • 7 Replies
  • Brian Jones

    August 20, 2019 at 2:22 pm

    what version of C4D? The Random node changed somewhere in there (before 19 certainly) .

  • Corrado Carlevaro

    August 20, 2019 at 5:19 pm

    Version 18, I understand this is the normal functioning of the random node (outputting a different number each frame) so the question is: why is keeping the same number in TP Standard Emitter preset? Usually I use a Noise with the empty Time input port (0)

  • Brian Jones

    August 20, 2019 at 10:39 pm

    Random Mode Free or Time (or is that in R18 yet?)

  • Corrado Carlevaro

    August 21, 2019 at 8:20 am

    AFAIU Mode Free returns a different number each frame and each animation, Mode Time returns a different number each frame but same numbers each animation (starting from Frame 0 you get the same sequence of different numbers)

  • Brian Jones

    August 21, 2019 at 12:30 pm

    That’s as far as my understanding goes too. Are you looking to have each particle have a random size for every frame?

  • Corrado Carlevaro

    August 23, 2019 at 12:41 am

    No, I need a fixed random number for each random seed. Strange is this is as it behaves (and how
    you would expect it) in TP Standard Emitter preset, having a random but fix speed, life, size for each particle etc.
    I like experimenting with tweaked random or noise to drive animations, usually I use a noise node (lately python nodes) with constant time Input to get a fixed random number; different ways to get them in Xpresso I suppose, there’s also one system preset for integers etc.
    But not from the Random node apart in TP preset!

  • Corrado Carlevaro

    August 23, 2019 at 12:20 pm

    Fastest solution with Xpresso Python node (fixed random number):

    import c4d
    import random

    def main():
    global Output
    random.seed(Seed)
    Output = random.random()

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy