distributed rendering

Some tips about the powerwall rendering and distributed rendering.

Some background

sort first, sort middle and sort last

Here is an online answer about how to use VTK to do distributed rendering

https://discourse.vtk.org/t/question-about-powerwall-rendering-based-on-vtk/14893/3

In MPI env, we can use icet, which is sorted last approach.

For IceT, there are two patterns, one is aggregate all rendered image to one process (alpha value of background color should be set as 0, and all image should have same size). Another is to distributed rendered ok image to all ranks using tile splitting.

In one of our project, we use VTK render directly, each process start a vtk render, and we use controller program to control the camera position of each render, and we can implement the effect of powerwall by this way. The trick part is just how to handle IO in a simple way and what parameters need to be updated for the camera. We just shift the window center by specific value. Although it is easy to implement, this appraoch is not efficient enough since each node need to load same data actually.

Handle IO

One of our project use asyncio of python. It can handle the communication in an asyncrounous way, which is lightweighted and flexible to use in the use case scenarios. We do not need RPC librarys here, this library can help us to handle encode and decode of the data.

Compute the camara movement

compuginh the shift of x and y

put the object at the center for camara wall

When the number of screen in one dimention is odd, such as 3. the middle is the center for specific display, such as 1 in x direction. the disply 0 should move -2 to left in view space (the bounds is from -1 to 1 in view space). But when the number of displays is an even number, such as 2, it is not convenient to compute, we need to add an offset firstly, for example, assuming middle one is 4/2=2 (actually it is not, the actual middle is at left side of display), we plus 1 firstly, so the dummy middle moves to the middle of display 2. Then we can use (index-middle index)*(2) to compute the shift value. By this way, all display can moves to the right position.

when the display is scaled, how to set the camara properly.

Performance issue

There is a tradeoff between data scale and rendering time; when the data set is extremely large, we can not send results to the render server and put data sets into the memory of a single machine; we need to render things in a distributed way. Maybe a practical approach is to use the low-resolution data to find the look-up angle of the camera and use high-resolution results (namely all data sets) when we want to capture the image from a specific angle, this operation may take longer time and need more computing resources, we even need to submit a job to do render things in this way.

Use MPI or not

If MPI is installed on node of each rendering cluster, there is existing solution based on icet

(take some time to learn this)
https://vtk.org/Wiki/VTK/MultiPass_Rendering_With_IceT

Otherwise, we need to distributed same data sets to all render servers and sync camera position accordingly.

Adding more details about how to use IceT, two models. Distributed rendering and reduce to one; the second model is to reduce to one and then split to tiled screens.

It seems that using one server to drive one display is an old technique. There is one specific machine called tile wall controller, which can split the image to separate tile display automatically.

These are some references

https://zh.userful.com/blog/new-video-multi-window-the-latest-feature-in-the-userful-video-wall-controller-how-it-works

在大型指挥中心或者展览现场,显然这种通用式的,硬件层面上的tile wall 才是更实际更通用的选择。在淘宝上搜索多屏拼接控制器,可以找到好多相关的选择,显然这种通过硬件层面的拼接相比与vtk层面的tile wall是更有效的。

推荐文章