Modeling - Getting Started

From FlightGear wiki
Jump to: navigation, 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

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.

3D Software

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.

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 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

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.

SketchUp

1rightarrow.png 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.

Wings 3D

1rightarrow.png 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 model adjustment dialog of the UFO

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

1rightarrow.png 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

Using Multiple Models with varied detailing
To set faces to Singlesided (Blender), deselect the Doublesided button

Mesh

  • Use a single mesh so far as possible, for example, combine all the parts of a building into one Object. Only have the separate objects if you need them for an animation or parts that use a transparent texture. (any object using more then one texture is anyway spitted by the rendering engine in separate objects)
  • Delete unseen faces (such as those under the model hidden by the ground, or face inside the model if there are)
  • Remove "line faces" which are faces whose points are in the same line
  • Don't forget to remove double vertices

SingleSided/DoubleSided

  • Set all the faces of the model to SingleSided. DoubleSided faces are very expensive to render properly. If a face needs to be displayed from every view angle use two faces with opposite normals rather than a Doublesided one ( the overhead from the extra geometry is far lower than the overhead of doublesided faces)
  • However, if a face need to be displayed for every view angle, use two-sided display instead of two opposite faces with one-sided

Textures/Materials

  • Use Materials on Objects instead of textures where possible.
  • Avoid mixing textured and untextured geometry in the same model. Build the coloring into the texture map instead.
  • Textures must be a power of two (or it will be resized at loading...)
  • Avoid using big textures: 512x512 maximum is mostly enough for most models
  • Use a single texture. However, if your model absolutely needs alpha texture and another part of the model is opaque, you should use two textures: one with alpha and the other without.
  • Don't use alpha in texture when it is not needed

LOD

  • 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. (very small models, such as fences can even be not displayed when they are far)

Other

  • Textures, transparency, .xml included sub-models : The things that kill frame rate in FlightGear. Try to avoid them.
  • Also avoid smooth shading when possible (only for curved surface if it really has an impact on model quality).

Resources