Keywords: motion, ppd
Summary
This demo shows how to put moving geometry in to a scene using the
Generic motion model.
A car is shown driving in a circle on a flat ground plate using a
.ppd
file to describe the position and orientation vs. time.
Details
This demo focuses on the application of the Generic motion model to describe the location and orientation of an object as a function of time. Although this motion model is commonly used for the imaging platform, the model can also be associated with scene geometry.
Important Files
This section highlights key files important to the simulation.
The plane geometry and motion
This motion of the car was created using a simple C++ program (see
circle.cpp
), which produced the an ASCII/Text file containing the
location and Euler angle rotations (all in Scene ENU coordinates) as
a function of time (see circle.txt
). The program simply computes
locations along the perimeter of circle with a 10 meter radius. The Z
angle for each position is computed to rotate the heading of the car
to be tangent to the circle. The generated ASCII/Text location and
orientation file is shown below:
0 10 0 0 0 0 3.14159
0.05 9.8828 1.52649 0 0 0 3.29484
0.1 9.53396 3.01721 0 0 0 3.44809
...
[lines deleted for documentation purposes]
...
1.9 8.96166 -4.4372 0 0 0 2.68185
1.95 9.53396 -3.01721 0 0 0 2.8351
2 9.8828 -1.52649 0 0 0 2.98834
This file was then imported into a PPD
file using the wizard available via Tools → Import Data in the
Generic Platform Motion Editor. The resulting file was saved to
geometry/sedan_red_subaru.ppd
.
The geometry of the car is contained in the Alias/Wavefront OBJ file
geometry/sedan_red_subaru.obj
. This object is placed in the scene via the
geometry/demo.glist
file with a single dynamic instance:
<dynamicinstance>
<motion type="generic">
<options starthidden="true" endhidden="true"/>
<filename>$SCENE_DIR/geometry/sedan_red_subaru.ppd</filename>
</motion>
</dynamicinstance>
The <options>
element is optional and can contain the starthidden
and
endhidden
elements. When set to true
these options will cause the
instance to be "hidden" (invisible, no present, etc.) at times before the
first time entry and/or after the last time entry.
Setup
Single-Frame (Still) Simulation
To run the single-frame simulation, perform the following steps:
-
Run the DIRSIG
demo.sim
file -
Load the resulting
demo-t0000-c0000.img
file in the image viewer.
Multi-Frame (video) Simulation
To run the multi-frame simulation, perform the following steps:
-
Run the DIRSIG
video.sim
file -
Load the resulting
demo-t0000-c0000.img
,demo-t0000-c0001.img
, etc. files in the image viewer.
Results
Single-Frame (Still) Simulation
The single-frame simulation produces a single image frame.

Multi-Frame (video) Simulation
The imaging instrument is setup to use the "file per capture" output schedule. As a result, the simulation produces 36 separate image files for the 36 captures. The animation below was created from these 36 frames.
