MoGraph Formula effector


#1

Does anyone have a formula for the Mograph Formula Effector that gives similar results to the default ripple formula found in the Formula Deformer?

TIA

JeremyW


#2

Hi,

it’s actually not much different. The thing is, as you don’t have a single mesh, you can’t operate on UV space (please somebody correct me, if i overlooked something). Instead we’ll work with the clone positions.

Here’s the default Formula Effector formula:
sin(((id / count) + t) * f * 360.0)
And this from Formula Deformer:
Sin((u+t)*2.0*PI)*0.2

Note, they are already quite similar, basically a sine (lets ignore the trailing *0.2 in Formula Defomer for now, it simply scales the output value). Next think to ignore is one formula written with degrees (*f*360.0), the other with radians (*2.0*PI). What remains is the sine: sin( (A + t) * ignored) * ignored. In the one formula A is “u”, in the other A is “(id / count)”. As mentioned before, we are dealing with clones instead of a single object. Obviously the clone ID won’t get us far, as it is only loosely position dependent. Instead we’ll look for a replacement for u. u (as part of the UV coordinates) is in the range 0…1 (quite handy for the sine). In my example I took the clone position or rather distance. The distance is sqrt(px*px+pz*pz), but the distance is not between 0 and 1 but anything else. So, here we’ll get a dependency with the size, by which we divide the result of the square root.

Long story short, in my example the cloner spreads the clones onto a plane 400cmx400cm (equivalent to the plane), thus the “radius” is 200.0.

And my formula is:
sin(( sqrt(px*px + pz*pz) / 200.0 + t) * f * 360.0)

It’s just (id/count) got replaced by sqrt(px*px + pz*pz) / 200.0.

test_fomula_effector.c4d (234.9 KB)

I hope that made sense.
Cheers


#3

Well explained and perfect example file.
Much appreciated!


#4

Great explanation! Thank you