Multi-Projector Based Display Code ---- ModelViewer

ModelViewer是一款专为大型显示设备设计的应用程序,用于查看.obj格式的3D模型。它利用了校准阶段的输出,进行几何和光度矫正,并在多投影仪显示上展示结果。为了确保性能,推荐使用支持双缓冲和纹理从帧缓冲到纹理内存传输的高性能显卡。通过分布式系统中的渲染PC、同步器和控制客户端协同工作,实现3D模型的高效渲染和同步显示。
摘要由CSDN通过智能技术生成

原文地址:  http://www.comp.nus.edu.sg/~brown/projects/projector/modelviewer.html


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. 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值