User Tools

Site Tools


sdk:scenerydev

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

sdk:scenerydev [2017/03/31 05:01] (current)
jf created
Line 1: Line 1:
 +===== Object Import into Scenery Tutorial =====
 +
 +Are you interested in importing objects into Aerofly FS 2 scenery? This is how you do it. Use this tutorial for creating your own objects as well! 
 +Let's get started.
 +
 +====Prerequisites:​====
 +
 +   * **Aerofly FS 2 Flight Simulator** -  Must be installed. ​
 +   * **AC3D 8.0.50a** -   ​Needed for 3D work and IPACS export. ​
 +   * **Aerofly SDK Package** - Download it from [[https://​www.aerofly.com/​aerofly_fs_2/​sdk/​]] ​
 +
 +In this example we will use a small farmhouse. //Download the farmhouse here:// ​ [[http://​tf3dm.com/​3d-model/​old-farm-house-91130.html]] //Be sure to give credits to the author.//
 +
 +{{:​wiki:​farmhouse.jpg?​600|}}
 +
 +We will also need the OBJ importer plugin for AC3D. //You can download the plugin here:// [[http://​www.inivis.com/​forum/​showpost.php?​p=31428&​postcount=3
 +]]
 +
 +   * Unzip obj_import.zip to any location.
 +   * Move the obj_import.p file to the appropriate directory of AC3D. **Note** The common location is: **C:​\Program Files (x86)\AC3D 8.0.50a\plugins**
 +
 +**The SDK package comes with an IPACS export plugin for AC3D.** ​
 +   * Copy the **ipacs_ac3d_to_tgi.p** file to the appropriate directory of AC3D. **Note** The common location is: **C:​\Program Files (x86)\AC3D 8.0.50a\plugins**
 +
 +{{:​wiki:​file_link.jpg?​600|}}
 +
 +====Preparing the texture files:====
 +
 +   * Unzip **2l9281qs868w-Model.zip** to any location.
 +   * Now start any graphics program and open the file **Farmhouse Texture.jpg** and save it as BMP with the file name **farmhouse_color.bmp**.
 +   * Open the file Farmhouse Texture **Bump.jpg** as well and save it as **farmhouse_bump.bmp**.
 +   * Move both BMP files to your destination directory of the SDK scenery_workshop. In my case this is: **\Documents\Aerofly FS 2\aerofly_fs_2_sdk\scenery_workshop\farmhouse**. ​
 +
 +====Use AC3D:====
 +
 +   * Start AC3D and select the function File –Import : Farmhouse OBJ.obj **Note** You may get an error message "​Can’t open mtl file ‘Farmhouse’ for reading, default material will be used." Just go on with import.
 +   * Next save file as: farmhouse.ac ​ to the folder: **\Documents\Aerofly FS 2\aerofly_fs_2_sdk\scenery_workshop\farmhouse**. ​
 +
 +{{:​playground:​tutorial_house.jpg?​600|}}
 +
 +   * Reattach the BMP texture file to the 3D model. Object – Texture – Load texture: Select the **farmhouse_color.bmp** in our destination directory **\Documents\Aerofly FS 2\aerofly_fs_2_sdk\scenery_workshop\farmhouse**
 +
 +{{:​wiki:​tutorial_house2.jpg?​400|}}
 +
 +The result is immediately visible. ​
 +
 +{{:​wiki:​tutorial_house3.jpg?​600|}}
 +
 +Control the texture fitting by selecting all, then Tools – Texture Coordinate Editor (or just F10). 
 +
 +{{:​wiki:​tutorial_house4.jpg?​400|}}
 +
 +This image shows, that the texture position is still correct. ​
 +
 +{{:​wiki:​tutorial_house5.jpg?​600|}}
 +
 +We have to calculate the size of the object. Select Vertex , click to the vertex point above the door and note the coordinate values. ​
 +
 +{{:​wiki:​tutorial_house_6.jpg?​700|}}
 +
 +Aerofly FS 2 uses metric measurements. This means, the height of the door is now 8.907 meters. We will scale it to 25% for a realistic door height. Select the whole model  and set scale to 25%. **Note:** 1 meter  = 1.09361 yards.
 +
 +{{:​wiki:​tutorial_house7.jpg?​700|}}
 +
 +Next we shift the whole model back to the ground line. 
 +
 +{{:​wiki:​tutorial_house8.jpg?​700|}}
 +
 +Save your file again, then use the export function. File – Export – Ipacs TGI files (.tgi) Enter the name  farmhouse and select again our destination directory **\Documents\Aerofly FS 2\aerofly_fs_2_sdk\scenery_workshop\farmhouse**
 +
 +{{:​wiki:​tutorial_house_export.jpg?​400|}}
 +
 +**Notes** ​
 +
 +   * Please use for your file names only small characters without blanks (IPACS suggests this to avoid problems with cross platform data transfer).
 +   * The BMP files have to be squares as in our example (If this is not the case, you have to create a square and perhaps remap the texture position). ​
 +   * The BMP file requires the addition _color.bmp for the texture file. 
 +
 +You will need 2 more files: **content_converter_config.tmc** and a **farmhouse.tsc** file. Copy them to the directory. This is the final content of our directory. ​
 +
 +{{:​wiki:​tutorial_files.jpg?​600|}}
 +
 +Before you run the final conversion, You will have to calculate the position. ​
 +
 +====Excursion to geographic coordinates====
 +
 +If you want to describe any position on earth in a unified system you may use geographic coordinates (as Aerofly FS 2 does). ​
 +We need 360 degrees to do a full circle, so the earth simplified as a bowl consists of 360 longitude lines. Longitude 0 is defined ​ through Greenwich, negative to the west  and positive to the east.  They meet again at the opposite side of the earth at -180/+180 degrees. ​
 +It is half of a circle going from north pole to south pole.  So lat +90 is the north pole, 0 is the equator line, -90 is the south pole. 
 + 
 +{{:​wiki:​tutorial_lat_long.jpg?​600|}}
 +
 +{{:​wiki:​tutorial_latlong_color.jpg?​700|}}
 +
 +**Note** - Make sure that you take the sequence into account: Both ways **Lat/Lon** and **Lon/Lat** are common. (Aerofly FS 2 uses Lon/​Lat). ​
 +
 +   * If you want to place an object at a certain position you may use this page for calculations:​ [[http://​en.mygeoposition.com/​]]
 +   ​* ​ Search for Little River, California. We get the first approach to our target position. ​
 +
 +{{:​wiki:​tutorial_geocode.jpg?​700|}}
 +
 +It displays Google map worldwide, so we can move and zoom into our desired position. Switch to Satellite, then click with the mouse to the favored point. This opens a window with the appropriate coordinates. ​
 +
 +{{:​wiki:​tutorial_geocode2.jpg?​700|}}
 +
 +Open the file **farmhouse.tsc** with a text editor. ​
 +
 +{{:​wiki:​tutorial_code3.jpg?​700|}}
 +
 +**Note** - Please compare the values with the coordinates from mygeoposition. You have to change the order of the coordinates,​ and it's restricted the input to 6 positions after decimal point. ​
 +
 +Open the file **content_converter_config.tmc** with a text editor. **Note** - You will have to enter the object only once.  ​
 +
 +{{:​wiki:​tutorial_code4.jpg?​700|}}
 +
 +Last step: Run the converter. Click file with right mouse button, select Aerofly FS 2 Content Converter ​
 +
 +{{:​wiki:​tutorial_converter2.jpg?​600|}}
 +
 +Do not interrupt the black shell window. After the process is finished, the tm.log documents the result of the conversion. Now there is a new subfolder farmhouse in the scenery places. ​
 +
 +{{:​wiki:​tutorial_files2.jpg?​500|}}
 +
 +Start aerofly FS 2, open Location menu, move the map to the north of San Francisco. ​ Select the airfield Little River 
 +
 +{{:​wiki:​little_river.jpg?​600|}}
 +
 +Select the park position in the middle of the runway. ​
 +
 +{{:​wiki:​parking.jpg?​400|}}
 +
 +The position fits very well to our selection in mygeoposition. Be careful not to burn down the farmhouse with your afterburner. ​
 +
 +{{:​wiki:​house_placement.jpg?​600|}}
 +
 +**Important notes:**
 +
 +   * Rotation of the object has yet to be done in the 3D model. IPACS is aware of this.
 +   * You can display coordinates inaerofly FS 2 by Strg – F1. 
 +   * It shows only 2 decimal places, IPACS may provide another tool for coordinate readout in future version. ​
 +   * You can fine tune the coordinates in the resulting file **farmhouse.tsc** without need for new conversion. ​
 +
 +{{:​wiki:​tutorial_files3.jpg?​400|}}
  
sdk/scenerydev.txt · Last modified: 2017/03/31 05:01 by jf