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

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Jiang Ping
Posts: 132
Joined: Sun Aug 26, 2012 4:09 am

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

Post by Jiang Ping » Wed Jun 18, 2014 12:32 am

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

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

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

Post by jimmy d » Wed Jun 18, 2014 9:24 am

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

User avatar
Michael Sherman
Posts: 800
Joined: Fri Apr 01, 2005 6:05 pm

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

Post by Michael Sherman » Wed Jun 18, 2014 9:36 am

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

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

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

Post by jimmy d » Wed Jun 18, 2014 9:52 am

Thanks Sherm,

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

User avatar
Yu-Wei Chen
Posts: 13
Joined: Wed Jan 08, 2014 1:13 am

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

Post by Yu-Wei Chen » Wed Jan 28, 2015 2:00 am

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

User avatar
shuyang han
Posts: 15
Joined: Mon Jan 05, 2015 9:52 am

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

Post by shuyang han » Wed Jan 28, 2015 7:58 am

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.

User avatar
Michael Sherman
Posts: 800
Joined: Fri Apr 01, 2005 6:05 pm

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

Post by Michael Sherman » Wed Jan 28, 2015 12:26 pm

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 ...

User avatar
Yu-Wei Chen
Posts: 13
Joined: Wed Jan 08, 2014 1:13 am

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

Post by Yu-Wei Chen » Sun Feb 01, 2015 8:44 pm

Hello,

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

Best regards,
Yu-Wei

User avatar
Yu-Wei Chen
Posts: 13
Joined: Wed Jan 08, 2014 1:13 am

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

Post by Yu-Wei Chen » Tue Mar 03, 2015 2:04 am

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

POST REPLY