L3DT users' wiki
Large 3D terrain generator

 

Recording panorama videos

Author Aaron
Last updated 22 Feb 2008

This tutorial will explain how to record 360-degree panoramic videos of your terrain using the Sapphire and L3DTio_VFW plugins. An example video is given below:

A panorama recorded from Sapphire
Download AVI [1.4MB; better quality than YouTube]

Installing required components

L3DT version

This tutorial requires L3DT release 2.7 (Feb 2009) or later, in any edition ('Standard', 'Professional' or 'Pro for Torque'). If you do not have L3DT v2.7 or later, please download it now. We'll wait for you…

Video for Windows plugin

Before you can record AVIs with L3DT, you have to download and install the Video for Windows (VFW) plugin (link here). Plugin installation instructions are available here.

Setting up Sapphire

Before you record a panorama, you should open Sapphire and set up your desired camera position and other rendering settings. To do this, open your project in L3DT and press the '3D' button on the toolbar to open Sapphire.

Setting the camera position

Position the camera in Sapphire using the following controls:

Control What it does
W key Move forward
A key Move left
S key Move backwards
D key Move right
E key Move upwards
R key Move downwards

To rotate the camera, left-click and drag the mouse.

When you run the panorama script later, it will start recording at your current camera position and heading.

Other rendering settings

Now is a good time to choose the frame size of the output video. To do this, simply re-size the Sapphire window.

For better visual results, you may want to increase the triangle count per frame. To do this, use the '0' button or press the 'Tris +' toolbar button in Sapphire.

You may also wish to increase the viewing distance. To do this, press the '=' (or '+') key or the 'Clip +' toolbar button in Sapphire.

If you would like to hide the head-up display text in the top-left corner of the Sapphire window, un-check the 'Options→Show HUD' menu option in Sapphire.

Pause, but DO NOT CLOSE Sapphire!

Once you have setup Sapphire with your preferred camera position and display settings, press the pause button in Sapphire. This is actually quite important, as Sapphire consumes a lot of CPU time and will make the rest of the L3DT user-interface quite unresponsive. Hence, I'm going to re-iterate my point for the sake of those not really paying attention:

Remember to pause Sapphire once you're happy with the camera position and rendering settings!

If you leave the Sapphire window open, the script will record its panorama from the current camera position. However, if you close Sapphire before running the script, it will lose your camera position and instead record its panorama from the centre of the map. Thus, I recommend:

DO NOT CLOSE SAPPHIRE YET!

Running the script

To run the script, select the 'Scripts→More scripts…' item in the L3DT menu. From the list of scripts, select the 'SapphirePanoramaAVI' option and press OK.

The script will then ask you for some settings, as shown below:

:tutorials:l3dt:panorama:panoramasettings.png

These settings are:

Setting What it does
PositionX The east-west position of the camera, measured from the west (left) edge of the map, in pixel units.
PositionY The north-south position of the camera, measured from the north (top) edge of the map, in pixel units.
Heading The azimuth/heading angle of the camera, measured clockwise from north, in degree units.
Altitude The height of the camera above sea-level, in metre units.
nFrames The number of frames to record in the panorama.

Once you click OK, the script will ask you for the output AVI filename:

:tutorials:l3dt:panorama:panoramafilepicker.png

After you select the filename and click OK, the script will begin rendering and recording frames. L3DT/Sapphire will be unresponsive during the movie capture, so it's a good idea to leave it alone until finished. Sit back and enjoy the show…

Video compression

The panorama script above uses the Cinepak video codec ('CVID'), which is fast but does not have as high a compression rate as more modern codecs. To compress the files further, I suggest you use the VLC Media Player to transcode the AVI to a format such as MPEG/H264 or MP4/DivX. This may decrease the file size by as much as a factor of 10.

Questions or comments?

If you have any questions or comments about this tutorial, please drop me a line in this forum thread.

 
tutorials/l3dt/panorama.txt · Last modified: 2017/08/31 05:29 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki