2005 AGI Users’ Conference 1 INTRO TO STK MODELS For STK/6.0, STK/Professional (STK/PRO), and STK/Advanced Visualization Option (STK/Advanced VO) - Estimated Completion Time: 40 min What You Will Do In this exercise you will learn how to: Select the desired model file for use in a scenario Review the .mdl file in a text editor Use the AGI Modeler tool to help identify model components Scale the size of a model Use attach points and steerable elements Convert a model from a different format to STK .mdl format Review and download updated model files from AGI’s website. Model Files You may enhance your STK graphical output by using an appropriate model of the spacecraft, missile, vehicle, or ground station in your scenario. STK offers nearly 500 detailed 3-D models from which the user can choose. In this class you will create a very simple STK scenario and then manipulate the model used in this scenario. Create a Simple STK Scenario We will open a new STK scenario and populate it with the Hubble space telescope. 1. Open a new STK scenario ( ). We will just use the default time period. 2005 AGI Users’ Conference 2 2. Use the Satellite Database to insert the Hubble space telescope (Insert -> Satellite from Database, search on Common Name of Hubble). 3. In the 3D Graphics Window zoom in until the Hubble’s name and marker are clear. Holding down the Shift key, double-click on the Hubble’s marker. This should put Hubble at the center of the 3D Graphics window. You should observe that the model in the 3D Graphics window does look like the Hubble Space Telescope. When a satellite is imported from the satellite database, the appropriate model (when available) is automatically imported into the scenario. Note If the Orbit Wizard is used to create a satellite, a generic satellite model will be used as the default model. The desired model can then be assigned by accessing the 3D Graphics > Model page of the satellite’s properties. Overview of a .mdl file The 3D Hubble model that you see in the 3D graphics file is an STK proprietary file format, a .mdl file. This file format is a text file and a text editor should be used to modify it. Open up the Hubble model file (hubble.mdl) in a text editor and look at the following sections. 1. Using Windows Explorer, go to the following directory: C:\Program Files\AGI\STK 6.0\STKData\VO\Models\Space\Civil. 2. Double click on hubble.txt You will notice several sections in the .mdl file. Header – Information about who built the model, when it was built, and some information about the internal structure of the model, for instance textures, articulations, and dimensions. Components – Components are the pieces of the model. In components you would see Articulations – movable model parts Attach points – a point used to attach a sensor beam Pointable elements – model part that can track a scenario object Root – The master component which refers to all other components in the file. Articulations can also be found here. Note The units in a model file are specified in meters. Models can be built in any unit, but the Root component in the file assumes they are in meters. The different components of the Hubble model are comprised of numerous polygons. The triple columns of numbers that you see in the text editor represent the x. y and z components of each point of the model. Once defined, these points are later 2005 AGI Users’ Conference 3 referenced (by row number, starting at 0) to build polygons. For example, an entry of 3 1 6 0 prefaced by the header Polys would indicate that a 3-point polygon is being created using points 1, 6 and 0 from the previous listing of points. While a model can be created directly in a text editor, this is quite complicated and is rarely the approach used. Most model files are converted from different model file formats. This will be discussed in a later section. Modeler (MDE) Modeler is a stand alone tool that comes with STK and can be started from the Windows Start menu under Program Files-> Satellite Tool Kit-> Modeler. You might use Modeler to accomplish the following: View a model Test an articulation Identify model components Bring up Modeler and perform the following steps to identify model components: 1. Open the Hubble model (hubble.mdl) from the C:\Program Files\AGI\STK 6.0\STKData\VO\Models\Space\Civil directory. 2. Zoom in closer to the model using VO-like mouse movements. 3. Ctrl-right click on a side panel of the model. You should see it flash red and the message window will display the component name, number of places it appears in the file, and number of triangles that compose it. 4. Refer back to the .mdl file to find the references to this component. Try selecting some of the other components on the Hubble model and look for their references in the .mdl file. Close Modeler when finished. Model Scale If you observe the model of the Hubble in the 3D Graphics Window you will notice that its size is quite exaggerated. The size of models in STK is scalable. 1. Select Hubble in the Object Browser. 2. Open Hubble’s Properties Browser ( ). 3. Go to the 3D Graphics -> Model page. 4. In the Model section adjust the Scale of the model. Click Apply and observe the change in size in the 3D Graphics Window. You may have to zoom significantly in or out to see the new model. 5. When finished reset the scale to 0 and click OK. We will need to model scale to be set to 0 for some future calculations to be correct. 2005 AGI Users’ Conference Note 4 The model scale is logarithmic. If the size is increased from 1 to 2, it does not double but rather increases by a factor of 10. If actual size is desired, the scale should be set to zero. Attach Points Some model files offer attach points. These provide locations on the model to which a sensor can be attached. (Smoke trails can also be attached to attach points. This requires the setting on an environment variable. For details on this topic, review the FAQ section of AGI’s website at www.agi.com under Support/ Product Support/ FAQ. Specifically, FAQs 11204 and 10462 address this subject.) When placed on an attach point, the sensor is moved both visually and mathematically, assuming the appropriate properties are adjusted. If the following steps are accomplished, the calculations to the sensor no longer are based from the center of the model, but rather from the location of the sensor on the attach point. Return to the Hubble .mdl file already open in your text editor. Search on the term AttachPoints and observe that Hubble contains two attach points. Each corresponds to one of the two high gain antennas on the Hubble model. We will now attach a sensor to one of these attach points. 1. Highlight Hubble in the Object Browser. 2. From the Object Catalog ( ), insert a Sensor ( ). Observe in the 3D Graphics window that this sensor emanates from the center of Hubble. We will move it to an attach point. 3. Open the Properties Browser ( ) of the Sensor. 4. Go to the 3D Graphics -> Vertex Offset page. Uncheck Inherit from Parent Object. 5. Check Use Attach Point and select AP12_HGA1-000000. Click Apply. 6. Go to the sensor’s Basic -> Location page. Select 3D Model as the Location Type. This will mathematically move the sensor to the attach point specified in the Vertex Offset section. (It is this step that requires a 0 scale size. If the scale is other than 0, the offset will be incorrectly computed.) 7. Click OK to dismiss the sensor’s properties. Now reset the animation ( ) and observe the Hubble in the 3D Graphics Window. The sensor is no longer attached to the center of Hubble. Instead, the sensor is attached to one of Hubble’s high gain antennas. However, our model does not look 2005 AGI Users’ Conference 5 quite right. The boresight of the high gain antenna is pointing up, yet the sensor is pointing down. This will be solved with articulations. We will address articulations in the next section, and we will correct this inconsistency. Pointable Elements Some models contain pointable elements. These are pieces of the models (often solar panels or antennas) which may be steered so that they are always pointing at a particular object. Return to the hubble.mdl file in the text editor. Search on the term Pointing. The first occurrence of this term will reveal a list of model components which can be pointed. In this case the entire Hubble telescope, both high gain antennas and both solar arrays may be pointed toward a target. Subsequent occurrences of this term will give specifics for each pointable element, indicating about which axis it may be rotated. We will now point Hubble’s solar arrays toward the sun. 1. Highlight Hubble in the Object Browser. 2. Open Hubble’s Properties Browser ( ). 3. Go to the 3D Graphics -> Model Pointing page. 4. From the list of Pointable Elements select Port_Solar_Panel-000000 and then select Sun from the list of Available Targets. 5. Do the same for the Starb_Solar_Panel-000000. 6. Go to the 3D Graphics -> Vector page. 7. Turn on Hubble’s Sun Vector by checking its Show box. This will provide a reference for us so we can determine if the solar panels are, in fact, pointing toward the sun. 8. Click OK to dismiss Hubble’s properties. Return to the 3D Graphics Window. Reset the animation ( ) and observe the orientation of the solar panels as you animate. Are they pointing toward the sun? Since the solar arrays may only rotate about one axis, they will not be perfectly aligned with the sun vector. Still, you should clearly see the arrays rotating so that they obtain as much sun exposure as possible. Specifics on how to add a new pointable element to an existing model file can be found in the FAQ section of AGI’s website. This is available at www.agi.com under Support/ Product Support/ FAQ. Specifically, FAQ 11223 addresses this topic. 2005 AGI Users’ Conference 6 Model building tools The Hubble model that we have been using is an example of a model file that comes with the STK installation. However, sometimes a user must build a model file for their particular project because an existing file does not already exist. There are many excellent model building tools on the market. Here are a few of the tools our customers have said they use. LightWave 3-D Studio Max Alias/WaveFront Maya CAD packages (AutoCAD Mechanical Desktop) Power Animator Softimage Houdini Solidworks Rhino This is just a subset of the available tools. Regardless of the tool used to build a model file, the file must first be converted to LightWave LWO format in order to ultimately be converted into STK’s proprietary .mdl format. Converting Models The primary tool that AGI currently uses to convert other model file formats to .mdl is LwConvert. This can be downloaded from AGI’s website at www.agi.com under Support/ Downloads / Software Downloads. LwConvert Converts a LightWave file to an STK model file. Takes an .lwo file as input and saves an .mdl file as output. Model type needs to be specified to apply the correct axis rotation. Extensive help in the Hints button. If you use any of the tools listed above (aside from LightWave), you will want to convert your model to the LightWave format so that it can then be converted to an .mdl format using AGI’s LightWave Converter. Here are some tools that can convert other formats to the LightWave format: Viewpoint Interchange by Viewpoint Digital http://www.viewpoint.com PolyTrans V2 by Okino Computer Graphics http://www.okino.com/conv/conv.ht 2005 AGI Users’ Conference 7 The AGI website FAQ section offers detailed instruction on how to convert model files. This FAQ can be found at www.agi.com under Support/ Product Support/ FAQ. Specifically, FAQs 11134, 10456 and 10453 provide details on converting models and working with model formats other than .mdl. Obtaining Updated Models AGI continually updates and improves the existing collection of model files available to the user community. These updates occur on a daily basis. STK users may access the latest models via the AGI website. These can be accessed at www.agi.om under Support/ Downloads/ Models, Videos and Animations.