Marine systems simulation
|
Add the following SimObject to your XML file:
and run FhSim. If no extension to the filename is specified, .jpg
will be added automatically by fhSim. If desired, other formats may be specified, such as .tif
or .png
.
Add the following SimObject to your XML file and run FhSim. This will create a number of image files with file extension .tif
.
Ensure that your visualization frame-rate is high enough (24fps is recommended), and that your maximum time-step is small enough (0.0045s or smaller is recommended).
Install ffmpeg from http://ffmpeg.org or ImageMagick, or use the version in the ImageMagick SDK. Join the image files by using ffmpeg, in the following form
The options of the H.264
encoder is written in a colon separated list after the tag -x264opts
. The crf
option controls quality. This is to be set to a number from 1 (best quality and largest file) and up. 20-30 will typically give small files with sufficient quality. crf
gives good control of the quality, but no control of the file size. If predictable file size is important, one may use the 'bit-rate' option instead, with the added option of two-pass encoding.
Further information on h264 encoder options: https://trac.ffmpeg.org/wiki/Encode/H.264
While h264 encoding gives the best quality for a given file size, not all players supports this codec. Most notably is the embedded player in Microsoft Powerpoint. Office can not play h264 video unless the codec is specifically installed, for instance the k-lite codec pack: http://codecguide.com/download_kl.htm
To generate a powerpoint compatible file use the following command:
Video quality is controlled with the -b:v
tag, currently set to 4096 kbps
It is also possible to add a SimObject that controls the camera movement by moving it along a spline curve defined by a set of nodes containing (time,x,y,z,roll,pitch,yaw). More than one such SimObject can be defined in an XML file, but do not let the time intervals overlap. Note that the NumNodes attribute must be updated if more nodes are added, or they will be ignored!
The Type attribute is not used yet, but can be used in the future to specify other controls, such as following targets.