zoukankan      html  css  js  c++  java
  • Multi-Projector Based Display Code ---- ModelViewer

    Overview

    Model viewer is another application we provided for large display. It is designed for viewing 3D models in .obj format. It also utilizes the output of the calibration phase, makes the necessary geometric and photometric correction and shows the resulted model on the multi-projector display.

    Algorithms

    The geometric and photometric correction algorithms used in ModelViewer is similar to those used in ImageViewer. The major difference here is that the texture source used for geometric and photometric correction doesn't come from any static image. Instead, we need to render the .obj model first into the back buffer of the graphic card and transfer it back to the texture buffer as texture source. Then we apply the necessary geometric and photometric correction the same as what we did in ImageViewer. So it is critical to have a graphic card with decent performance which supports double buffering and texture transfer from FrameBuffer to texture memory. Luckily, most relatively new graphics cards (on market since 2005) have no problem with this.

        The other thing need to pay attention to is that since this is a distributed system, the rendering PCs may have different graphics card (so it's better if you could use the same cards on all the PC, but it's still OK if you couldn't) and different speed in executing the texture copying, geometric and photometric correction. This will cause the display system visually unsynchronized: some projectors with better graphics cards may refresh faster. The effect is severe if user starts some animation on the rendered model. In order to deal with this, we add another synchronizer to the system. All the rendering PCs will send a signal to the synchronizer after finishing the texture copying, geometric and photometric correction and before actually showing the frame on projectors. If the synchronizer receives the signals from all the rendering PCs, it will send back a message to all the rendering PCs to indicate that they can swap the buffer and refresh the frame. Since the swap is a super-fast operation, refreshing of the display system on different render PCs will be well synchronized. You can refer to the code for more details.

    Download

    Please go to the download page.

    How to use the code

    We only support the multi-projector multi-PC configuration for this ModelViewer. Below are the step-by-step instructions of how to use the code:

    Multi-Projector Multi-PC Configuration:

    1. Download the corresponding binary package named ModelClient (control client running on master PC), ModelServer (render server running on render PC) and ModelSync (Synchronizer running on another PC, which can also be the master PC) from the above "Download" Section;
    2. Connect the PCs and projectors as showed in Figure 3 except not necessary to connect the camera;
    3. Copy the calibration result (such as reslut2x2.txt), alpha masks (Px.bmp) and .obj files to the working directory of all the render servers;
    4. Run the following program on all the rendering PC from command line with:
      ModelServer.exe
    5. Modify the configuration file named Client4.cfg according to your actual configuration (IP address, port, gamma, etc);
    6. Run the synchronizer on the master PC from command line with:
      ModelSync.exe Client4.cfg
    7. Run the control client program on the master PC from command line with:
      ModelClient.exe cube.obj Client4.cfg
    8. If everything goes well, you will see the model named cube.obj showing on the large display correctly;
    9. You can use mouse and keyboard to zoom in/zoom out, change the position and so on, please see the command line help of the program.
  • 相关阅读:
    elasticsearch ——id字段说明,内部是_uid
    企业安全建设之搭建开源SIEM平台(上)
    江西鹰潭、江西移动与华为战略合作:共推物联网——物联网的世界要到来了
    Luke 5—— 可视化 Lucene 索引查看工具,可以查看ES的索引
    Apache Flink vs Apache Spark——感觉二者是互相抄袭啊 看谁的好就抄过来 Flink支持在runtime中的有环数据流,这样表示机器学习算法更有效而且更有效率
    转:shell比较两个字符串是否相等
    UNIX 缩写风格
    转:.Net程序员学习Linux最简单的方法
    asp.net插入sql server 中文乱码问题解决方案
    asp.net将object或string转为int
  • 原文地址:https://www.cnblogs.com/cute/p/10790682.html
Copyright © 2011-2022 走看看