Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Difference between revisions of "Howto:Modeling Ground Signs with Blender"

From FlightGear wiki
Jump to: navigation, search
(add files)
m (Flightgear: ground markings at the airport with Blender and XML)
Line 8: Line 8:
  
 
''Tutorial Files (right click: Save Link As)''
 
''Tutorial Files (right click: Save Link As)''
* [[Media:catii-iii.ac]]
+
* [[Media:catii-iii.ac|catii-iii.ac]]
* [[Media:catii-iii.blend]]
+
* [[Media:catii-iii.blend|catii-iii.blend]]
* [[Media:catii-iii.xml]]
+
* [[Media:catii-iii.xml|catii-iii.xml]]
* [[Media:catii-iii.rgb]]
+
* [[Media:catii-iii.rgb|catii-iii.rgb]]
  
  
Line 18: Line 18:
  
 
Every pilot should know what ground signs to pay attention to during every phase of the maneuvering, prior to reach the runway start. There are paintings on the ground, taxi signs on the side of each runway/taxiway, you have to care about tower radio communications and so on. Here you will learn how to build custom ground markings, the one that are painted on the ground and tell you usefull informations about what you can and cannot do during your ground maneuvering.
 
Every pilot should know what ground signs to pay attention to during every phase of the maneuvering, prior to reach the runway start. There are paintings on the ground, taxi signs on the side of each runway/taxiway, you have to care about tower radio communications and so on. Here you will learn how to build custom ground markings, the one that are painted on the ground and tell you usefull informations about what you can and cannot do during your ground maneuvering.
 
  
 
=== Holding position markings for CAT II/III operations ===
 
=== Holding position markings for CAT II/III operations ===

Revision as of 19:05, 22 June 2006

Flightgear: ground markings at the airport with Blender and XML

2006-06-22

Roberto Inzerillo robicd at gmx dot net

Blender v.2.40

Tutorial Files (right click: Save Link As)


There comes a time when you want to add a few details to an airport in order to improve realism to your flight experience. Every flight start (and ends) at the ground, on the airfield. You generally wont spend too much time there, you will immediately start at the beginning of a runway and be on air in a few seconds. But there are people who like learning how to move on the ground too, and learn how to maneuver their aircraft inside the airport. Well, in this case, having good ground signs/markings on the ground is mandatory, because most of the guiding has to be found there.

Every pilot should know what ground signs to pay attention to during every phase of the maneuvering, prior to reach the runway start. There are paintings on the ground, taxi signs on the side of each runway/taxiway, you have to care about tower radio communications and so on. Here you will learn how to build custom ground markings, the one that are painted on the ground and tell you usefull informations about what you can and cannot do during your ground maneuvering.

Holding position markings for CAT II/III operations

This lesson will teach you how to create a basic ground marking, the one that informs the pilot he has to hold during CAT II/III operations to ensure proper aircraft separation. There are generally a few taxiway signs too, which helps locating those areas also. CAT II/III separation is not that big issue within Flightgear, there's still no automatic ground traffic management, and aircraft crashing is not very expensive; but this is a real ground marking, and we will concentrate on the modelling phase, not on the functional aspects of that sign.

There is no way Flightgear could position those ground markings in an automatic way. There is no database telling where they are and how do they look like. Each airport customizes ground markings position/orientation in order to get maximum efficiency and to help pilots getting correct informations without filling the ground with too much of them. Rationalizing communication effectiveness is vital to an airport. Therefore you will create and position them manually.

When looking from the air, those CAT II/III markings look like this:

Catii-iii markings html 6961c87a.jpg

They are generally put in the middle of the runway, following the taxiway yellow line, just before the CAT II/III operations area. Here the pilot has to stop and wait for directives coming from the ATC.

It's a simple red square with a big white CAT II/III writing, it's a lot stretched so that when looking from the aircraft, taxing over there, it looks quite proportional.


Modelling the marking with Blender

That's very easy, it's a simple textured rectangle. First thing you need is the correct measurements and a nice texture to put on it. I will create this example with the same measures used at EDDF Frankfurt airport. The rectangle is 8m wide and 7m high.

I will not explain how to paint the texture because it's trivial, just make use of your preferred painting software, I used The Gimp for this one, save the file as a .rgb format, and make shure its size (pixel resolution, not bytes) is a multiple of 8, otherwise Flightgear will not load it. Here you see a JPG version of the texture as an example, download catii-iii.rgb to get the RGB version you need for texturing, it has 512x512 pixel resolution. You can use smaller ones (ex. 128X128) if you think this resolution is too high.

Catii-iii markings html m11bd5b93.jpg


Modelling the rectangle with Blender is trivial.

Open Blender; from the main menu choose Add -> Mesh -> Plane

This add a 2units width square plane.

Our ground painting is 8m x 7m rectangle, we have to change the square dimensions.

Enter Object mode. Object -> Transform Properties

The Transform Properties window appears. Set “Size X : 4” and “Size Y: 3.5”.

Notice here that the object name is “Plane” (OB: Plane), we will use this information later.

Catii-iii markings html m352e2670.jpg

Now you come to the texturing phase. Split the top window in two, and select UV/Image Editor for the right panel:

