VMD

From MDWiki
Revision as of 01:30, 22 May 2015 by MCorbett (talk | contribs) (Created page with "== Rendering with VMD and Tachyon == This is a basic flowchart to get you started on rendering high quality images and movies using VMD and Tachyon. === Images === # Add th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Rendering with VMD and Tachyon

This is a basic flowchart to get you started on rendering high quality images and movies using VMD and Tachyon.

Images

  1. Add the following to your ~/.bashrc
    alias tachyon="/usr/local/lib/vmd/tachyon_LINUXAMD64"
  2. Load your structure. Make your colour and material changes.
    If using ambient occlusion (Display > Display settings > Amb. Occl) and shadows (Display > Display settings > Shadows) use AO-materials or diffuse materials.
    I've found using AO ambient at 0.70 and AO direct at 0.80, and lights 0-3 on, gives good amount of lighting.
    Try decrease AO direct first to darken/increase shading.
    I also use Display > Rendermode > GLSL.
  3. Render image using Tachyon.
    File > Render, select Tachyon from drop down list, change filename (extension is .dat), use default Render Command, click 'Start Rendering'
  4. Open new terminal and cd to dir with your image.dat
  5. Run Tachyon over image.dat to generate high quality image
    tachyon [options] image.dat -o image.tga
    Examples of options: -fullshade -res 1960 1080
    For more options see http://manpages.ubuntu.com/manpages/natty/man1/tachyon.1.html
    The image.dat file can be kept and used to re-render with higher quality if needed e.g. for a poster.

Movies

  1. Extensions > Visualisation > Movie Maker
  2. Set working directory
    Moving making requires large number of files to be genereated therefore probably best to be done locally under /data.
  3. Renderer > Tachyon
  4. Movie Settings > Trajectory
  5. Movie Settings > Delete image file off
  6. Make Movie
    Note VMD will make a movie at 24 frames per second.
  7. To generate a high qualtiy movie you have two options:
    1. Using ImageMagick:
      convert -quality 100 image*ppm movie.mpg
    2. Using MEncoder:
      First convert the .ppm or .tga files to .jpg images:
      for f in *.ppm; do convert -quality 100 $f  `basename $f .ppm`.jpg; done
      Note: change *.ppm to *.tga depending on which files you want to use.
      Then run MEncoder:
      mencoder "mf://*.jpg" -o movie.avi -ovc lavc -lavcopts vcodec=mjpeg
      Note: You can create an mp4 by swapping movie.avi for movie.mp4. Both formats have been tested and work on the Linux workstations, the Windows RDesktop and Mac.
      Using MEncoder and mp4 seems to give the best quality.