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.