Texture mapping with Gmax and LithUnwrap.
Model type:
North American P51D FSDS file converted to Gmax format via CVA plugin.
Model Designer:
Mike Crosthwaite.
Texture Mapping:
FSAlpha Design Group
Member: FSEdge
www.fsalpha.com

The tutorial is based on the methods I have adopted over time by reading and studying other individual's work where Gmax and LithUnwrap apply. I am sure over time my mapping skills will change as I become more familiar with Texture Maps.

First, when I map a model I need to determine how big my UVWmap needs to be. Determine if the wing span is greater than the fuselage length or vise versa. If you don't know the aircraft specs., use the tape measure and find out.

On the Modify Panel under Objects Categories choose Helpers and then select Tape.
Change the View Port to left side view, and make the View Port full screen (Ctrl + w).
Now draw out the Tape measure fore to aft on the fuselage. You can read the measurement in the Parameters Rollout. This information will be in the box located next to Length.



Repeat the steps above for the wing.



The P51D has a greater wing span than it's fuselage is long so you will set the base UVWmap to match the wing span and all the subsequent maps created to this size. By doing this you will be able to place a great deal of the maps onto a single bit map that FS will use.

Applying UVWmaps:

Start by changing the View Port to a Top view and selecting the left wing. Next, hide all the UN-selected parts.


With only the left wing visible, select the Modify panel and then under Editable Mesh, select Face. Also make sure that Ignore Backfacing is checked in the Selections Rollout. Draw a selection box around the entire wing. This will select all of the Faces on the top half of the wing leaving the bottom half UN-selected. Once the top wing Faces are selected, use the Arc Rotate and look all around the wing to see if a Face was missed that would cause an undesirable result. (Tip: Hit the F2 key and turn on Shade Selection. This will help identify missed Faces.)




Rotating the wing reveals three Faces that did not get selected. They need to be selected now.



If you have a Faces that may have been selected on the bottom half, deselect them by holding down the Ctrl key and click the Faces you need to deselect.

Turn off Arc Rotate and go back to a Top view.

Open the Modifier List and look down the list until you find the UV Coordinate Modifiers section. Select the UVW Map modifier.

This is the map that all of the remaining maps will be based on.



Now is when you will need the measurement from Tape01 earlier. If you don't remember the sum of the measurement, go to Display and select UN-hide By Name.



Choose Tape01 and Tape01.Target. Select Unhide.


Using the Select by Name, highlight Tape01.



Now, go to the Modify panel and choose Modify. In the Parameters Rollout you can find the length of the tape.


Keep the length in mind or write it down. In this case it is 37.015m.
If the View Port is not in the top view, change to the top view now. Select the wing again by clicking on it.



Now the UVW Map is ready to size up. **It is important to keep the map square**.
We will use a Planar map to cover the wing. Set the Length and Width just a little larger than 37.015m. 38.5m should work well. Select UVW Map in the Modifier Stack. This will highlight the map. The Yellow spike indicates the top of the map. The vertical Green line always runs clockwise to the top of the map.



Now that the base map size has been established it can be relocated to it's final position. Check to make sure the UVW Map's Gizmo is still selected. Use the Select and Move tool to relocate the map so that the wing is sitting in the upper left corner of the map.

Next it is time to map the bottom half of the wing. In order to do this we will have to go to the Modifier List and add Mesh Select to the modifier stack (see image 1). Once Mesh Select has been added to the stack, select Face in the Sub-Object tree (see image 2). Next, invert the Face selection by using the Select Invert command in the Edit menu (see image 3).

Image 1
Image 2
Image 3

Change the View Port to a Bottom view. You will see that all of the Faces on the bottom half of the wing have now been selected.



Now we can add the UVW Map to the bottom half of the wing. From the Modifier List choose a second UVW Map.



Once the second UVW Map has been added there are a few steps that need to be done in order to properly fit the map. First step will be to flip the map 180° degrees on the "Y" axis. Select the second UVW Map's Gizmo (see image 1). There is more than one way to flip a map. One: Use the Rotate Selection tool (see image 2) and place the mouse over the "Y" axis and hold down the left mouse button. Move the mouse up or down while watching the status bar to indicate when 180° degrees has been reached. Two: Select the Rotation Selection tool and right click on it to open the Rotate Transform Type-In dialog (see image 3). When the dialog is open, type 180 in the "Y" axis under Absolute:World section and close the box.
Image 1
Image 2
Image 3

 

Once the map has been flipped you will notice that the map is 180° degrees out on the "Y" axis from the map applied to the top of the wing. The map should look like this.



At this point you will want to set the size of the map to the same size as the top map which is 38.5m in Length and Width.



Now the map is ready to move into place. This process is where the space saving comes into play on the final texture. It will take a bit of experimenting to set it where you need it. The more you work at it the easier this process becomes. I find it helpful to go back and forth between the two UVW Maps by choosing one or the other in the Modifier Stack. When you do this you will get a warning. Ignore it by selecting yes when the warning occurs. Also using the Select and Manipulate tool will help in map placement by showing both maps at the same time.
Below are three images Top Map, Bottom Map and both maps shown using the Select and Manipulate tool.

