Skip to content

Instantly share code, notes, and snippets.

@tcmoore3
Last active April 19, 2018 17:08
Show Gist options
  • Save tcmoore3/86cbfcc7bb974edc0709351fade26572 to your computer and use it in GitHub Desktop.
Save tcmoore3/86cbfcc7bb974edc0709351fade26572 to your computer and use it in GitHub Desktop.
VMD command for rendering images with POV-Ray with a transparent background
# this command makes a POV-Ray 3 script and then renders it with povray, with the following settings:
# use the same aspect ratio as the screen (+W%w and +H%h)
# write targa file (+FT) with filename + ".tga" (-O%s.tga)
# make background transparent (+UA)
# use anti-aliasing (+A)
# make it so that you can kill povray during rendering (+X)
render POV3 vmdscene.pov povray +W%w +H%h -I%s -O%s.tga +X +A +FT +UA
# this is a nice command, but it's tedious to come here and copy it each time
# to get around this, i've written a tcl procedure that does this, and
# copied it into my vmdrc so that it's always available for me
proc povtrans {fn} {
render POV3 $fn povray +W%w +H%h -I%s -O%s.tga +X +A +FT +UA
# now open the rendered image
exec /usr/bin/open $fn.tga
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment