This box searches only this space. The box at the upper right searches the entire iPlant wiki.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Special thanks to Sriharsha for his help!

Link to youtube movie

Script (rub.sh):

Code Block
languagebash
#!/bin/bash

## Script to render a POV movie

if [ ! $# -eq 3 ]; then
    echo "usage $0 <num_frames> <pov_file> <movie_file>"
    exit
fi;

if [ ! -f $2 ]; then
    echo "POV file $2 not found!!"
    exit
fi;

starttime=$(date +%s)
makeFlowFile=movie.makeflow
playtime=$1
povfile=$2
movfile=$3
framerate=25
MAX_K=$((playtime * framerate))
FFMPEG="/N/u/dthain/ffmpeg-0.6/bin/ffmpeg"
POVRAY="/N/u/dthain/povray-3.6.1/bin/povray"

> ${makeFlowFile}

for i in $(seq 0 $((playtime-1))); do
    for j in $(seq 0 $((framerate-1))); do
        frame_num=$((i*framerate+j))
        K=$(printf "%05d" $((frame_num * 100000 / MAX_K)))
        output_file=$(printf "frame_%04d.png" $frame_num)
        echo -e "${output_file}:\n\t${POVRAY} +L$(pwd) +I${povfile} +O${output_file} +H320 +W320 +K.${K}" >> ${makeFlowFile}
    done
done

work_queue_worker -N mtjaber &> /dev/null &
work_queue_worker -N mtjaber &> /dev/null &
work_queue_worker -N mtjaber &> /dev/null &
work_queue_worker -N mtjaber &> /dev/null &
work_queue_worker -N mtjaber &> /dev/null &
echo "Generating Frames..."
makeflow -T wq -N mtjaber $makeFlowFile &> /dev/null

echo "Rendering the movie..."
${FFMPEG} -r ${framerate} -i frame_%04d.png -r ntsc ${movfile} &> /dev/null

tt=$(($(date +%s) - starttime))
"rub.sh" 49L, 1356C

Image Removed
Image Removed