yade-users team mailing list archive
Mailing list archive
Re: Video recording in preprocessor files
Emanuele Catalano <catalano@xxxxxxxxxxx>
Fri, 26 Aug 2011 10:43:11 +0200
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:126.96.36.199) Gecko/20110805 Thunderbird/3.1.12
Hello Viet Tran,
if you actually have an .xml file with your simulation, the best thing
to do is to use python scripting, to load the simulation and add what
you need to make videos.
For example, if you launch ./YADE-0.50.1 from the terminal, you can type
from the Yade prompt:
Yade : O.load('yoursimulation.xml') #to load your simulation
Yade : O.engines = O.engines +
#to add the snapshot engine. This will save snapshots in .png format
every 'iterPeriod' iterations (100 in this case).
Then push F10 to open the Controller and the 3DView, push the Play
button and run as many iterations you need.
Stop the simulation when it is ok and again in the yade prompt type:
Yade : utils.makeVideo('./*.png', 'video.avi',
renameNotOverwrite=True, fps=6, kbps=6000, bps=None) #to create the
video from the .png files
In general I recommend you to use python scripting to generate your
simulations as long as you don't need to personalize the mechanics of
your simulation with your own contact law for example!
On 08/26/2011 06:29 AM, Viet Tran wrote:
I know it may not be a good question, but can someone help me with
video recording? I'm using YADE-0.50.1 and I have written my own codes
with a Preprocessor file and run the simulation by the created .xml
file. I learn that we can create the videos of our simulations in
Python, but I think we can also do it by writting some lines of code
in the preprocessor file (ex: in the Triaxial test.cpp), my problem is
that I do not know how to do it :((
I'm very appreciated if you can give me some guidance.
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp
Doctorant - Laboratoire Sol, Solides, Structures et Risques
Institut polytechnique de Grenoble
Tel : 04 56 52 86 49