r2 - 27 Jul 2006 - 19:10:56 - TimPetersonYou are here: TWiki >  GRAPEcluster Web  >  Documentation > MovieFileFormat

Movie file format

Global options

At the topmost level of a movie description file are global options, stream definition blocks, and time blocks.

Options

length <double>
Length of movie (in seconds)
fps <double>
Framerate of movie (in frames per second)

Example options

length 12.5
fps 30

Stream blocks

Streams are defined by the word stream followed by an identifier (id) naming the stream, followed by a curly-enclosed block of stream options.

Stream statements

name <string>
Sets a descriptive name for the stream
type <type>
Sets the type of data the stream holds (type = string, double, vector)
interpolator <type> [ <parameter block> ]
Sets the type of interpolator used by the stream (type = Constant, Linear, Command, TCB)
watcher <type> [ <parameter block> ]
Adds a watcher to the stream (type = Command, SimTime?, CameraLocation?, CameraLook?)

Type and interpolator are required. Name defaults to the same as the id. Any number of watchers are allowed.

Parameter block

{ <name> <value> [ <name> <value> ... ] }

Valid parameters and values are determined by the receiver of the parameters.

Example stream

stream location {
   name "Camera location"
   type vector
   interpolator TCB {
      tension -0.5
   }
   watcher CameraLocation {
      camera 1
   }
}

Time blocks

Time blocks specify a group of keyframes that all occur at the same time in the movie. A time block is defined by the word time followed by the floating-point time for the block, followed by a curly-enclosed block of keyframe specifiers. A keyframe specifier is a stream id followed by the value for that stream to take on at that time. The value is optionally followed by a curly-enclosed parameter block, which will be passed to the interpolator as part of the keyframe.

Example time block

time 10 {
   command "remove cube"
   command "remove axis"
    time 0
    location (2, -0.8, 1.2) {
       bias -1
       continuity_out -1
    }
}

Syntax

General notes on syntax:

  • Comment types are #, //, and /* */
  • All whitespace is equal and serves only to delimit tokens (and is therefore not shown below)
  • Tokens consist of punctuation, alphanumeric words, floating-point values, and quoted strings.

BNFish syntax:

<movie>                 ::= <movie-item>*
<movie-item>            ::= <global-option> | <stream> | <time>

<global-option>         ::= <length-option> | <fps-option>
<length-option>         ::= "length" <double>
<fps-option>            ::= "fps" <double>

<stream>                ::= "stream" <identifier> <stream-block>
<stream-block>          ::= "{" <stream-item>* "}"
<stream-item>           ::= <stream-name>
                          | <stream-type>
                          | <stream-interpolator>
                          | <stream-watcher>
<stream-name>           ::= "name" <string>
<stream-type>           ::= "type" <value-type>
<value-type>            ::= "string" | "double" | "vector"

<stream-interpolator>   ::= "interpolator" <interpolator-type>
                            [ <parameter-block> ]
<interpolator-type>     ::= "Constant" | "Linear" | "Command" | "TCB"

<stream-watcher>        ::= "watcher" <watcher-type> [ <parameter-block> ]
<watcher-type>          ::= "Print" | "Command" | "SimTime"
                          | "CameraLocation" | "CameraLook"

<time>                  ::= "time" <double> <time-block>
<time-block>            ::= "{" <time-item>* "}"
<time-item>             ::= <identifier> <value> [ <parameter-block> ]

<parameter-block>       ::= "{" <param-block-item> "}"
<param-block-item>      ::= <identifier> <value>

<value>                 ::= <string> | <double> | <vector>
<vector>                ::= "(" <double> "," <double> "," <double> ")"

identifier: bare sequence of non-whitespace characters
string: double-quoted sequence of characters

-- TimPeterson - 13 Jun 2006

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
General Information
Technology
  • Resources

Documentation
Repository
Related Projects
  • GUI Development
  • MovieMaker?
  • GUI
  • 3D Input Devices
  • Fly Through Path

Related Sites

 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback