Holcombe:MakingDemos

From OpenWetWare
Revision as of 23:39, 14 March 2011 by Fahed Jbarah (talk | contribs) (Added info about using Illustrator to create .swf animations)
Jump to navigationJump to search

Recent members

Alex Holcombe
• Ryo Nakayama



Technical

Skills Checklist
Python Programming
Psychopy/VisionEgg Installation Notes
R analysis,plot,stats
Statistics
Buttonbox
Buttonbox with photocell
Programming Cheat Sheets


Making animated demos

  • Using Psychopy you can save your animated display directly to a movie file, using e.g. myWin.saveMovieFrames('exported/frame.mov'). But watch out for dissolving movie files problem
  • Using Visionegg you can create a gif. Then you import the gif using Adobe Flash. You can adjust the speed manipulating the frame duration (Modify document). Finally, you export the file as a swf.
  • Patrick normally makes short movies a frame at a time in Keynote and then makes them into movies with Quicktime 7 Pro. In past years, Quicktime Pro could be used to create movies from a bunch of still frames. Quicktime Pro is no longer supported, however it is possible to still run Quicktime 7 Pro if you manage to find a Quicktime Pro-enabled computer (thanks Patrick Cavanagh for informing me of this).
  • Quicktime Player 7 (but not Quicktime Player) can still open image sequence, but not from GUI. Quicktime Player 7 can be found in Snow Leopard's Optional Installs. To use the functionality, have to do it with AppleScript/Automator. Here's a script I made: File:ImageSequenceToMovie.app.zip
  • After the movie is made, you can change its playback speed with JES Deinterlacer (Project:Custom:Movie speed)

A Better Way?

Unfortunately the above technique doesn't always play at the appropriate frame rate. Instead, once you have modified your psychopy code to save frames as images, you can use Adobe software to animate them and export as a Flash .swf file.

If you're using Adobe Imageready

  1. Place all the images in one folder
  2. Import the folder of images to Imageready (File:Import:Folder as Frames)
  3. Find the animation tools palette. If you can't see it, you can open it from (Window:Animation). If there is a tick mark next to Animation (indicating that it should be open) but you still can't see the animations palette, restore the default workspace (Window:Workspace:Default Palette Locations)
  4. Within the palette, select the delay between frames. To change the inter-frame delay for all the frames at once, select all the images in the animations palette (click-select the first image and then shift-click-select the last one), and press the downward arrow underneath any of the frames to open up a drop down menu which sets the timing for frame display.
  5. Select the loop options in the bottom left-hand corner of the Animation Palette.
  6. Finally export the file as a .swf (File:Export:Macromedia Flash SWF).

If you're using the latest Adobe Suite

If ImageReady is not on your computer, the university has a site license for a relatively recent version of the Adobe suite (which no longer includes Adobe ImageReady). To download and install (only on a University computer) the Adobe suite, which includes Adobe Illustrator, you will need a staff unikey account.

  1. Open the Adobe 'Bridge' Program and browse to the appropriate image files which psychopy created.
  2. Select them all and import them to Adobe Photoshop as layers of a file (Tools:Photoshop:Load Files into Photoshop Layers).
  3. In Photoshop, make sure the Animation Palette is open (Window:Animation). From the context menu that pops up if you left click on the button in the top right hand corner, you can select to "Make Frames From Layers". (It's best if the "New Layers Visible in All Frames" option is unchecked)

to be continued...

Animated demo playback problems

  • The recent versions of Quicktime (including Quicktime 7 and X) no longer play all my 2-frame movie demos correctly. When most of my movies are played with looping turned on, it only displays the first frame even though it's a two-frame movie. It does display both frames when it is not set to loop. So a decent demo can be created by making a extended replication of the two frames, even though that yields a large file size. That's what I had to do for the demos for my TiCS article. I have also tried viewing the two-frame movies in looped fashion in the following applications that play quicktime movies:
    • VLC: doesn't show both frames
    • Movist: doesn't show both frames
    • Quicktime Player 7:doesn't show both frames
    • SimpleMovieX: doesn't show both frames. Claims to allow export to image sequence, but this gives an error message. Stills are in fact created, but hiding in a subdirectory of /private/var/folders/ . I used a recursive directory listing "ls -R" to find them. Can also create movie from image sequence, via manual Edit->Copy within Preview.app and Edit->Paste in SimpleMovieX
    • Firefox: shows both frames, but has "double-vision". Shows old movies that quicktime shows as blank, but also with 'double vision'
    • MacVCD: shows both frames!
    • Google Chrome: shows both frames! Stutters slightly when loop renews. Doesn't display old movies like "difftlocatn22frps.mov". Also, displays .mov files but doesn't display the same movie if it ends in .qt