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
Is it possible to convert mot. files to avi. files?
- Jiang Ping
- Posts: 132
- Joined: Sun Aug 26, 2012 4:09 am
Re: Is it possible to convert mot. files to avi. files?
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
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
- Michael Sherman
- Posts: 807
- Joined: Fri Apr 01, 2005 6:05 pm
Re: Is it possible to convert mot. files to avi. files?
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
In the Visualizer window, click View then Save Movie.
Sherm
Re: Is it possible to convert mot. files to avi. files?
Thanks Sherm,
Jiang, you can find some info on the API visualizer here;
http://simtk-confluence.stanford.edu:80 ... Visualizer
Jiang, you can find some info on the API visualizer here;
http://simtk-confluence.stanford.edu:80 ... Visualizer
- Yu-Wei Chen
- Posts: 13
- Joined: Wed Jan 08, 2014 1:13 am
Re: Is it possible to convert mot. files to avi. files?
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
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
- shuyang han
- Posts: 15
- Joined: Mon Jan 05, 2015 9:52 am
Re: Is it possible to convert mot. files to avi. files?
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.
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.
- Michael Sherman
- Posts: 807
- Joined: Fri Apr 01, 2005 6:05 pm
Re: Is it possible to convert mot. files to avi. files?
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 ...
- Yu-Wei Chen
- Posts: 13
- Joined: Wed Jan 08, 2014 1:13 am
Re: Is it possible to convert mot. files to avi. files?
Hello,
Thank you for reply. I will try it.
Best regards,
Yu-Wei
Thank you for reply. I will try it.
Best regards,
Yu-Wei
- Yu-Wei Chen
- Posts: 13
- Joined: Wed Jan 08, 2014 1:13 am
Re: Is it possible to convert mot. files to avi. files?
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
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