Search the Community
Showing results for tags 'multithread'.
-
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!
-
In the documentation under the topic "Execution Sequence" for the Unigine SDK there are these lines: Multi-Threaded Main Loop In the multi-threaded mode, where two or more CPUs exist, the execution pipeline is implemented differently at some points. They are as follows. In the update stage, the world script uses all available threads to update visible nodes, instead of updating them one by one. By that, Unigine analyzes node dependences, so these operations are fully thread-safe. The number of threads to be used is controlled via world_threaded. In the rendering stage, multi-threaded physics and pathfinding are run in their separate threads before anything else. They will perform their tasks on all available threads in parallel to rendering. The number of threads to used in controlled via physics_threaded and pathfind_threaded respectively. The swap stage in this scenario includes waiting for all additional threads to finish their tasks. After that, physics and pathfinding threads are synchronized and calculations are applied to the world. Now. How do you enable "MultiThreaded" mode. We have tried many combinations and we could not get the use of more than a single CPU. Could there please be an explanation of exactly how this is done and how it works. Cheers, Dave <edit repasted so the words were more readable>