Generating particles from generated coordinates

I generated the XY coordinates and Radius from Find CvMat Circles.

I would like to use those XY coordinates to generate coordinates for multiple particles, how do I build a node?

It’s difficult to deal with the Vec3 array.

Hello,

Have you managed to pass the coordinates to UE4 yet? You can open the Stranger Rings sample project (in Intro Window->Unreal Engine tab) where there is a computerVision layer showing you how to do that.

Then, if you open LightAct sample UE4 project, and open the Stranger Rings level, you can see how these coordinates are parsed on UE4’s side.

Let me know how it goes,
Mitja

Yes I’ve checked on that.
When I generate particles in UE4 and then return the rendered image to Lightact in Capture2D, the response is poor, so I’m thinking of generating the particles in Lightact.

Hello,

What do you mean by ‘response is poor’?

Thanks,
Mitja

Now, the coordinate data generated by Find CvMat Circles is passed to UE4 and
I’m generating particles on UE4 and passing the rendered image as a texture to Lightact, but it’s a bit poorly tracked. There is a time lag.

Hmm, one reason might be if you are running unreal in the editor. The frame rate drops significantly if unreal doesn’t have focus. If you run it in standalone or packaged it is much better.

Other reason might be in the particles generation itself which might react more slowly to the inputs.

Just some ideas I had :slight_smile:

Good luck,
Mitja

Yes, of course, we do it standalone as well.I have experienced the difference in response, but it is still slow.
I went with the Stranger Rings sample project and there is a time lag.

So.
I want to use the XY coordinates from Find CvMat Circles to generate coordinates for multiple particles that will follow those coordinates, how do I create nodes?

I want to generate particles on Lightact.

Hi,

There are many ways to go about it. I would probably extract the first item in the array using Get Vec3 Array Item node.
image

Then I would use this coordinate in a 2D scene to create a circle which I would use to create a texture emitter in a 3D scene.


You could use WebCam and Texture Particle Emitter sample project as your starting point.

Alternatively, you could convert the black & white cvMat you are feeding into Find CvMat Circles node into a texture and use this as the source of a texture emitter.

I hope this helps,
Mitja