Optical Flow to Velocity Affector

I am trying to take depth image data from an Intel RealSense via NDI. The RealSense is not directly connected to the Notch system. I would like to take Optical Flow data and use that information to affect the direction (vector?) of a Velocity Affector of a particle system.

I am trying to achieve an effect where the motion through the frame of the RealSense affects direction of the Velocity Affector. For example: An arm wave from left to right in the frame would temporaliy send the particles in the same direction. I have played with the Image Affector node, but don’t really want to the particles bound to the the depth data, just their directional velocity. I have attached a basic example.

Any pointers to achieve this?

Screenshot_23|690x258

The Velocity Affector is designed to just drive particles in a particular direction, so connecting an optical flow node wont work.

For that effect, you can connect a Field affector instead and use the optical flow node within the field (optical flow generates a vector field). I’ve attached a simple experiment that should get you going in the right direction.

MotionVectorsToParticles.dfx (13.3 KB)

Thanks,

Ryan

1 Like

16x9 Aspect Ratio Issue Using Field Affector.dfx (9.8 KB)

Hey Ryan,

I was playing around with the example you posted here and I was wondering how do you change the aspect ratio of the field affector to 16:9 when using a 16:9 Image Emitter?

It seems that after setting the scale of the Image Emitter to 16:9 the field affector only affects a 1:1 portion of the emitter. If I plug the optical flow directly into the image emitter it works as intended and I get 16:9 but of course the effect is totally different.

I figured someone else might have the same question about using this little optical flow-field affector combo.

Thanks

Set the X scale to “16/9” (Literally “16 divided/slash 9” in the value field). Or, you could set it to “1.77778”.


Can you be a little more specific about what needs to be scaled to 16x9?

The Image Emitter is scaled to 16x9 and I still get these results.

From what I can tell the optical flow node doesn’t transfer or emulate the resolution when you plug it into the field affector.

Thanks


Screenshot_29

I fed the particle system into a null an set scale there. Everything the particle system remains 1/1.

Awesome!! Works perfectly.

Thanks!

If you are using it with an image emitter anyway, you can also add the optical flow to the “motion video” input, to and it will scale with the incoming video source automatically - I assumed you were looking for a general case apply motion vectors to particles initially.

– Ryan