Random Parameters on Clones?


#1

Hello!

I am currently looking for a way to randomize some Properties of cloned objects. In this case I would like to assign a random Mass and Friction as well as a random Position Follow to each cloned object (while keeping everything as procedural as possible). But in general it would be interesting to know if there is a solution for that for every possible Parameter (Property or Tag Parameter…)

Cheers
Felix


#2

You can access indivual clones using GetCache in a python node. In this file I change the friction based on clone index. For random, you could use the index in a calculation of random seeds.

GetCache.c4d (232.9 KB)


#3

thanks jed1949, I think that’s exactly what I was looking for, although I can code absolutely zero. :smiley:

I played around a little bit just to understand how this works and I ran into two issues.
The python node seems to evaluate at frame 1 (not frame 0) and the random seed node generates a random number hat each frame. is there a way to generate a constand radom value per index?

thanks
Felix


#4

You can use the index as the seed - doesn’t have to be a large value. Maybe include a math node - add 100 etc - to vary things.


#5

re new random number every frame - you can use freeze to hold the value generated at F0. If frame > 0 then freeze. Bear in mind that the random node has 2 methods - ‘free’ is different every time the scene is run, and ‘time’ is same set of random numbers (for a given seed).

freeze.c4d (189.7 KB)


#6

It would be interesting if Fields could give properties to clones based on a noise or texture for example.


#7

thanks jed1949, works perfectly.

do you also have an idea if something like this could also work with effectors? like for controlling the properties of an effector based clone objects parameters (random floats, color, size etc…)


#8

there’s an easy way without code you can apply in your case.
Watch this tutorial, and remember that MoGraph can affect NOT only the parameters of objects themselves, but also tags.

In this project file (C4D R20) I am using the above technique to randomize the Object Mass


#9

Just a note, Mograph can’t blend expression tags…


#10

More info on Python GetCache() C4D Cafe and helloluxx .


#11

Hi Jed1949!

I’ve found this post looking for a solution to a similar problem. I tried to adopt your xpresso to my case, but it does not work (or I am just not knowing what am I doing, which is a possibility). Is it possible to affect parameters deeper inside clones? I’d like to apply a random number (or any number in that matter) to a seed of noise that is modifying displacer inside the clones. In order to have every clone different (and not in cloner’s blend method). Is it possible? For the science :wink:


#12

To get the noise seed into the XPresso window, you need to drag the checkerboard icon in to make a second node.

seed

This seems to break my GetCache() method. There’s probably a more ‘mograph’ solution.