panoshader demo version 2.0
(Cg Implementation)

Program code contributors:

Siu-Hang Or
Chi-Wing Fu
Tien-Tsin Wong
Dan Wei

Introduction

This program demonstrates the ability to perform real-time dynamic lighting on highly compressed panoramic images. This kind of relightable (illumination-adjustable) panorama is especially useful for representing large-scale complex backgrounds in computer games. The real-time relighting is implemented by writing shaders on programmable graphics hardware.

An image-based scene, "forbid" (less than 3MB in size), comes with this demo. There are three programs, one for directional-source relighting, one for point-source relighting, and the other is for relighting with slide projection. In all cases, the same data set "forbid" is loaded. To demonstrate the real-time performance, the light sources change in color, direction or position during the run-time.

This program is now in version 2.0. This version is implemented with Cg, in contrast to the low-level shading language in version 1.0. Since Cg is equivalent to HLSL of DirectX 9, this program can be easily ported to DirectX.

System Requirement

Hardware: Pentium III or above, 128MB RAM, installed with nVidia GeForce FX graphics accelerator.
OS: Windows 98/NT/2000/XP, with OpenGL

Installation Instruction

(1) Download panoshader2
(2) Unzip the panoshader2 into a subdirectory, say panoshader2
(3) Run one of the three demos:
- dir.exe (for directional-source relighting)
- pt.exe (for point-source relighting)
- slide.exe (for relighting with slide projector)

User Manual

Directional-source relighting:

Start "dir.exe" to run the demo. Once the program is started, a directional light source moves around and illuminates the scene forever. It changes its color from time to time.
Drag inside the window to accelerate the change of illumination.
Press "a" or "A" to pause/resume the change of illumination.
Press "p" or "P" to test performance in frame rate on your machine
Press "q" or "Q" or escape to quit the demo.

Point-source relighting:

Start "pt.exe" to run the demo. Once the program is started, a point light source moves around in the scene and illuminates the scene with changing color and intensity. It follows the animation script defined in "animation.txt". Inappropriate modification to this script file may cause program fault.
Press "a" or "A" to pause/resume the change of illumination.
Press "p" or "P" to test performance in frame rate on your machine
Press "q" or "Q" or escape to quit the demo.


Slide Projection:

Start "slide.exe" to run the demo. Once the program is started, a slide projector moves around in the scene and illuminates the scene with changing color and intensity. It follows the animation script defined in "slidepjanimation.txt" and projects the slide in "slide.bmp". Inappropriate modification to this script file may cause program fault.
Press "a" or "A" to pause/resume the change of illumination.
Press "p" or "P" to test performance in frame rate on your machine
Press "q" or "Q" or escape to quit the demo.

Related Publication

Contact Person

Tien-Tsin Wong (ttwong@acm.org)


Home
Copyright 1996-2012 Tien-Tsin Wong. All rights reserved.