Howto:Texture a building
In this howto I'll show how I texture a FlightGear building using Blender and Gimp. I'll assume you're quite familiar with them both - knowing how to use UV maps in Blender and Layers in Gimp for instance - and can therefore follow my method.
- 1 Approach
- 2 Blender
- 3 Gimp
- 4 Blender again
- 5 XML
- 6 Testing
- 7 Database
Variety, randomness and non-uniformity in textures give models a more natural appearance. Use the burn, dodge and blur tools wherever you can and slightly modify textured areas. Lighten edges and darken corners, introduce shadows, subtly change hues and bravely blur details. Darken edges in contact with the ground and add random highlights at corners and horizontal surfaces. Make the observer's eye and brain work a little more and (s)he will often assume that the fuzz contains more than it actually does. Give him(er) sharp lines and pure tones and (s)he will just see unrealistic forms. Of course, if you have your own photographs of building elevations then your work is much easier.
I guess you've almost finished constructing your model in Blender saving regularly as you go along (F2, +, ↵ Enter). If in doubt at any stage, simplify entities as simple geometric forms and add as much detail as you wish (future PCs will always be able to handle whatever you construct and low power users can always opt for another model). Remember to get the scale of your model correct. An alternative estimate of height is to make each storey (floor) 3m high or try importing an existing building and sit it by the side of yours.
For this howto I chose an existing, simple FG model - $FG ROOT/Models/Industrial/Industrial50x100.ac which is not yet textured. In Blender I combined the two object meshes (Ctrl+J) to make UV mapping easier. Looking at the model in Blender I also saw that I could merge several vertices (select, Mesh, Vertices, Merge, At Center). This reduced vertices from 26 to 14 without changing the model. I increased the roof overhang which was not prominent so it was considered better to exaggerate it a little - every little bit of complexity adds to the realism in FG. Right, that's the modelling done now to bring it to life with texturing.
Create a UV map by selecting all vertices (A) in Edit Mode (Tab ↹) and using Blender's powerful UV generator (Mesh, UV Unwrap, Unwrap (smart projections). Quite often the UV map layout seen in the UV/Image Editor window is not suitable for full utilisation of available texture space; so the UV maps need manipulation, as described later.
UV Alternative Method
- Build up the UV map by first selecting one face and projecting it exactly as it is seen in the Edit view (Mesh, UV Unwrap, Project From View).
- Repeat this for each face and chosen an appropriate view from which to project - thus building up the whole UV mapping of the model. It is convenient to move each UV map away from the grid area to avoid them being sat on top of each other before organizing them back on the grid in an efficient layout.
- Finally, check there are no isolated UV's by selecting all vertices which then displays all the UV maps.
Organize UV Maps
In either case the next job is to tidy up the positions of the UV maps so that the available space is utilised most efficiently. This can take some time but is a worthwhile process. The aim is to make most use of the UV grid available, so start with the most important aspect of the building and give it the largest area - in this case the side that would normally be seen from your aircraft.
- Select each UV map (Ctrl+L), resize it if necessary (S) and grab it (G) and move it into position until all maps are located so that the grid area is fully used. Superimpose the long wall on top of each other to make the best use of space. Also do the same the same with the end walls, gable ends and roof.
- Change things a little, if necessary, as you go along but it is worth the effort. A neat trick is to expand the UV maps of the long walls outside the grid area so that a single texture area can be repeated thus giving much more detail to your building (some adjustments can be done in Blender later).
Export UV Map
When you’ve created a compact UV map layout on the grid export it ready for painting the textures (UV/Image Editor view, A, UVs, Scripts, Save UV Face Layout, Size:512, OK, Industrial50x100_new.tga). Keep Blender open because you will be doing an iterative process later.
- Open Gimp and open the Industrial50x100.tga file and use this as the base for the texturing.
- Create a new layer (Layer, New, colour) and fill the layer with the main colour of the building - say a warm tan-grey. This is eventually going to be lightened, darkened and smeared to give variety.
- Set the opacity of the layer so that the underlying Industrial50x100.tga layout can be seen (60%).
- Save the file regularly as Industrial50x100.xcf.
Details of the building are then painted. This is where you use knowledge and observation of the real world. For example: no areas are completely uniform, there is variety everywhere, there are subtle changes in hue (colour values) in everything and hardly ever are colours seen in pure form. If in doubt, always tone things down, blur details and add a little blue to make things blend into the distance. Weathering is important too, most entities are bleached by the sun, smeared by the rain and generally age. If in doubt, do it (you can't do worse than the gaudy, uniform tones of many models).
- Create a new layer called “walls“ (Layer, New Layer, walls).
- Switch the grid on (View, Show Grid) and adjust to show many lines (Image, Configure Grid).
- Draw several vertical corrugated sides using the Pencil tool, dark tone and keep them straight (click and ⇧ Shift) using the grid as guide.
- Select the drawn area, copy and paste it as a new layer.
- Position the new layer alongside thus creating a larger corrugated wall area.
- Repeat pasting and creating new areas a number of times until the corrugated area is complete. During this process, laterally invert a couple of the layers to give variety. Merge Down the layers until one corrugated layer is left.
- Mildly Burn and Dodge this layer randomly to give more variety. Blur a little to add subtlety.
- Copy the layer (Layer, Duplicate Layer, wall_end (.... and ...., gable)) and position over the gable and end wall regions and use the Eraser to create suitable shaped areas.
- Subtly darken, lighten and blur the lines again in random areas to give variety.
- Select the colour layer, using the Rectangle Select tool and select a single wall area in between the vertical lines and, using the shift key, select another wall area nearby.
- Still holding the shift key down, repeat this a dozen or so times so that the colour layer has a number of randomly selected rectangular areas. Change them in hue a little (Colors, Hue saturation) and also Burn and Dodge a little then switch the selection off (⇧ Shift+Ctrl+A).
- Create a layer for the roof lines (Layer, New Layer, roof) and draw them in a different style from the wall lines (again to add variety).
- Treat the roof lines in a similar manner to the wall lines: random darken, lighten, blur.
- Create a “rooflights” layer (Layer, New Layer, rooflights).
- Select a small rectangular area and fill it with dark blue.
- Burn this a little over part of the area then Blur it a little.
- Use the Pencil tool to draw a frame around the edges of the rectangle in a lighter and slightly different colour. Always change colours and tones a little to randomize the visual effects.
- Still with rectangular area selected, copy and paste as a new layer.
- Move it a slight distance along the roof in between the joints.
- Switch the selection off.
- Duplicate the rooflights layer a number of times, occasionally laterally inverting the layer, and position along the roof to create a row of roof window lights.
- Merge Down the layers to give just one rooflights layer.
Similarly to above, a "windows" layer is created and windows are painted.
- Once the window frames are drawn over the varied glass tones randomly select (holding down the ⇧ Shift key) a number of the rectangular window panes and use the Dodge and Burn tools in a casual manner to give more variety to the panes; add extra highlights to give the impression of the reflected sky, for example.
- Copy the first window, paste, layer and change it slightly to make it subtly different.
- Create a "doors" layer paint a rectangular area slightly different in hue from the wall colouring.
- Create a line layer created over the top of this on which a few horizontal lines can be drawn to represent joints in the roller door. Copy these to give enough lines to cover the door.
- Darken, lighten and blur these lines in a non-uniform manner.
- A personnel door should also be constructed - another hue with more darkening, lightening and blurring.
Make a "shadows" layer and add overhang shadows with the airbrush set at 15% opacity. Blur the bottom edges.
- Merge all the layers as "day" ready to check, add final details, weather and create night textures.
- Check that the alpha layer works by Erasing a small area to reveal a chequered background.
- Carry out weathering by using the Burn tool along the ground edges and Smudging a little.
- Lighten the corners and add one or two specks of highlight on roof fittings.
- Do a final pass with the Burn tool over corner areas.
During all the operations above, save the texture file as Industrial50x100.png and reload it in Blender and view it on the model to see how it is progressing (View, Texture Mode).
- Resize the "day" layer to 512 width 256 height (Layer, Scale Layer, unlock link).
- Carefully position the layer exactly on the bottom of the working square.
- Duplicate the resized layer and name it "night" and move it exactly on to the top edge of the square.
- Create a new layer called "dark" and colour it almost blue-black.
- Sort the layers so that the "day" layer sits at the top with the "dark" layer next and the "night" layer at the bottom.
- Add another layer at the bottom called “light”. Colour it pale yellow.
- Adjust the opacity of the "dark" layer so that detail on the "night" layer could be seen underneath.
- Select the window areas so that the corresponding areas on the "dark" layer can be Erased leaving the windows showing through.
- Keep the areas slected and move to the “night” layer and Erase the windows leaving the pale yellow “light” layer showing through.
- The windows may then be modified a little by Dodging and Blurring.
- Paint the window frames in black. (A drawing guide can be made by making a copy of the "night" layer but often, a guess is good enough).
- Treat the rooflights in the same manner.
- A similar procedure is carried out to create half opened doors.
- Lights falling on walls may be created by using the Eraser at 10% opacity and gently revealing details under the "dark" layer.
- Another technique is to use the Overlay mode whilst Airbrushing very pale yellow around window and door edges to give a slight glare or hazy appearance.
- Increase the "dark" layer opacity back to about 94% before finally saving the file as Industrial50x100.png to give the texture for use on the Blender model.
- Make one more visit to the Blender model to change the UV maps to coincide with the textures. Select all the UV maps in the UV/Image Editor and scale by a factor of 0.5 in the Y direction (S, 0.5, Y).
- Carefully grab and position exactly on the bottom of the grid square (G, Y). The UV maps are then on the bottom of the UV grid square with the "day" textures sat exactly on the top and ready for the switch to "night" textures with .xml file.
- Export the model as Industrial50x100.ac.
A xml file is needed to switch on the night textures at the correct time. Copy an existing xml file and change the appropriate lines for model and texture. Because the textures were made in this model to repeat horizontally, the swipe of the textures has to be in the Y direction.
This model has been added to the FlightGear Models database https://scenery.flightgear.org/app.php?c=Models&a=browse&shared=4