# primitive SOP object falloff transform

hello,

i’m trying to recreate this Cinema 4D technique (as shown it the attachment):

a fracture mograph effect with a plain transformation of scale defined by a spherical falloff.

i’ve imported the subdivided geometry into TD, and connected a Primitive SOP, that allows me to change the scale of the primitives, but all at the same time.

Any ideas on how to achieve this falloff primitive effect?

cheers!

Rui Gato
primitive_falloff.1.toe (20.4 KB)

try this: in the primitive SOP transform, calculates distance from primitive centroid \$CEX,\$CEY,\$CEZ to the transform of your sphere inside a smooth function that refences the transform scale of your sphere
primitive_falloffAQ.3.toe (20.7 KB)

this exactly what i was trying to achieve, thank you!

i’m not familiar with the expressions yet, but this will give me a good starting point to dive in to them

wow, nice example of expression,

it’s in Tscript ! The ‘distance’ expression exist in python too ?

That a nice way to do it in SOPs, exactly what the Primitive SOP is good for. But unfortunately, its animating SOPs which is heavy, so watch the complexity of your input geometry. I get 15ms cook times on the Primitive SOP in this example.

There’s no explicit ‘distance’ function in python, but you may consider reworking this as a Script SOP, using prim.center , and our built-in Matrix and Vector classes, which do allow for calculating length, etc.
Plus it will give you the added benefit of defining custom parameters, instead of relying on Constant CHOPs

Okay, just as a learning exercise Ive begun to translate it to a Script SOP.

I had to fashion the tscript ‘smooth’ function from a Wave CHOP evaluation.
I don’t quite have it translated correctly, but you can see a similar output with the attached toe file.

Rob.
primitive_falloffAQ.4.toe (21.3 KB)

Interesting process
Do we have comparison between TScript and Python for speed cooking ? With expression on point modification.

ex:Primitive Faloof don’t work with me when i move SOP ‘O’ position.
And cook time : 12ms in TScript, and 42ms for the Python script.

In C4D it’s so impressive how many polygons can be transform in realtime on the viewer.

I thought at Attribute transfert node of Houdini, doing the same :
[url]https://www.sidefx.com/docs/houdini14.0/nodes/sop/attribtransfer[/url]
Could be in Touch ?