Attractors....

gtoledo3's picture

Has anyone given much thought to programming attractors using QC, other than what's available in Particle Tools?

gtoledo3's picture
Re: Attractors....

To clarify, I mean stuff in the vein of 3 dimensional Navier Stokes, or even something as simple as having a bunch of sprites going left to right, iterated, and then introducing a "point" or multiple points into the structure, and having the sprites do stuff like orbit or avoid the specified points.

My mind was on this because I was using an object called an "attractor" in VVVV, and it's a very nicely abstracted and user friendly way of feeding structures, specifying hot points, and then having the attractor object/node "do cool stuff".

You can get the output of a GLSL vertex distorted grid, for instance, "get" the verts, feed them to the attractor, feed your incoming other structure into the attractor, and then the output struct is the transformed structure. Granted, we can't get GLSL vertices after transform, but we can get similar info by "get vertices"/OpenCL, or simply programming the points with javascript.

I know that people have done "strange attractor" stuff like Lorenz attractors in QC... that's not what I'm talking about so much (at least I don't think so...).

psonice's picture
Re: Attractors....

gtoledo3 wrote:
or even something as simple as having a bunch of sprites going left to right, iterated, and then introducing a "point" or multiple points into the structure, and having the sprites do stuff like orbit or avoid the specified points.

I've done that before, it's easy to determine the distance from a point in an iterator and change the animation based on distance (I did a simple 'move the mouse around to blow the particles away' type effect, nothing really impressive).

That's OK for simple stuff, but for anything complex I guess you'll want to go down the openCL/GLSL route, and expect it to get hardcore pretty fast if you're doing 3d navier stokes ;)

gtoledo3's picture
Re: Attractors....

Yeah, I've done that one too... that's kind of straightforward. I have that kind of hit test stuff going where you can have a "hot coordinate" and then if something passes over it, it spins or does whatever you want based on the conditional of it passing that coordinate. I guess looking at VVVV has made me literally want to be able to plugin Structure(s) A, then Structure(s) B, and then have it do the hard work for me.

It's that "cool stuff" of having a particle catch "gravity" and do an orbit around the attractor that gets a bit more complex, and taking stuff into account like velocity, etc. It's actually pretty amazing that the attractor in VVVV is plug and play, and can actually do stuff like real vortex/orbiting, etc effects.

I agree... I think OpenCL is the best route presently as well. In essence, the fluid covers some of this territory, but not quite the same.

When I first saw Cuda, I remember seeing this fantastic example of a car driving around a 3D scene, and smoke, etc., coming off of the tires. I guess this is the kind of "particle system" stuff that I hoped would be more fleshed out in SL. I would love to see some real good 3D physics stuff done with OpenCL as well (like bouncy with limits, but in 3D, and with some blocks in the room).

gtoledo3's picture
Re: Attractors....

This is a qtz that shows what I mean about picking an x/y point and making a bunch of other iterated objects "do stuff" if they are on top of the x/y point.

PreviewAttachmentSize
Cube Avoidance.qtz44.85 KB

cybero's picture
Re: Attractors....

Phew - that's some Lighting macro, GT :-)