Homepage

Tutorials


Overview
Getting Started
-Quickstart
-Structure Dataset
-DNA rendering
-Surface Dataset
-Scalar Field Dataset: X-ray
-Scalar Field Dataset: EM
-Topograph Dataset
Advanced
-Electrostatic Potential I
-Electrostatic Potential II
-MADS
-Geometric Primitives
Scripts
-Stereo output
-Saving the viewing matrix
Animations
POVray

dino-biozentrum@unibas.ch

Animations

Generating Animated Sequences with DINO and POVray


Overview

  1. In DINO: Generate POVray output from your scene
  2. Modify the POVray input file FILE.pov to contain the desired movement depending on the clock variable
  3. Copy $HOME/.povrayrc to the local dir as povray.ini and edit it to contain the necessary animation keywords
  4. Run POVray and be prepared to wait a bit. In the end POVray will have produced a sequentially numbered file for each frame
  5. Convert all POVray images to pnm (either explicitely or within mpeg_encode)
  6. Create MPEG.param file
  7. Run mpeg_encode to create the mpg from the individual images

Example

ompF sideview Sideview of OmpF trimer in hsc rendering written out as POVray input:

dino> write ompf.pov

Added the following lines to ompf.pov, specifying a 360 degree rotating around the molecule z-axis/trimer-axis and a 180 degree rotation around the x- resp y-axis:
object {
    _Scene
        rotate <0,clock*360,0>
        rotate <clock*180,0,0>
        rotate <0,0,clock*180>
}
Copied $HOME/.povrayrc to ./povray.ini, added following lines at the end:
Removed any lines containing +D and +SP
Initial_Frame=1
Final_Frame=48
Pause_When_Done=False
POVray run, generating 48 output pics: ompf_01.png to ompf_48.png. Please refer to the POVray manual for more details on animation options.
povray +I ompf.pov
Converted .png files to .pnm format with quick script:
#/bin/csh -f
foreach png (*.png)
echo "Processing $png:r"
set pnm = {$png:r}.pnm
# convert from ImageMagick of pngtopnm will do
convert $png $pnm
#pngtopnm < $png > $pnm
end
Created ompf.param file for mpeg_encode (See mpeg_encode documentation on details concerning these parameters).
Ran mpeg_encode to produce ompf.mpg.

View the final mpeg

PATTERN IBBPBBPBBPBBPBBP
OUTPUT ompf.mpg

BASE_FILE_FORMAT PNM
INPUT_CONVERT *

GOP_SIZE 16

SLICES_PER_FRAME 1

INPUT_DIR .

INPUT
ompf_*.pnm [01-48]
END_INPUT

PIXEL           HALF
RANGE           20
PSEARCH_ALG     LOGARITHMIC
BSEARCH_ALG     CROSS2
IQSCALE         1
PQSCALE         2
BQSCALE         4
REFERENCE_FRAME DECODED

BIT_RATE  1000000
BUFFER_SIZE 327680
FRAME_RATE 24