Avogadro and POV-Ray Export
I have made some more progress with Avogadro and exporting to POV-Ray. Currently the export is working quite well, but is a more manual process than it will be once I have finished all aspects of its implementation. You can export to POV-Ray, but then need to run POV-Ray yourself on the .pov file created to actually get an image. It is not too much work to add the dialog to call POV-Ray, pass it a few options and display the rendered image.
Right now I have the issue that I cannot properly translate between the OpenGL camera matrix and the POV-Ray camera system. If anyone has any experience of doing this I would love to hear about it. I have tried using the direction, up and right keywords but POV-Ray claims my coordinates are not orthogonal, and they are - Benoit double checked they were too. I am probably missing something simple. So right now I can export to POV-Ray but only get one view of the atom which does not follow the view in Avogadro - not ideal but certainly usable.


The images above show a rendering of 1d66 from the protein data bank thing (I sometimes grab interesting and large example structures from there to test Avogadro and Carsten liked this one). The first image shows it rendered with shadows and the second shows it rendered without shadows. Carsten pointed out that effects such as shadows can serve to confuse students but this can be made a configurable option as shadows also help the mind to visualise the three dimensional structure in my opinion (if used right).
There are lots of things that can be tweaked about the way the files are exported as well as the rendered image look and feel. A lot of work has actually gone into getting this working as I have made the painter independent of the paint device being used. This means that the engines can paint to any device where a painter implements the primitives in the virtual base class and I think this will allow Avogadro to scale very well as more features are added.
Comments
Display comments as Linear | Threaded
Jos van den Oever on :
I can send you the code next week. Translating the view works fine.
Marcus D. Hanwell on :
steven on :
i found a bug. when exporting file as .pov/.inc, pov-ray cannot render it. after saving file, the system ia always busys.
Florian on :
why don't you give atoms which are further away from the camera a slightly darker shade or mix their color with a bit of light blue. This should simulate athmospheric effects and might strenghten the 3D-impression of the images. This is just an idea, and I have no idea if this works out at all, but I think it might be worth a try.
Greetings,
Florian
Marcus D. Hanwell on :
Kris Zarns on :
Marcus D. Hanwell on :
kris zarns on :
Marcus D. Hanwell on :
Harro Dittmar on :
Looks like you have a lot of experience with Avogadro. I am trying to export a trajectory to povray to create an avi file of ten configurations of my molecule, but I keep getting the error message "Could not run Povray'. I am able to use Povray in a terminal, but Avogadro does not seem to find it (I am running MacOSX 10.5.