Modeling - Getting Started

From FlightGear wiki
Jump to navigation Jump to search

Important Notice for Volunteers

Developing scenery and models for use with scenery is an important and very visible contribution to Flightgear. New users of Flightgear often ask how they can contribute, and this is a good place to start. Try looking at some of the following:

  • We need people to go out and take good pictures of all the buildings at their local airports, build models, and create textures (that could be different people for each task).
  • We need people to go over paper lists and airport diagrams for countries that don't publish air navigation data free online (i.e. almost everyone but the U.S.) and fill in the blanks in our navaid and airport databases.
  • We need people to collect geodata to give us more accurate roads, rivers, etc., especially outside the U.S.
  • We need people to start modelling identifiable human-made landmarks like bridges, stadiums, and major buildings. Around the San Francisco Bay area, bridges are especially important. Once you have identified some buildings or objects you would like to have (Aircraft carriers, fuel bowsers, cars, towers, ...) you will need to check out the tools for creating and placing these objects.

It would be helpful if people would model the area they are interested in. Generally contributions are going to be from Flightgear users who find scenery lacking in some area and choose to improve it. You are encouraged to research your own area for airport, navaid and scenery information, to contribute the data or dive right in to airport and scenery design.

Getting Started

To begin, you will need to create models in a 3d modeling appliction. Two popular ones are AC3D and Blender. FlightGear can display models in several formats, any format supported by PLIB is acceptable. AC3D is the most popular format for including scenery in Flightgear. Most or all of the default scenery bundled with a Flightgear release are in AC3D format.

If you do not have AC3D, Blender offers many import and export tools. See the Blender website for further information.

AC3D

Flightgear uses the ac3d model format for objects such as buildings. To create a model, you will need one of two modelling packages. Either go directly to AC3D (http://www.ac3d.org) itself, or use Blender (http://www.blender.org) and then convert via a Python script (see below). AC3D seems to be a much easier program to learn, while still being very powerful. The downside is that you have to buy a licence to get more than 14 days use.

Blender

Blender (http://www.blender.org)is more difficult to learn to use, since it is not quite as intuitive and is far more powerful. However it is GPL'd, and there are lots of tutorials to help with learning.

Placing Objects on Scenery

There are several ways of doing this. The most direct way is to simply add the required data by hand, as described in the Flightgear FAQ http://flightgear.org/Docs/FAQ.shtml, see Section 6.7.

The easiest way is to use the UFO's object placement feature (in version 9.10 or higher). When operating the UFO, left-clicking the mouse anywhere on the ground will place an object, and pressing space-up or down will cycle through the models. Coordinates of placed models can then be dumped to the terminal or written to a configuration file.

Another method is to use Flightgear Scenery Designer (fgsd), available from http://fgsd.sourceforge.net/index.html After setting the paths to your scenery data, simply load up the area where you want to place the object. Load your .ac format model, and right click on the desired spot to place your model there. Export the modifed scenery to save it, rerun Flightgear and your model should be there.

Adding shared models manually

Finding, Creating, or Using Textures

Once you have made your model building, you will want to apply some textures to it, so it looks as realistic as possible. This is possibly one of the hardest areas, as a good model with bad textures will still look bad. Since Flightgear and the scenery data are all released under the GPL, any textures that you use must also be able to be released under this licence. This will probably prevent you from just using anything you come across on the net, unless it is already under the GPL. It is quite common for people to state that their pictures or textures are free. Since Flightgear can be sold for profit, and is released on Linux distributions that are sold, check that there are no clauses stating that the item can not be sold or used for commercial use.

Generation of textured light objects in Blender

http://members.aon.at/mfranz/flightgear/blender-textured-lights.html

Import/Export of AC3D files into/from Blender

To work with AC3D files in Blender download the Python scripts for your Blender version:

Blender 2.25 to 2.27: Import: http://members.aon.at/mfranz/ac-in_2-25-B.py Export: http://members.aon.at/mfranz/ac-out_2-25-B.py

Blender 2.28 and later (but not 2.28c): Import: http://members.aon.at/mfranz/ac3d_import.py Export: http://members.aon.at/mfranz/ac3d_export.py

The scripts are to be executed from within the Blender application:

  • Start Blender.
  • Switch one of the views to "Text Editor" mode (leftmost button).
  • Load the script by clicking on the "-" button and selecting "OPEN NEW".
  • Execute the script by pressing ALT-P.
  • Select the file to import/to export to.

Blender 2.32 and later (or cvs versions after 2004/01/15): Import/Export: The scripts are now part of the Blender package You just need to tell Blender where the script directory is (info window) and can then find the importer/exporter in the file menu. No need to load the scripts explicitly. If you can't find the scripts directory after installing Blender, you can also download the scripts here for Blender 2.32: http://members.aon.at/mfranz/scripts.tar.gz)

Problems and Solutions

3D Model Rotates Around Nose Configuring Views in FlightGear