Page 1 of 1

Is it possible to convert mot. files to avi. files?

Posted: Wed Jun 18, 2014 12:32 am
by jp123909
hi all,

I want to output the avi. files instead of the mot. files.
Is it possible to realize in Opensim API?

thank you in advance

jiang

Re: Is it possible to convert mot. files to avi. files?

Posted: Wed Jun 18, 2014 9:24 am
by jimmy
Hi Jiang,

Its not possible to produce avi files from the API. That is the function of the GUI.

The following link shows how to make movies in the GUI; http://simtk-confluence.stanford.edu:80 ... ing+Movies

Cheers,
-james

Re: Is it possible to convert mot. files to avi. files?

Posted: Wed Jun 18, 2014 9:36 am
by sherm
Not sure if this is relevant, but the API Visualizer can be used to generate movies also. Its functionality is limited compared to the GUI but sometimes it is enough. It generates a directory full of .png frames that can be assembled into a movie, using Quicktime for example.

In the Visualizer window, click View then Save Movie.

Sherm

Re: Is it possible to convert mot. files to avi. files?

Posted: Wed Jun 18, 2014 9:52 am
by jimmy
Thanks Sherm,

Jiang, you can find some info on the API visualizer here;
http://simtk-confluence.stanford.edu:80 ... Visualizer

Re: Is it possible to convert mot. files to avi. files?

Posted: Wed Jan 28, 2015 2:00 am
by fantasymew
Hello, all,

I want to use GUI API in my code to make the movie, so I find this article.

Sorry that I have no permission to visit the API visualizer website, is it still alive?

Or is there an alternative way of using the GUI function in my C++ code?

Thank you very much.

Best regards,
Yu-Wei

Re: Is it possible to convert mot. files to avi. files?

Posted: Wed Jan 28, 2015 7:58 am
by shuyanghan
Hello all,

I have the same problem as Yu-Wei, I can't open the website above. Actually, all "Documentation" website is inaccessible for me, but the "Topic" is fine. Interestingly, I could get access to "both" at home. It is really weird.

Re: Is it possible to convert mot. files to avi. files?

Posted: Wed Jan 28, 2015 12:26 pm
by sherm
That page had a viewing restriction set for some reason. I removed it but if it still doesn't work this is all that was on it:
Using the API Visualizer
Available in 3.0:

For the most basic visualization, all you need to do is call the Model method setUseVisualizer() prior to calling initSystem():

Model myModel;
myModel.setUseVisualizer(true);
// usual stuff ...
myModel.initSystem();
This should result in a graphics window popping up with a reasonable display of your model in it.

For more information, look in the OpenSim API's Doxygen documentation for the ModelVisualizer class. For advanced users, OpenSim::ModelVisualizer is based on the SimTK::Visualizer class that you can read more about in Simbody's Doxygen documentation.

More to come ...

Re: Is it possible to convert mot. files to avi. files?

Posted: Sun Feb 01, 2015 8:44 pm
by fantasymew
Hello,

Thank you for reply. I will try it. :)

Best regards,
Yu-Wei

Re: Is it possible to convert mot. files to avi. files?

Posted: Tue Mar 03, 2015 2:04 am
by fantasymew
Hello,

I has tried the Visualizer and encounter some problems.

1. I want to render the model on the Visualizer Panel.
I find this sample code (https://github.com/opensim-org/opensim- ... /README.md) that it does the simulation on the Visualizer Panel. If I comment the simulation part of the code, it shows nothing on the Panel. Could I show the model in static pose? Besides, the model in this sample code is constructed by himself, if I load the model with ".osim" file, it will throw error message "ModelVisualizer ignoring ''; only .vtp and .obj files currently suppported." That is, I cannot load the model to render on the Panel?

2. I want to save image or movie using API.
I find that some functions can be called in the code such as setShowFrameNumber() or setBackgroundColor() in Visualizer Class, but I cannot find the function for saving image or movie. There is saveImage() or saveMovie() in VisualizerGUI.cpp, but I find no entrance to call them in my C++ code.

Really appreciate your help.

Best regards,
Yu-Wei