Modeling - Getting Started
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.
Generally one can start with a blueprint using their favorite imaging software like Gimp, Photoshop, or Paint shop pro then separate various views (front, back, etc...) into greyscale jpg files. Then import them as a background for easy modelling in your favorite 3D modelling software program.
To begin, you will need to create models in a 3d modeling appliction. Three popular ones are AC3D, Blender and SketchUp. 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.
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 itself, or use Blender 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 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.
See Modeling - SketchUp for the main article about this subject.
SketchUp (http://sketchup.google.com) is the easiest to use of these three programs. But the results are very nice and professional. I recommend SketchUp for users who are not really good at difficult computer programs.
See Modeling - Wings 3D for the main article about this subject.
Wings 3D (http://www.wings3d.com/) is another 3D modeling program, and is free open source software.
Placing Objects on Scenery
There are several ways of doing this. The most direct way is to simply add the required data by hand.
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 (Project Site). 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.
Finding, Creating, or Using Textures
Models in Flightgear use textures with PNG format.
Most image editors support editing PNG files, like THE GIMP, Corel Paintshop Pro, Adobe Photoshop, etc.
The old SGI rgb format (.rgb extension) is no longer supported. (see http://scenemodels.flightgear.org/)
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 license. 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
|See http://members.aon.at/mfranz/flightgear/blender-textured-lights.html for the main article about this subject.|
Problems and Solutions
Improving Models for Best FlightGear Performance
- Use a single mesh so far as is possible, for example, combine all the parts of a building into one Object.
- Use Materials on Objects instead of textures where possible.
- Set all the faces of the model to SingleSided. DoubleSided faces are very expensive to render properly.
- Use a single texture.
- Textures, transparency and .xml included sub-models : The things that kill frame rate in FlightGear. Try to avoid them.
- If a model has to be detailed to a High Degree, use multiple Objects with different levels of detailing, and switch between them based on LOD.