Keywords:
Summary
This demo shows how a component (aka "part" or "group") within a facet object can be assigned motion. In this case, the missle on a simple mobile missle launcher is commanded to transition from an erect position to a lowered position. Additionally, this demo shows how the sub-object properties feature in the GLIST can be used to override a material based on the part (group) the facets belong to.
Related Materials
The following demos, manuals and tutorials can provide additional information about the topics at the focus of this demo:
-
Related Demos
-
The SubObjectMotion2 demo.
-
-
Related Manuals
-
Related Tutorials
-
N/A
-
Details
The key aspect of this demo is associating motion with a component of a single object without the need to break the object into multiple objects to associate the motion through the traditional instance assigned motion mechanism. Motion can be associated with any "part" of the object as long as it is a "group" entity in the input OBJ filename.
In addition to showing how to associate motion with a part, this demo shows how to change the materials assigned to a part and how a part can be disabled.
Important Files
All of the important details are contained in the GLIST file that imports
the SS1 vehicle (see geometry/demo.glist
) and positions it within the
scene. The relevant <object>
section is included below:
<object tags="ss1">
<basegeometry>
<obj>
<filename>ss1.obj</filename>
<properties>
<part name="CRADLE" enabled="true">
<origin><x>0</x><y>-5.75</y><z>2.0</z></origin>
<motion type="delta">
<movement>$SCENE_DIR/geometry/lower.mov</movement>
</motion>
</part>
<part name="MISSLE" enabled="true">
<matid>missile</matid>
<origin><x>0</x><y>-5.75</y><z>2.0</z></origin>
<motion type="delta">
<movement>$SCENE_DIR/geometry/lower.mov</movement>
</motion>
</part>
</properties>
</obj>
</basegeometry>
<staticinstance>
<translation>
<point><x>1</x><y>-3</y><z>0</z></point>
</translation>
<rotation rotationorder="xyz" units="degrees">
<cartesiantriple><x>0</x><y>0</y><z>240</z></cartesiantriple>
</rotation>
</staticinstance>
</object>
The important part of the configuration is the optional <properties>
description. In this example, we name two "parts" to be modified in the
original ss1.obj
file. The part names correspond to groups in the
OBJ file (groups are started and named using lines that begin with g
,
for example g CRADLE
). The modifications to these parts are described
below:
-
The
CRADLE
part is the structure that holds the missle body. In the real world, this is what holds the missle and lifts it up.-
The
<origin>
for this part has been explicitly defined so the motion knows about what location to perform rotations. This location is at the base of the cradle where it pivots, near the rear of the vehicle (hence, the negative Y value). -
The
<motion>
for this part is defined by the DeltaMotion model via thelower.mov
file.
-
-
The
MISSLE
part is the rocket body itself (laying in the cradle). It uses the same<origin>
and<motion>
descriptions because we want it to rotate about the same point and at the rate.-
The
<matid>missile</matid>
changes the material the missle to ID/Labelmissile
, which is a brighter gray.
-
Note
|
The enabled attribute for any <part> can be set to false to
disable a given part (make it disappear).
|
The lower.mov
file is shown below and it contains a single MOVE
entry
which makes the X axis rotation -0.6 radians after 1 second:
DIRSIG_MOV = 1.0 INIT_POSITION { TRANSLATION = 0.0, 0.0, 0.0 SCALE = 1.0, 1.0, 1.0 ROTATION = 0.0, 0.0, 0.0 } MOVES { # dSeconds dTX dTY dTZ dSX dSY dSZ dRX dRY dRZ MOVE = 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.6, 0.0, 0.0 }
The front of the vehicle is pointed down the +Y axis. The missile actually starts in an erected position, so the motion we want to lower it is a -X rotation (all DIRSIG rotations are right handed).
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. Note that the
missle body is the lighter shade of gray (like the background) due to the
material reassignment in the <part>
properties.

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