Dynamic Scenes in Vistapro using MTPVistaMorph
by Monroe Poteet: http://users.adelphia.net/~poteet
MTPVistaMorph is a stand-alone application which reads in a Vistapro script file and writes out a modified version of the script. It uses the Vistapro Scripting Language to allow frame-by-frame modification of many of Vistapros rendering attributes. A simple example is changing the Sun Declination from 20 degrees to 50 degrees over the span of an animation to simulate a sunrise.
In prior versions of Vistapro, a utility called VistaMorph was shipped with the kit which performed similar functions to the utility described here. Apparently, however, this utility didnt get much use or support, because it was retired from the product. For advanced users of Vistapro, MTPVistaMorph provides a whole new toolkit for animation and creativity.
This document does not describe the individual Vistapro scripting language parameters. For information about each available option, see Appendix B in the Vistapro Online Help File.
Basic Operation of MTPVistaMorph
The basic operation of MTPVistaMorph is as follows:
- Run Vistapro, create a scene with your desired landscape and so forth
- Create a Path in Vistapro for the camera motion
- Export the Path as an script file with the .SCR extension
- Run the MTPVistaMorph application
- Select the SCR script file exported from Vistapro
- Add one or more morph parameters, changing the values of VP rendering attributes over time.
- Write out the modified SCR file. The default file name is the original SCR file name with New prepended to it.
- Back in VP, on the Path screen, select Create New Path to allow importing the modified script
- On the Animation page, render the animation with the modified script using the Create TGA Sequence or other image sequence command.
IMPORTANT NOTE:
It is important to note that currently VP only uses the Script commands from the modified script when creating a TGA, JPG or other animation sequence. The RENDER button for a frame-by-frame view of the modified parameters does not show the modified parameters. So, to view incremental changes to the morphed parameters, you must render a sequence.
In addition, MTPVistaMorph should only be used on Scripts exported from Vistapro, not on the modified script written by MTPVistaMorph. Currently, MTPVistaMorph will not read its own output as an input script.
How MTPVistaMorph Works
MTPVistaMorph reads an existing script file and writes out a modified script file. The SCR file exported by Vistapro contains only the Camera motion for each frame in the sequence, and MTPVistaMorph inserts script lines between each subsequent frame.
For example, if a script is 300 frames long, and a SunDeclination parameter is added to move the sun from 20 degrees declination to 50 degrees declination, MTPVistaMorph will insert a SunDeclinination script command between each camera motion frame, moving the sun the appropriate ammount per frame (1/10th degree per frame, in this example). For Color Range parameters, the Red, Green, Blue values of the colors are moved in an equivalent manner between the specified range values.
Morph Parameter Types
There are four basic types of Vistapro parameters which can be morphed (i.e. changed) over time in a script with MTPVistaMorph. These types are:
- Value Range
- Color Range
- Simple Commands
- File Sequences
Value Range Type
Most Vistapro parameters are numeric, which means these are controlled with a Value Range morph parameter. For example, the MeanTreeDensity parameter determines how dense the trees generated by VP are placed, and modifying this parameter over time can cause a forest to develop, as if time-lapsed.
To add a ValueRange type in VistaMorpy, either double-click the Value Range tree heading, or press the Add Value Range button. You will be presented with a dialog box to select the parameter to add. As mentioned previously, this document will not describe the individual parameters available; please see the VP Appendix for a description of each available scripting command.
The values specified for a Value Range parameter are:
- Starting Frame number
- Ending Frame number
- Starting Numeric value
- Ending Numeric value
The value of the parameter is moved from the Starting Value to the Ending Value in a linear manner. No curve or spline is provided.
Note that more than one Value Range parameter can be added for any particular VP command. For example, if you want the SeaLevel to rise to a particular level, then fall again, you would add to separate SeaLevel Value Range parameters. The first would increase the SeaLevel from frame 0 to 150 (for example), and the second would decrease the SeaLevel from frames 150 to 300. It is up to you to ensure that any overlapping of parameter ranges is avoided.
Color Range Type
A Color Range moves a parameter from one R,G,B, (Red Green Blue) value to another in the give frame range. For example, moving from RGB(150,0,0) to RGB(0,0,150) would cause the given parameter to change from pure Red to pure Blue over the given frame range.
Simple Commands
Simple commands require no parameters. They are inserted between each frame, or at a specified frame interval.
An example of a Simple command is Smooth. If you want the terrain smoothed every other frame, insert a Smooth command and specify 2 as the frame interval.
File Sequence Commands
There are two file-sequence commands: ForegroundFile and BackgroundFile. Vistapro provides the ability to load a foreground or background image which will be blended with the rendered image, but it doesnt provide the ability to animate these files. The file-sequences supported by MTPVistaMorph allow a trailing frame number to be specified on the file name, allowing sequences generated by VP or other packages to be used as foreground or background sequences.
For example, if youve rendered a sequence in VP from a long distance (e.g. mountains in the far distance), the file names are usually XXXnnnnn.TGA, where nnnnn is the frame number. By specifying a file-sequence parameter in MTPVistaMorph, you can load these images into the background as each frame in the foreground progresses.
|