Difference between revisions of "User:Tohline/vtk/MovieMaking"

From VistrailsWiki
Jump to navigation Jump to search
(Begin new chapter to explain how to make and animation on the Mac)
 
Line 1: Line 1:
=Making a Movie=
=Making a Movie=
Here are steps that can be followed to construct an animated gif (movie) from a set of images that have been constructed using VisTrails or MicroSoft's Excel.
{{LSU_HBook_header}}
{{LSU_HBook_header}}


=Generating a Sequence of (PNG) Images=
==Generate a Sequence of (PNG) Images==


==Inside VisTrails==
===Inside VisTrails===
<!-- [[Image:LSUtest01.gif|200px|Test Animated gif]] -->
<!-- [[Image:LSU_Stable.animated.gif|74px|Test Animated gif]] -->
[[Image:pivotingBox03.gif|right|250px|Test Animated gif]]
* Use the "Explore" feature of VisTrails to sample a parameter range and thereby generate a sequences of spreadsheet images.
** For example, vary the Camera's Azimuth by 3 degrees between images.
** In order to ensure a reasonably good size/resolution for each image, we have found it beneficial to generate at most five images per "Explore" session.


* After viewing the spreadsheet results, use the spreadsheet's "Export/Separately" menu option to dump the image sequence into a new (otherwise empty) file folder. 
** If the images are laid out across the spreadsheet horizontally, by default, VisTrails will name the files:  a1.png, a2.png, a3.png, etc.
** If the images are laid out across the spreadsheet vertically, by default, VisTrails will name the files:  a1.png, b1.png, c1.png, etc.


===Inside Excel & Paintbrush===
* Construct a 2D x-y plot with all of the detail that you would want to put in a single printed journal figure.
* Take a snapshot of the figure:
** Place the mouse cursor somewhere on the boundary of the figure frame;
** CTRL-mouse-click generates a drop-down menu; selecting "Save as Picture &hellip;" copies a bitmapped image to the Mac's clipboard.
* Open "Paintbrush" and paste the image into an otherwise blank window; save the image into the desired file folder.
* Return to Excel; make the necessary changes in spreadsheet parameters to construct the next 2D x-y plot for the desired movie sequence; as before, save this new image (using a different, but preferably sequentially numbered) name into the desired folder.


==Inside Excel==
==Creating the Animation==
===Animated GIF===


=Creating the Animation=
* Via the Mac's terminal window, change directories into the folder that contains the image sequence. 
==Animated GIF==
* As necessary, rename image files in order to define the desired image sequence:
** The "convert" program (see next instruction step) expects the file names to be in a consecutively numbered sequence;
** Assuming PNG-formatted image types, we recommend using the numbering sequence:  a01.png, a02.png, a03.png, etc.
** If you want a smooth back-and-forth animation loop and you are starting with 9 images (numbered a01 thru a09), make additional copies of images such that the entire animation is: 1-2-3-4-5-6-7-8-9-8-7-6-5-4-3-2.  But the last seven images should be ''named'' a10.png, a11.png, a12.png &hellip; a16.png.
* Type one of the following two commands (2nd one preferred!):
<pre>convert -set delay 3 -colorspace GRAY -colors 16 -dispose 1 -loop 0 -scale 50% *.png Output.gif</pre>
<pre>convert -set delay 10 -colors 32 -dispose 1 -loop 0 -scale 100% Output.gif</pre>


