Rectangular attractor/deflector

hi guys…is there a non circular attractor/deflector implemented in vvvv ?
i desperetly need a rectangular one…
cheers mike

have you tried using two attractors, one for x and one for y?

do you mean not to use the x & y out of an attractor but two attractors with x output only?
cheers mike

hi mike.

there is a node called “Attractor (Value)”.
with this node you can do almost everything.

“Attractor (2d)” and “Attractor (Value Self)” are for special cases and were written earlier. they shouldn’t be necessary anymore.

so how to use “Attractor (Value)”?

use vector (2d join) or vector (3d join) to get vector spreads / point spreads.

put your undistorted point cloud into the pin “Input”.
put your attractor points into the pin “Attractor”.

if you keep “Vector Size” at 1 then each dimension is treated separately from the node which results in a rectangular / boxed attractor behaviour.

cheers seb

hey guys…can you check out this little patch?
i patch gregsn suggestion to my understanding but it doesn’t seem to make much sense yet…
thanks j

rect_attrac.v4p (12.6 kB)

any idea yet ?
desperate for the rectangular attractor…
thanks jakob !!!

still no news?

mhh what effect do you like exactly to avhieve. how should it look? can you make a drawing?

hi guys…
can you take a look at this please !
i would like to scale each country on the map buy using rectangular attractors. in this little example i use one so far that is controlled via the mouse. i just changed the gridworm patch a little. (use the earth texture from the girlpower/images please).

so the attractor seems to be somewhat rectangular but i don’t understand why the attractor effects so much of the grid. i just want the attractor to work at the point where i am with the cursor. under my cursor a country should scale but the rest of the map should not be affected in this strage way (how it is now). if i change the vectror size of the attractor to 2 then i get the gridworm effect again and there i can clearly see where my attractor is working. when i set the vector size to 1 i can’t really see that anymore.
i want to deform the map without the spherical distortion i get from vector size 2. i want to deform it in a rectangular way but just where i am with the cursor.
help please !
cheers jannis

gridworm_rec.v4p (12.0 kB)

hi there…
here’s another one…using two attractors…one for x and y.
makes more sense to me because i can see what happens but now the problem is the the attractor affects the whole row of the grid and not just a certain rectangular radius around my cursor. this leads me to unwanted scaling of the map where i just want to scale around my cursor…same as above…not a spherical scale…
cheers jannis

gridworm_rec2.v4p (18.3 kB)

this one shows my problem the best…
my goal:
the further i get away from an attractor the less it distorts the grid…
check out the patch…and please help if you can…

gridworm_rec3_2rec.v4p (22.3 kB)


sorry, still no solution.

but maybe this is a little helpful?

however this module is not spreadable. so you have to use several instances of the module.

probably the best would be to solve it in a vertexshader…
have a look at the attractor.fx in the girlpower folder.
another problem for shure is that the grid is heavily distorted at the attractors borders.
i think another formula is needed for that.

tebjan, any ideas?

greg (4.0 kB)

and sorry sorry for the big delays. i was switching town…

hi gregsn, maybe you remember the patch i made at meso office to transform a circle into a quad. could this help ? i’m not at home this weekend, be patient some days …


@tebjan: i don’t know because i forgot the math behind it, but i think the attractor stuff works somehow different, because it has to deal with any point coming from outside. ~ but maybe also worth a try…
also the borders of the attractor were a problem: there was no soft transition between distorted and not distorted…

but after some more tries i think to have a quite ok solution. it is based on the attractorVS of the girlpower folder. the bad thing for now: it is limited for now to 4 attractors.
but it should be very fast. i don’t know because i did it on my old laptop without vertexshader support.

cheers from somewhere in the port of linz

ps: the new beta (since beta9) allows to adjust deviceproperties. so it was possible for me to use a REF device which just does every graphics op within the cpu. very cool.
also a cool tip: if you are working on a project which uses no video textures at all, then you can speed up directx by some impressive amount by just creating a singlethreaded device. check the pin “Multithreaded” of the “Device (Auto)” or “Device (Manual)” node. (4.2 kB)

hi guys, thanks for your support !
the works and even though it doesn’t do what i need it’s still pretty cool. the doesn’t run on my machine…
but i try it on a different machine later and see what i does…

the left output of the device node says “unable to create device”…
what does that tell me exept for it’s not working?

ah greg was faster, i also decided to try it with a vertex shader, my first attempt was only one attractor bur 3d (sphere and box), but the box style is really hard, not finished yet. nice work for the train …

@jannis you wrote, that gregsns solution doesnt do what you want, what else are you lookin for ?

sorry, i don’t know why some machines can’t create the REF device.

in the right bottom corner of the patch is a device node. change the configuration pin “Device Type” to D§DDEVTYPE_HAL. does it work now?

on one of our machines this worked…