Catii-iii markings html 39a834a0.jpg

In the 3D View window, select UV Face Select mode, the rectangle face should be still selected, if not, select it by right clicking on the rectangle. Now, while the mouse is in the 3D View window, make shure it's a top view (Numpad 7), hit the U key, and select “From window”.

Now it's time to load the texture file. Inside the right panel, choose Image -> Open ... select the file catii-iii.rgb and hit Open Image.

Catii-iii markings html m41735d75.jpg

We have to move the rectangle UV vertices in order to make the texture cover the entire rectangle geometry. We will now work in the UV/Image Editor window. Make shure “UVs -> Snap to Pixel” is set, that will make our life easier. Hit the B key, click and drag the mouse around the left down corner in order to select it. We are not working on the 3d model, we are working on the Uvs, that's why the rectangle in the left window maintains its geometry. Once the vertex is selected, hit the G key (Grab mode) and drag the vertex to the bottom left.

Catii-iii markings html m3011a2ff.jpg


You will need to zoom in a little bit in order to position it precisely, use the CTRL-MMB (MMB = Middle Mouse Button) to zoom in and out, use the SHIFT+MMB to drag the view around. Hit G again, and move the UV vertex in the right position. While doing this, you can select the Textured Draw Mode and interactively see what's happening.

Catii-iii markings html 3b879144.jpg

You can select and deselect all UV vertices hitting the A key.

Now hit the A key to deselect the UV vertex; zoom out, hit B, by clicking and dragging select a new UV vertex, hit G and move it with the mouse to the correct position. Then do the same with the remaining two vertices. You will end up with the texture perfectly matching the geometry border:

Catii-iii markings html 3283723d.jpg

Now you can go back to Object Mode, make shure the object is selected and export it as AC3D formatted file.

File -> Export -> AC3D (.ac) ... enter a filename and hit “Export AC3D”.

The 3d model is ready and you can place it into your airport scenery right now. Make use of Flightgear Scenery Designer, the UFO object placing capability or whatever method you prefer.

Result being:

Catii-iii markings html 5db04368.jpg

Catii-iii markings html m1758ae9f.jpg


We will go further and add a few details using an XML file which will describe peculiar attributes of such an object.


Customizing object's attributes into Flightgear using XML

We have three little details here that can be annoying.

1) If you activate Shadow into Flightgear and fly very close (let's say 10meters) to those CAT II/III markings, you will notice that they cast a shadow underneath, especially if the plane has been positioned more then 20cm above the ground. This is not good at all because that should represent a painting on the ground (that could not cast any shadow, there should be no free space between the painting and ground) and a useless shadow consumes GPU power too, which is not desired.

2) If you maneuver an aircraft on the ground, right above the marking, you will notice that the aircraft hits it with the wheels, and jumps a little, just like it encountered an obstacle on the ground. That is not good again, the painting should not oppose any resistance to any ground movement.

3) If you fly high above the airport area you will not really see those little red rectangles, they are too small to be noticed from a height. Nonetheless, Flightgear will still render those little objects on the ground and consume GPU power without really giving any advantage to the simulation experience. That should be avoided, we need to make Flightgear render those markings only when the aircraft is near enough to make them visible to the pilot.

We will eliminate those three cons creating a XML file that covers the issues. Please refer to Flightgear docs in order to get more informations about the usage of the XML markup language used.

You can use any text editor you prefer, fill a new empty text file with the following content and save it as catii-iii.xml in the same directory with catii-iii.ac and catii-iii.rgb.

<PropertyList>
 <path>catii-iii.ac</path>

 <animation>
   <type>noshadow</type>
   <object-name>Plane</object-name>
 </animation>

 <animation>
   <object-name>Plane</object-name>
   <enable-hot type="bool">false</enable-hot>
 </animation>

 <animation>
   <type>range</type>
   <object-name>Plane</object-name>
   <min-m>0</min-m>
  <max-property>/sim/rendering/static-lod/detailed</max-property>
 </animation>

</PropertyList>


The <path>catii-iii.ac</path> statement means that all this refers to the 3d object file named catii-iii.ac.


Every animation transformation here applies to the the object called “Plane” inside the catii-iii.ac file (which is our marking rectangle). We could have more then one object inside the .ac file and decide which should cast a shadow and which not. Our example is very simple though, but still this statement has to be included.

1) The first “animation” transformation tells Flightgear not to apply any shadow to it.

2) The second “animation” tells Flightgear not to consider the object “Plane” as an obstacle, so any vehicle will not hit it.

3) The third “animation” tells Flightgear to render the object “Plane” only if the distance between it and the viewer is more then 0 meters and less then the value stored in Flightgear tree with the name /sim/rendering/static-lod/detailed. This value is a number that can be user customized; the default value is 1500m. When the object is more then 1500 meters distant, Flightgear will not render it; at such a distance you barely see a 8m x 7m square painting on the ground.

Now, insert the 3d object into your scenery but do not use the .ac file, make use of the .xml file instead; it will call the corresponding .ac file when needed.

Catii-iii markings html m1e8e2be9.jpg

I hope you will enjoy this little lesson. Consider this as an example, because there are a lot more things to do with the XML animations provided by Simgear to Flightgear.