BeginRecordingSurfaceWindowMovie Method


Description

Starts recording every updated view in the Surface Module window and saves it to a movie file.

Syntax

objDocument.BeginRecordingSurfaceWindowMovie(strMovieFileName)

Remarks

Valid only if objDocument is of type VMR and if the Surface Module window for this VMR project has been created. The method must be completed by a matching call to EndRecordingSurfaceWindowMovie, otherwise the movie file can not be used. The "grabbed" frames are stored in a movie file with the provided filename which should have the extension ".avi" since it is stored in Microsoft's format. Note, that the frames are stored uncompressed, i.e. each pixel of each frame is stored using 3 bytes (RGB values). This means that movie files become very large. Use the NewMainWindowSize method to reduce the size of the main window and thus also the size of the Surface Module window. You might use other software to compress the saved movie further, i.e. by converting the uncompressed AVI into GIF animation files.
Any command that updates the Surface Module window will result in grabbing the windows content as a frame which is saved in the file. In most cases this will be triggered by the RefreshSurfaceWindow method.

Example

' VBScript
BrainVoyager.
NewMainWindowSize 400, 350
doc.LoadMesh "cg_head.srf"

doc.BeginRecordingSurfaceWindowMovie "demo.avi"

For
i = 0 To 360 Step 5
  doc.SetViewpointAngles 180, i, 0

  doc.RefreshSurfaceWindow

Next

doc.EndRecordingSurfaceWindowMovie

// JScript
BrainVoyager.
NewMainWindowSize(400, 350);
doc.
LoadMesh("cg_head.srf");
doc.BeginRecordingSurfaceWindowMovie("demo.avi");

for
(i = 0; i<=360; i += 5)

{

  doc.SetViewpointAngles(180, i, 0);

  doc.RefreshSurfaceWindow();

}

doc.EndRecordingSurfaceWindowMovie();

# PerlScript
$BrainVoyager->
NewMainWindowSize(400, 350);
$doc->
LoadMesh("cg_head.srf");
$doc->BeginRecordingSurfaceWindowMovie("demo.avi");

for
($i = 0; $i<=360; $i += 5)

{

  $doc->SetViewpointAngles(180, i, 0);

  $doc->RefreshSurfaceWindow();

}

$doc->EndRecordingSurfaceWindowMovie();