Requirements
Vertex 3D
The SAR 3D Object is basically a Vertex 3D Object
(V3D Object), this means that you will need
Vertex 3D
(a free OpenGL modeller)
to create and edit SAR 3D Objects.
Search and Rescue
You should also have
Search and Rescue and its data files
installed.
ScnEdit
To add SAR 3D Objects to the SAR Scenery files you can
either use a text editor or
ScnEdit.
LightWave 3D (optional)
Alternately you can use
LightWave 3D
to create LWO models and then import them to a V3D
Object using
Vertex 3D.
To learn how to do this you should read the
LWO Importing HOWTO.
[
Type
Each SAR Object has a type, that specifies what type
of object it is (static, ground, aircraft, etc).
The SAR 3D Object format can be "extended" (i.e. have more
parameters) depending on its type. The
following are a list of SAR Object types and their
respective type code:
- Static
1
- Automobile
2
- Watercraft
3
- Aircraft
4
- Ground
6
- Runway
7
- Helipad
8
- Actor/Human
9
- Smoke
10
- Fire
11
- Explosion
12
- Chemical Spray
13
- Fuel Tank
14
- Premodeled
20
This document only describes the object format for objects of
type static (type code 1
). For other object types
(such as aircraft), please refer to the
appropriate documentation. Note that
such documentation for other types of SAR Objects specify
parameters that are on top of the
parameters listed here.
Layout
Since the SAR Object is really a V3D Object, it
contains V3D visual models and "other data" models. For
SAR Object of
type
static the layout should be as follows:
- Header
- "Other data" (optional/misc header)
- "Other data" (text section with parameters)
- Visual model
standard
- Visual model
standard_far
(optional)
- Visual model
standard_night
(optional)
- Visual model
shadow
(optional)
The first "other data" model in the SAR Object file is
sometimes kept for the internal use by Vertex 3D and, for this
reason, Search and Rescue ignores it.
The second "other data" model is a text section that contains
the SAR Object parameters.
Next is the first visual model, it should be named
standard
. Every SAR Object must have a
visual model named standard
.
The subsequent visual models standard_far
,
standard_night
, and shadow
are
optional.
The standard_far
visual model is displayed when
the camera is farther than the distance specified by
the parameter
range_far
(but still with in the distance
specified by range
). For this reason you should make
the standard_far
visual model simpler in
detail.
The standard_night
visual model is
displayed during night time and without
lighting (so therefore it is not shaded). This is useful for
displaying lit windows at night. This visual model can also be
displayed at dawn by specifying show_night_model_at_dawn
and displayed at dusk by specifying
show_night_model_at_dusk
.
The shadow
visual model is displayed as the
object's shadow. It should have no color or texture
primitives in it.
With other
types
of SAR Objects, additional "other data" models may need
to be placed between (just before) each visual model.
Please keep this in mind when you work with other types of SAR
Objects later on.
Parameters
As mentioned above, the parameters
listed here belong in the second "other data" model in the
SAR Object file. All parameters listed here apply to all
types
of SAR Objects.
SAR Scenery files have a separate set of parameters which
differ from the parameters listed here. There are some parameters
for SAR Scenery files that are identical to the parameters for
SAR Object files, but keep in mind that not all
parameters listed here can be used in SAR Scenery files (and
vice versa).
Legend:
- Distances are in meters
- Angles are in degrees
- Heights are in feet (unless noted otherwise)
- Colors are in coefficients [0.0 to 1.0]
- Strings can be escaped with the
\
character
(if and only if it is the sole argument)
- Flags are denoted with a
?
in the argument name
and can be a value of 0
(unset) or 1
(set)
- Intervals are in milliseconds and are denoted with a
_int
in the argument name
Parameter |
Argument(s) |
Remarks |
contact_cylendrical |
r h_min h_max |
Cylendrical contact bounds |
contact_rectangular |
x_min x_max y_min y_max z_min z_max |
Rectangular contact bounds |
contact_spherical |
r |
Spherical contact bounds |
crash_flags |
crash_other? causes_crash? support_surface?
crash_code |
crash_other? specifies that it can crash into
other objects that have causes_crash? set to
1 .
support_surface? specifies that other objects can
"land" or "walk" on it.
crash_code specifies what kind of crash would occure if
something crashed into it (used only if causes_crash? is
1 );
0 = obstruction,
1 = ground,
2 = mountain,
3 = building,
4 = aircraft.
|
description |
s |
Description of object |
light_new |
x y z r g b a radius on? type on_int off_int |
Adds a new light to the object.
type 0 is standard light,
1 is strobe
2 is spotlight (only 1 per object).
on_int and off_int only apply to strobes
(otherwise leave both as 0 )
|
name |
s |
Name of object |
range |
d |
Visible range (spherical) |
range_far |
d |
Far model visible range (spherical) |
shade_model_smooth |
*none* |
Specifies that the visual models should be displayed using
smooth shading (GL_SMOOTH).
|
show_night_model_at_dawn |
*none* |
Specifies that the standard_night visual model
should be displayed at dawn.
|
show_night_model_at_dusk |
*none* |
Specifies that the standard_night visual model
should be displayed at dusk.
|
type |
type |
Depreciated, the object's
type
is now set by the SAR Scenery file.
|
version |
major minor release |
Specifies 3 numbers that represent the minmum version of
Search and Rescue needed to display this object.
|
Using a Text Editor
The first step is to edit the SAR Scenery file,
the scenery files are located in:
scenery/
All SAR Scenery files have a .scn
extension and
are of plain text format.
Run your prefered text editor and open the
SAR Scenery file that you want to add your SAR Object in
to.
To add a SAR Object of
type
static into
the SAR Scenery file use the code:
Using ScnEdit
This method assumes that you have some experience in using ScnEdit.
The first step is to open the SAR Scenery file,
as you would with a text editor.
Position the cursor at the coordinates where you
want the new object to be placed, then select from the object
list where you want the object to be inserted in the order of
objects.
Now go to Edit->New Object, a new object will be created.
Specify the appropriate values for the new object in the
object values pane.
Specify the new SAR Object file location in the
Model File prompt, note that the Search and Rescue data directory
will be automatically prepended to it. So you only need to specify the
relative path to your SAR Object file from the Search and
Rescue data directory.
Object Ordering
The order in which the SAR Object is specified in the SAR
Scenery file is important. The SAR Objects are drawing in
serial order, so if you use the no_depth_test
parameter then you need to arrange the objects in proper
order. In general the objects should appear in a SAR
Scenery as follows:
- Ground objects acting as "flat" landmarks
- Ground objects acting as mountains (heightfields)
- Runways, roads, railroads, rivers, etc
- Helipads (not on buildings)
- Static objects, buildings, obstructions
- Helipads (on top of buildings)
[