Top Map placement

Bottom Map placement

Both Maps shown with Select

and Manipulate tool
With the maps placed, its time to export them to LithUnwrap and see how close they have been located to each other.

In Gmax, open File and then choose Export Selected.


When the dialog box opens, create a new folder and name it md3. Save the file as type Quake III (*.MD3) in the new md3 folder. Name your file left_wing.


When the export runs you will have to tell it that there are 0 frames and deselect the warnings box.


Now launch LithUnwrap and go File>Model>Open (see image 1). Browse to the MD3 folder and open the left_wing.md3 file (see image 2). Now select Import (see image 3).

Image 1

Image 2

Image 3


This is how the imported file should look in LithUnwrap.



If the placement of the maps on the left wing are acceptable after importing into LithUnwrap - you are done. If not, go back to Gmax and adjust which ever UVW Map is needed to correct the problem and export it again using the same file name. (Note: Only move one map at a time. This will help you determine which way the UVW Map needs to be adjusted in Gmax.) After doing this a few times you will develop an eye for UVW Map placement, thus reducing the number of exports it takes to get the right placement.

Saving the file out of LithUnwrap:

There will be two file types you want to save out of LithUnwrap. One type is a Bit Map (*.bmp) which will be used in Gmax and also as your texture template to be used in a graphics editor later when ready to create the final textures FS will use. The other file type will be a LithUnwrap format (*.lum). This file will be used later when you are working in LithUnwrap. As you save these file types, create a new folder for each format type. Name the folder that will hold the Bit Map/Maps created in LtihUnwrap (UVWmaps). Name the folder created for the (*.lum) format (LithUnwrap). By saving a file as (*.lum) format you will be able to keep a master template of all the UVW Maps that are created in Gmax as you import them into the master template.


The first file you will save is the (*.bmp) format. Be sure and give this file a meaningful name. While still in LithUnwrap go File>UV Map>Save (see image 1). Now you are presented a dialog with choices as to how you want the file image to be saved. Under the Options Groups section choose Color and outline, also check Fill. In the Bit map Dimensions section set the size of your image. Staying within FS conventions for aircraft textures your choices are 128*128, 256*256, 512*512 and 1024*1024. Personally I prefer 1024*1024 (see image 2). Now go ahead and save a file in the (*.lum) format (see image 3). You will see why I do this a little later in the tutorial.

Image 1

Image 2

Image 3


Using the Gmax Material Editor and the Unwrap UVW modifier:

Now that you have done all that is necessary in LithUnwrap for now, its time to use the Material Editor in Gmax.
Pull up Gmax with the left wing still selected and open the Material Editor via the icon or key board short cut (m).

Once the Material Editor is open, you need to create a new material and name it accordingly (see image 1). After the new material has been created, you will need to open the location where the Bit map created in LithUnwrap earlier is located. Do this by using the Diffuse Map locator in the Material Editor (see image 2). When the image has been located and opened, use the apply button on the Material Editor to apply the image onto the left wing (see image 3).
Image 1

Image 2

Image 3


After the image has been applied you can close the Material Editor. You should see the left wing with it's new texture. Make sure that Smooth + Highlights is selected and also turn off Shade Selected (F2).



Select the Arc Rotate and look the wing over for any problems. Notice that the leading edge where the textures meet is blurred due to stretching of the new texture when it was applied.


This problem can be corrected by adding an UnwrapUVW modifier to the stack. The Unwrap UVW modifier will allow you to adjust these types of problems.

If it is necessary to use an Unwrap UVW modifier to correct a problem, then the Unwrap UVW will have to be placed in the modifier stack just above the UVW Map you need to correct.

In the case of the left wing, both the top and bottom map need to be corrected slightly on the leading edge. Let's start with the left wing's top map. In the modifier stack select the UVW Map applied earlier to the wing's Faces for the top half (see image 1).Ignore the warning and hit YES.
Now choose the Unwrap UVW modifier from the Modifier List (see image 2).
With the Unwrap UVW added to the stack, open the Parameters Rollout and select Edit (see image 3).
Image 1

Image 2

Image 3


After selecting the Edit button a GUI will open. This is the Edit UVWs tool.
You will notice that only one map is ready to edit.

To select multiple vertices for moving, hold the Ctrl key down while selecting them. After the vertices have been selected, change the movement tool to Move Vertical.



Now move the newly selected vertices forward a bit.



The top map is done for now. Close the Edit UVWs tool. Add the Unwrap UVW Modifier to the bottom map after selecting the UVW Map used for the bottom of the wnd ing. Make sure it is placed in the stack above the last UVW Map Modifier. Now repeat the Edit process for the bottom map that was just applied to the top map.



