Marginal
X-Plane Scenery
Tutorials
Hangar
Transparency |
![]() |
![]() |
![]() |
The hangar that we've constructed and painted in the last two chapters has the front doors closed:

What if we want to have the doors open, like in the picture? As we shall see, open objects present extra issues in X-Plane.
First, let's give the open hangar a new name, so that we don't overwrite the closed hangar:
VAhangar_open
and press
.In addition to specifying the colour of each pixel, the PNG file format that X-Plane uses for textures allows you to specify how transparent each pixel is - from fully transparent to fully opaque. This transparency information is called the "Alpha Channel".
The BMP file format doesn't support transparency. However X-Plane fakes it by rendering any magenta (#FF00FF) pixels that it finds in the texture as fully transparent.
With the doors open, the front of the hangar is quite a complicated shape:

We could construct this out of three or more rectangles, but that sounds like work. Instead we'll cheat and just make the gap made by the open doors transparent. We can do this by using a version of the texture file that has this area marked as fully transparent in the alpha channel:
to put Blender in UV Face Select mode.
twice to select all faces.
VAhangar_open.pngThe hangar now looks like this:

That's not right - the gap is black instead of transparent, even though this area is marked as transparent in the texture file's Alpha channel. Blender and X-Plane have to be told about the Alpha channel:
on the front face
to select it.
to make the Buttons Window display the editing buttons.
Blender now correctly shows the door space as transparent:

But wait - what happened to the left hand hangar wall? For efficiency, Blender and X-Plane normally only display one side of each face. This is usually a good thing, since it helps to reduce the work that the OpenGL renderer has to do and so keeps frame rates up. However it's not such a good thing when one is constructing open objects. We could tell Blender and X-Plane to display both sides of the hangar walls (using the Twoside button in the Texture face panel), but we want the inside of the hangar to look different from the outside, like in the picture.
The answer is to add extra faces, and to make them face inwards. We could do this by duplicating every existing face, but that's more detail than we need. So, to keep the number of faces down and frame rates up, we'll add a new cube for the inside of the hangar like this (marked in red) instead:

In Blender it can be difficult to edit Meshes that have both inward and outward-facing faces, so we'll add this cube as a new Mesh. First we need to set things up:
to exit UV Face Select mode and
to put Blender back in Object Mode.
We want to add the new cube so that it's centred at the origin:
to centre the cursor at the origin.
to bring up a context menu.
to re-scale.
and
drag the mouse out until the cube is 25 times larger. Make sure you
make it exactly 25.000 times larger - it would be a pain to fix it
later. (You can press
to cancel the
scaling operation,
or
to
undo it if you make a mistake).
when the cube is 25 times larger:
Blender gives the new Mesh the name "Cube". Lets call it something descriptive, like "Internal":
to show them.Internal and press
. Now we need to resize the new cube to fit according to our sketch. We'll go back to using Face select mode to do this:

to bring up a Properties window.
on the bottom face to select it.
to grab the selected face.
and move the face with the
mouse to line up with the base of the hangar).
when the face is the right place:

on the numeric keypad to get a rear view.
The new cube has outwards-facing faces, just like the faces that make up the outside of the hangar. We can tell this by looking at the light blue "normals" that Blender draws in the middle of each face - they're all pointing outwards:

Whether Blender draws these "normals" and their size is controlled by the Draw Normals and NSize buttons in the Mesh Tools 1 panel:

We need the faces of the new cube to face inwards:
twice to select all
vertices.
The light blue "normals" in the middle of each face now point inwards, indicating that the faces are facing inwards:

Finally before we apply textures to the new cube, we should remove hidden faces to keep the number of faces down and keep frame rates up. This time we'll keep the bottom face to use as a concrete floor. But we will get rid of the front face, since this face would only be visible from inside the hangar:
to rotate the hangar so that the front face is facing you.We need to assign textures to the inside of the hangar. First, we need to set things up for managing textures again:


Start by assigning the texture file to all faces of the new cube, and then fix up each face one by one:
twice to select all faces.
Now to fix up each face's texture. For each face in the new cube:

The floor needs an extra step:

In general you should use the Tiles button on all faces that lie horizontally on the ground to prevent artifacts in X-Plane. Don't press this button for other faces. ("Tiles" is not a very descriptive term for what's going on here but it was the only available button in the panel and so got co-opted for this purpose - actually this button tells X-Plane to draw these faces with "polygon offsetting" so that they are raised above taxiways and aprons).
When you're done with all of the faces:
to exit UV Face Select mode and to put Blender
back in Object Mode.
to unselect all objects.That's it! We've finished the open hangar.
to rotate and view the finished hangar:
Now save your work:

or
to confirm.Remember that Blender does not automatically save your work when you quit. Always choose File → Save before you quit Blender!
Marginal
X-Plane Scenery
Tutorials
Hangar
Transparency |
![]() |
![]() |
![]() |