Sunday, October 24, 2010

How to create animation with python and PyODE package.


Falling Boxes in HD.  PyODE animation. from Krzysztof J Pakula on Vimeo.


Instruction for Linux Ubuntu users.
1. You already should have version of Python installed by default on your machine. 
2. Install packages PyODE and cgkit 
    > sudo apt-get install  python-pyode 
    > sudo apt-get install  python-cgkit 
3. Download python script pyode_ex_hd.py .  
4. By executing this python script you will create pyode_ex_hd.rib file 
    > python pyode_ex_hd.py
5. Install Pixie renderman program. ( If you have problem finding renderman install from this deb file) 
6. Download and compile surface shader file  occsurf2.sl    
    > sdrc occsurf2.sl 
7. Render the rib file   
    > rndr pyode_ex_hd.rib  
    Rendering the rib file will create series of picture files in pyode_ex_hd.001.tif , ..., pyode_ex_hd.300.tif
    It will take few hours depending on the speed of your computer.
8. Install ImageMagick on your Ubuntu system
    > sudo apt-get install imagemagick
9. Using ImageMagick Convert all tif files to png format.
    > convert pyode_ex_hd.001.tif  pyode_ex_hd.001.png
       ........
    > convert pyode_ex_hd.300.tif  pyode_ex_hd.300.png     
10. Using VirtualDubMod program create single uncompressed avi file from tif files.
    This step shall be done on Windows machine. 
    You must use vcf configuration file   pyode_ex_hd.vcf 
    >VirtualDubMod   /spyode_ex_hd.vcd  /x
11. Compress avi file to mp4 format using H.264 encoder.   

1 comment:

  1. Why converting the tif files to png in Step 9 when you create an avi from tif files?

    ReplyDelete

Followers

About Me