After the Unwarp UVW modifiers have been added and tweaked, export back to LithUnwrap and save them all over again. Next, load the newly modified textures back into Gmax via the Material Editor once more so you can view the updated changes after using the Unwrap UVW Modifier (see the before and after images). You can spend a great deal of time working on making your textures perfect.

Before Unwrap UVW

After Unwrap UVW


Now is a good time to take a break before we start with the right wing. You have earned it. When you come back we will add UVW Maps to the right wing and also the fuselage. I will also show you how to merge all of the maps into one file like you would find when looking at one of the stock Bitmaps out of FS2002.

UVW Mapping the right wing:

You will follow the same procedure for the right wing as done to the left wing. The only difference will be the placement of the UVW Map on the right wing.

Lets start by hiding the left wing and then Un-hide just the right wing by choosing Display in the Modify panel.



Once you have only the right wing showing go back to a top view. Now the fun begins. In order to squeeze the parts onto your texturing template sometimes it will be necessary to rotate the maps to fit everything on one template (More on rotating later).
Below is the left wing and right wing mapped.
UVW Map placement: Left Wing
UVW Map placement: Right Wing

Once you have the right wing mapped it needs to be run through LithUnwrap to create the bit map template.
When using LithUnwrap this time you will want to use the Merge option. The Merge option is located in File>Model>Merge


Opening the Right Wing Map to import.


Importing the Right Wing Map.


Both the Left wing Map and Right Wing Map merged.



First select the wing by clicking on it making it active if it is not. Once the wing is active go to the Modify Stack and drop down the Editable Mesh tree. Choose Face and make sure to turn on Ignore Backfaces in the Selections Rollout. Then draw a selection box around the wing while in a top view.



Once again use the Arc Rotate tool and look over the wing for missed Faces during the selection or Faces that may have been selected accidentally you don't want.


Once you have corrected any problems go ahead and add a UVW Map to the Modifier Stack for the top half of the wing. Use a Planar type map and set the size of the map to Length 38.5m and Width 38.5m.


The position of the map needs to be considered. You can't just simply place the map anywhere. It needs to be placed in a location that will not overlap the left wing map. Image one below shows the approximate location of the left wing in relation to it's top UVW Map. Image two shows a good location for the top right map. Image three shows the final location of the right wing in relation to it's top UVW Map.
Image 1

Image 2

Image 3


Map the bottom of the right wing in the same manner. Remember map location is key to preventing overlap. Once you have your maps in place, export them to LithUnwrap and save the export as (right_wing.MD3). Now open LithUnwrap and use merge to import the new map. Once this is done save the updated map so you can apply it to your object through the Material Editor back in Gmax. Add Unwrap UVW modifiers if needed and export to LithUnwrap all over again.



*Note about LithUnwrap*
Earlier in this tutorial I asked you to create a folder named LithUnwrap for the purpose of saving a master file you could open later. When you first start a mapping project and export it to LithUnamp you use the File>Model>Open to import the first file. After the file is opened in LithUnwrap, all the remaining files will be imported through File>Model>Merge. When you save a (master.lum) file it will keep all of the merged imported files you have created. This is very handy when you need to stop work and close down LithUnwrap. If you don't have a (master.lum) file then you will always have to start over and first open a file then merge all remaining map files. As the number of UVW Maps grow it will become apparent how useful a master.lum can be. To save a (*.lum) format go File>Model>Save.


Fuselage UVW Mapping:

Hide all objects except for the fuselage. Next, Go to a left view in the View port. If needed hit the (W) key for a full screen view.

Start by selecting Face in the Editable Mesh Sub-Object tree and check Ignore Backface. Now draw a selection box around the fuselage.



Select (Arc Rotate) to look over the model for Faces missed or unwanted. When you are done correcting any problems add a UVW Map Modifier to the stack keeping the Planar map. When you first look at the UWV Map it will be lined up along the "Z" axis.


The Position of the map, Length and Width needs to be changed. To do this go to the UVW Mapping Parameters Rollout and set the Length to 38.5m and Width 38.5m. Next scroll down to (Alignment) section. Click on the (View Align) button. This will reset the maps orientation.


Remember the placements of the wing maps? If not look at the mapping in LithUnwrap for their location. The goal here is to place UVW maps for the fuselage in the lower half of the template.



Map placement on the fuselage left side (see image 1). Map placement on the fuselage right side (see image 2). The third image shows both maps at the same time (see image 3).


Image 1

Image 2
Image 3


The end results should look like this when exported and merged into LithUnwrap.



Now add Unwrap UVW modifiers if needed for adjustment.

As you can see there is still quite a bit of unused space left on the template. Use these spaces for placing other mapped objects. On some projects it will be necessary to have more than one master template. If the remainder of this aircraft is mapped, I would have to start a second template to hold all of the aircraft parts. Well that just about covers my method of UVW Mapping. I am sure that there are many more possibilities to mapping than I know of for the moment. I am always learning new ways to do things.

I hope that you have found this tutorial helpful. If you have any questions, comments, complaints or just want to say thanks feel free to e-mail me at: fsedge@fsalpha.com

Thank you.

FSEdge