Jump to content

Screen capture in multi-camera (use multi thread)


photo

Recommended Posts

 

Hello unigine :D

We are trying to screen capture in multi-camera (every frame)

  • environment
    • CPU : i9-9900k
    • GPU : RTX-3090 
    • Unigine Version : will be most recent version
    • * PC : maybe 5 or more computer (we also consider parallel computing)

 

We tried it in unity system, but its framerate was too low.

We also tried multi-thread but the unity camera component was only accessible from the main thread.

Additionally, our world have many cameras.

 

our codes in unity C# was like :

```

Update()

{

Capture1(); // start in thread 1

Capture2(); // start in thread 2

}

Capture1()

{

RenderTexture rt = new RenderTexture(width, height, 24);

camera1.targetTexture = rt;

Texture2D screenShot = new Texture2D(width, height,     TextureFormat.RGB24, false);

camera1.Render();

screenShot.ReadPixels(new Rect(0, 0, width, height), 0, 0);

SaveToPNG(camera1); // will be ffmpeg video

}

```

Can unigine engine use multi-thread with multi camera capture?

if have any samples or insight, please let us know

Thank you!

 

Link to comment

Hello!

We noticed that a similar feature exists in Unigine engine : Video grabber

 

Can we use this feature (video grabber) with multi camera?

and can we use it in runtime(not editor, in play)?

 

Your response would be appreciated

Thank you!

 

 

Link to comment
×
×
  • Create New...