Here is a set of steps that can be followed to construct an animated gif (movie) from a set of images that have been constructed using VisTrails.
* Use the "Explore" feature of VisTrails to sample a parameter range and thereby generate a sequences of spreadsheet images.
* After viewing the spreadsheet results, use the spreadsheet's "Export/Separately" menu option to dump the image sequence into a new (otherwise empty) file folder.  By default, VisTrails will name the files:  a1.png, a2.png, a3.png, etc.
* Via the Mac's terminal window, change directories into the folder that contains the image sequence.  Type the following command:
<pre>convert -set delay 3 -colorspace GRAY -colors 16 -dispose 1 -loop 0 -scale 50% *.png Output.gif</pre>
* Related information:
* Related information:
** I initially extracted this recommended "convert" instruction from [http://pages.uoregon.edu/noeckel/MakeMovie.html Jens N&ouml;ckel's web site].
** I initially extracted the first of these recommended "convert" instructions from [http://pages.uoregon.edu/noeckel/MakeMovie.html Jens N&ouml;ckel's web site].
** My Mac contains a manual on this "convert" instruction (man convert); it points out that, "The <b>convert</b> program is a member of the ImageMagick(1) suite of tools."
** My Mac contains a manual on this "convert" instruction (man convert); it points out that, "The <b>convert</b> program is a member of the ImageMagick(1) suite of tools."
** The Mac's "convert" manual also refers to a [http://www.imagemagick.org/script/convert.php convert website].
** The Mac's "convert" manual also refers to a [http://www.imagemagick.org/script/convert.php convert website].


* Finally, simply upload the "Output.gif" file to the VisTrails wiki site, then insert it into the desired wiki page just as you would insert a single image.
* Finally, rename the "Output.gif" file to something that better identifies the content; upload the renamed "Output.gif" file to the VisTrails wiki site; and insert it into the desired wiki page just as you would insert a single image.


<!-- [[Image:LSUtest01.gif|200px|Test Animated gif]] -->
<!-- [[Image:LSU_Stable.animated.gif|74px|Test Animated gif]] -->
[[Image:pivotingBox03.gif|250px|Test Animated gif]]


=Related Discussions=
=Related Discussions=

Revision as of 18:52, 14 September 2015

Making a Movie

Here are steps that can be followed to construct an animated gif (movie) from a set of images that have been constructed using VisTrails or MicroSoft's Excel.


Whitworth's (1981) Isothermal Free-Energy Surface
|   Tiled Menu   |   Tables of Content   |  Banner Video   |  Tohline Home Page   |

Generate a Sequence of (PNG) Images

Inside VisTrails

Test Animated gif
  • Use the "Explore" feature of VisTrails to sample a parameter range and thereby generate a sequences of spreadsheet images.
    • For example, vary the Camera's Azimuth by 3 degrees between images.
    • In order to ensure a reasonably good size/resolution for each image, we have found it beneficial to generate at most five images per "Explore" session.
  • After viewing the spreadsheet results, use the spreadsheet's "Export/Separately" menu option to dump the image sequence into a new (otherwise empty) file folder.
    • If the images are laid out across the spreadsheet horizontally, by default, VisTrails will name the files: a1.png, a2.png, a3.png, etc.
    • If the images are laid out across the spreadsheet vertically, by default, VisTrails will name the files: a1.png, b1.png, c1.png, etc.

Inside Excel & Paintbrush

  • Construct a 2D x-y plot with all of the detail that you would want to put in a single printed journal figure.
  • Take a snapshot of the figure:
    • Place the mouse cursor somewhere on the boundary of the figure frame;
    • CTRL-mouse-click generates a drop-down menu; selecting "Save as Picture …" copies a bitmapped image to the Mac's clipboard.
  • Open "Paintbrush" and paste the image into an otherwise blank window; save the image into the desired file folder.
  • Return to Excel; make the necessary changes in spreadsheet parameters to construct the next 2D x-y plot for the desired movie sequence; as before, save this new image (using a different, but preferably sequentially numbered) name into the desired folder.

Creating the Animation

Animated GIF

  • Via the Mac's terminal window, change directories into the folder that contains the image sequence.
  • As necessary, rename image files in order to define the desired image sequence:
    • The "convert" program (see next instruction step) expects the file names to be in a consecutively numbered sequence;
    • Assuming PNG-formatted image types, we recommend using the numbering sequence: a01.png, a02.png, a03.png, etc.
    • If you want a smooth back-and-forth animation loop and you are starting with 9 images (numbered a01 thru a09), make additional copies of images such that the entire animation is: 1-2-3-4-5-6-7-8-9-8-7-6-5-4-3-2. But the last seven images should be named a10.png, a11.png, a12.png … a16.png.
  • Type one of the following two commands (2nd one preferred!):
convert -set delay 3 -colorspace GRAY -colors 16 -dispose 1 -loop 0 -scale 50% *.png Output.gif
convert -set delay 10 -colors 32 -dispose 1 -loop 0 -scale 100% Output.gif
  • Related information:
    • I initially extracted the first of these recommended "convert" instructions from Jens Nöckel's web site.
    • My Mac contains a manual on this "convert" instruction (man convert); it points out that, "The convert program is a member of the ImageMagick(1) suite of tools."
    • The Mac's "convert" manual also refers to a convert website.
  • Finally, rename the "Output.gif" file to something that better identifies the content; upload the renamed "Output.gif" file to the VisTrails wiki site; and insert it into the desired wiki page just as you would insert a single image.


Related Discussions