This is a quick and dirty tutorial I whipped up for craeting HDRI panoramas with Terragen.
The simplest method of creating a panorama from Terragen is to render 6 x 90° images representing the faces of a cube. For this we need the following camera settings for each image.


After adding the SO HDR Output effect you need to double click on it to set its options. There are only two options:
For the last option, just click OK to create a numbered series of files.
NB. Cube faces are square, so remember to set your image size to equal height and width!
Displaying HDR panoramas via a java applet uses a lot of memory so don't get too ambitious on the image sizes. Stick to cube faces 500-750 pixels in size.
Most stitching applications prefer the images to be in the following order:
The simplest way of doing this in Terragen is to run the following script after you have selected your viewpoint:
initanim "C:\temp\cube", 1 CamOri 0,0,0 frend CamOri 90,0,0 frend CamOri 180,0,0 frend CamOri 270,0,0 frend CamOri 0,90,0 frend CamOri 0,-90,0 frend
This will give you 6 .bmp files (which you can also use to convert to normal QTVR panoramas) and 6 .hdr files
From here it gets a little messy with a few extra file transfomrations as the images are eventually arranged into the appropriate format for viewing.
(largely extracted from the Cube2Cross readme)
In order to allow Cube2Cross to be able to find all 6 files, the following naming convention is used:
Luckily, HDR shop will reproject the cross images provided by Cube2Cross to equirectangular.
Open the cross image produced above in HDRShop
Save the resulting image
This is a relatively simple stage requiring you to run PTConvert from the commandline. (You can try drag and drop but it didn't work for me using WinXP). You should read the readme file that comes with PTConvert and I'd recommend using at least the following options:
PTConvert Inputfile -o Outputfile -q quality
... remembering to use .fjpg for the file extension.
For the commandline-challenged you will need 3 files in the same directory.
- Your HDR panorama from above
- The PTConvert application
- A text file with a .bat extension.
e.g. Using the Lat/Long image you produced in the previous section, with a name of mypano.hdr, type the following text in notepad:
PTConvert mypano.hdr -o mypano.fjpg -q 100and save it as "ptconvert.bat" in the same directory as PTConvert.exe.
Double click on ptconvert.bat and wait for mypano.fjpg to appear. If PTConvert crashes, it is usually because the input file specified doesn't exist. If you leave out the -q option PTConvert will use a quality of 80 as the default.
See the readme for PTViewer for now. The basic code for the applet is included below. Click and drag on the image to pan around. The exposure of the image will change to match the proportion of light and shade. The image artefacts around the sun are a glitch caused by Terragen. You can avoid this by a) hiding the sun or b) setting the diameter of the sun to 0, although the latter is not much use for sunsets. Here is a test panorama with a sun diameter of 0.
The code for the applet:
<applet code=ptviewer.class name="ptviewer" width=420 height=300 mayscript=true archive=ptviewer.jar> <param name=file value="cube.fjpg"> <param name=gamma value="1.5"> <param name=exposure value="500"> <param name=autorange value="20"> <param name=quality value=2> </applet>