RSD
marit's home
projects
Generating a Satellite Swath in MAYA
Feb 2003
Contents
Summary
A MAYA mel script is used to make a satellite swath.
Overview
I set up this method for generating satellite swaths when working on
an animation which showed the proposed GPM constellation.
The animation had to show 8 satellites and the swaths they scanned. I experimented
with using PaintFX and generating birail surfaces to make the swaths. Both
techniques are based on idea of generating a nurbs curve from points on
intersection of a satellite beam and the earth over some time period.
I describe the birail surface method below. The following files include an
example scene and the mel scripts used to set up a swath.
Starting setup
The actual GPM starting setup had 8 satellites and the sun orbiting
the earth. I've simplified that here and the starting MAYA scene
has just one satellite with one instrument 'beam' intersecting
the earth. The satellite is set up to orbit the earth
using a series of nulls and expressions that control the orbit precession,
inclination, period and altitude, but it doesn't really matter how
the satellite motion is controlled.
Generating an orbit swath with birail
The mel script generates the swath, so you only have to track down
the appropriate information to put in the 'run' script.
- The script needs to know the uv coordinates of the edges of
the beam where it interesects the earth. Right click on the beam
and select Surface Point from the marking
menu, then left click on the beam and drag at the left edge
at the closest point to the earth. The history area of the script
editor will show the uv values for that point. Left click at the right
edge also to get the uv values for that point. In the sample scene,
the u coordinate varies along the length of the beam, so the right and
left edge u values are similar and we can use just one of the values or
an average between them. The v values vary across the beam. Since we
want the swath to cover the full width of the beam, use the the values
from 'min mav range v' of the
beam_coneShape in the attribute editor.
- Edit the run_make_swath.mel
script, set the variables to useful
values. Some values for this scene are:
float $start_time = 670.0;
float $stop_time = 900.0;
float $time_step = 5.0;
float $left_u = 0.225;
float $right_u = 0.225;
float $left_v = 0.0;
float $right_v = 8.0;
string $beam_name = "beam_coneShape";
string $earth_name = "earth_sphereShape";
The first two variables set the starting and ending time of the swath.
The timestep variable sets the number of points that the two rail
curves will be created with. In this case the number of points will be
(900 - 670) / 5 + 1 = 47.
- Run the run_make_swath.mel script
- The surface should now be created; since it's essentially the
same size as the earth sphere, only parts of it may be visible. I've
been rendering the swath in a separate render layer so this isn't
a problem for me; if it is for you, generate a swath a little higher
off the earth (e.g. in the example scene set the
$left_u and
$right_u to 0.23).
- Add a texture and key coverage, transparency etc to make the swath
become visible as the satellite passes over.
Generating an orbit swath with paintFx
I think the paintFx method was slower so I'm not going to
describe it in detail. It involved using similar
mel programs to the ones for the birail swath, but generating only
one nurbs curve down the center of the swath. A paint brush is attached
to the curve and the attributes set to make the paint appear flat.
Results
This is an image generated with the paintFX method, it links to a
2MB quicktime movie that shows the swath being applied.