MAXON CINEMA 4D: Cinema 4D Forum Adobe After Effects Forum

Xpresso random seed issue

COW Forums : Maxon Cinema 4D

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Corrado Carlevaro
Xpresso random seed issue
on Aug 20, 2019 at 12:05:30 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


Return to posts index

Brian Jones
Re: Xpresso random seed issue
on Aug 20, 2019 at 2:22:54 pm

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


Return to posts index

Corrado Carlevaro
Re: Xpresso random seed issue
on Aug 20, 2019 at 5:19:47 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)


Return to posts index


Brian Jones
Re: Xpresso random seed issue
on Aug 20, 2019 at 10:39:42 pm

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


Return to posts index

Corrado Carlevaro
Re: Xpresso random seed issue
on Aug 21, 2019 at 8:20:21 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)


Return to posts index

Brian Jones
Re: Xpresso random seed issue
on Aug 21, 2019 at 12:30:01 pm

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


Return to posts index


Corrado Carlevaro
Re: Xpresso random seed issue
on Aug 23, 2019 at 12:41:47 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!


Return to posts index

Corrado Carlevaro
Re: Xpresso random seed issue
on Aug 23, 2019 at 12:20:03 pm

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

import c4d
import random

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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]