Open driesvr opened 8 years ago
I'm having the same problem... Did you find a solution?
Unfortunately, I did not find a solution. I ended up using the screen recorder. Quality wasn't great, but it was useable.
I had this same issue and managed to track down your thread.
I think I found the root of the problem in the source code in /libavogadro/src/extensions/trajvideomaker.cpp
The offending line seems to be:
const QString povrayexe = "povray -D ";
In the definition of the call to run povray.
bool TrajVideoMaker::runPovRay(QString directory, QString povFileName)
{
//executable for povray. -D suppresses the popup image.
const QString povrayexe = "povray -D ";
QString povRayCommand = "cd " + directory +
" && " + povrayexe + ' ' + povFileName;
//QMessageBox::warning( NULL, QObject::tr( "Avogadro" ), povRayCommand);
int ret = system(povRayCommand.toStdString().c_str());
if (ret)
return false;
else
return true;
}
I wonder if this is just hard-coded to linux. I'm trying to use it on Windows and maybe that's why it failed.
I'm not sure if I'm motivated enough to try it, but if that line was modified as follows and the program were recompiled, I bet it would work.
const QString povrayexe = "/PATH/TO/YOUR/LOCAL/INSTALL";
So because I was curious and apparently don't care about efficient use of my time, I tried a few tweaks to try to make this work and fixed the povray errors.
Note, this is a windows problem, so this is what fixed the povray issue on windows
povray.bat
povray.bat
file somewhere in one of your path locations so that the Command prompt can find it.povray.bat
are as follows:
@START C:\Users\USER\PATHTOEXE\bin\pvengine64.exe %2 /exit
Options->Keep Single Instance
Render->On Completion->Exit POV-Ray
Once you do all that, povray will do it's job successfully and create all the png files.
Then, lucky for you, you'll get an mencoder error
because the same problem exists with mencoder, namely that the command is hardcoded to work on linux.
const QString mencoderexe = "mencoder -ovc lavc -lavcopts vcodec=mpeg4 -of avi -o ";
Moral of the story: run it on linux I guess.
We would like to make these things easier to run on Windows, but Linux and macOS tend to have things in the path, and so things like this slip through as that is where a lot of the developers work. Thanks for digging into this, I think we need to add some application globals where you can define the location of important executables like this.
@cryos I appreciate the quick response! Mostly posted to record the results of my own curiosity, but I appreciate knowing someone looked at it.
I think in this particular issue, Windows users are out of luck, since POV-ray doesn't support the same command line interface as on Linux, so even someone as motivated as I am still has to go through a bunch of annoying POV-ray settings to make anything work.
Maybe it'd be worth adding a description under the animation save dialog box just to say "Only works on Linux".
Hello @cryos , just a quick question wether this has been solved or implemented and i cannot find how to do it or is it not to be expected to work soon. Kind regards, ple
Hi
When trying to animate a trajectory I get the error: Could not run povray. I had the same error when using the export > povray functionality, but this was easily fixed by altering the path to /usr/local/bin/povray. Unfortunately, a similar option is not available for the animation menu. Thanks in advance,
Dries
System info: Avogadro 1.1.1 Povray 3.7 Mac OS X 10.11.5