Viso's Aircraft Tutorial for Gmax |
|
From Bitmap to Vroom-Vroom-Vroom in 60 Minutes: By Craig "Viso" Murray |
|
Vehicle Selection Diagram Preparation Basic Shaping Armament |
Virtual Cockpits Damage Boxes Emitters Hierarchy & Wrecks |
Texture Design Texture Mapping Exporting to CFS3 Test Driving |
||
|
An Introduction to the Overview Of course, there's a catch. I've spent years refining my aircraft tutorial. It covers a lot of territory, and much of that ground is touched on here. So rather than repeat those sections here, I'm going to send you over to the aircraft tutorial to learn about a variety of basic concepts. On the bright side, if you've already done the 'crash course' in aircraft modeling - that's the one you complete in 60 minutes or so - then you should have no problems with this tutorial. Given the subject matter, this tutorial won't go as deep as the aircraft tutorial. There also won't be a step-by-step tutorial, although you won't do too badly if you build a vehicle as you move through each of the steps. I hope you will find this helpful. What Equipment You Will Need |
| You probably have a particular vehicle in mind that you'd like to build. But before you begin, I'd like to suggest that you consider your choice in light of the following criteria: | |
|
Historical Significance |
Do some research so that you understand the role this vehicle played. Where was it used? By which nations? In which theatres? For what types of missions? Against which enemy? Which exact versions were used and in what quantity? |
|
Availability of Data |
This may be the most frustrating task of all. Some vehicles have gobs of available data. Others have very little. For best results, you'll need lots of data - as well as a reasonable basis for making educated guesses to fill in the gaps. |
| Also, you'll need to obtain a good three-dimensional view of the vehicle. These can be found at several sites. | |
|
As part of your data collection, you will have located the best three-dimensional diagram that you could find. When you start working in gmax, each of the viewports (top, front, left, or whatever) can hold one of these diagrams. As you build, you will use these diagrams as templates to "trace" the image of the vehicle.
However, before you load them to gmax, you should prepare the diagrams (which I'll assume you've converted to bitmaps). To make things easier for gmax to handle, I recommend that you use 1024x1024 bitmaps. You'll need three separate bitmaps: Top, Side, and Front. Regardless of how you build your vehicle, gmax will assume that the centre of gravity is at 0,0,0. Yes, you can adjust this later. However, it might be easier to arrange your bitmaps so that - when they appear in gmax - the vehicle's centre of gravity will inherently line up at 0,0,0. To configure your bitmaps in this manner, follow these steps:
For the side view:
For the front view:
Note that the image of the vehicle will not sit in the middle of the bitmap. You should have quite a bit of "white space" in front of the nose if you've placed it correctly. Now that you've created the images, you can open gmax, and load the bitmaps into the backgrounds of the respective TOP, LEFT, and FRONT viewports. Once you've loaded the images in to the viewports, you'll want to create a dimensions box. This box should be precisely as long and as wide and as high as is your actual vehicle. Get the dimensions from one of your reference sources. Next, you'll need to Zoom Extents in All, and then separately zoom each viewport until the edges of the vehicle all touch the boundaries of the dimensions box. After you make adjustments and Lock View, Zoom Extents in All to see where the image wants to rest. Keep adjusting until everything lines up. When you're happy with everything, save the project as vehicle_v001_Bitmap. Save it again as vehicle_v002_Hull and then you can start working on the hull. Incrementing your files in this manner will make it much easier to go back a few steps when you mess up something later on. For some more tips on bitmap placement, see Hugh Shoult's "The Stupid Idiots' Guide to starting with gmax" at http://www.simviation.com/gryphon/tutorials/gMax_00.htm. |
Here's where we start the creation process. In the aircraft tutorial, I talked about differing approaches and such. In this tutorial, we can pretty much just dive right in and start building. Most of it's pretty simple, but there are some important things you need to do first.
|
|
If you haven't already added some skinny, machine-gun shaped objects, please do so. Once you've done that, you'll need to add some dummy objects to indicate where the muzzle flashes should originate and in which direction the bullets should fly. This is what we'll do now.
Fixed guns are more common in aircraft. Guns, including both machine guns and cannons, are mounted by creating a dummy object and orienting it so that it fires in the proper direction. Guns are labeled as follows: gun_grp#b# (e.g. gun_grp0b0) Groups (grp) refer to the number of guns identified in the XDP file, where "grp0" is the first group. The next group is "grp1", and so on. Barrels allow you to create multiple flashes from a single group of guns by simply adding more barrels. Flexible-Mount GunsTypically, these are defensive guns mounted either at the rear of the cockpit or in a turret. There are created in much the same manner as fixed guns, except that they require two additional dummy nodes. From a hierarchy perspective, you will need the following: | |
|
gun0_l_r |
Dummy node with axes positioned such that (a) green axis points in line with barrel and is lined up so that it is 'shooting' at the gunner and (b) blue axis points up. Links to the vehicle fuselage or the cockpit. The gun will rotate wherever you place this object, so place this node at the base of the gun mount. The dummy object needn't be very large, so feel free to shrink it down to size. |
|
gun0_fore_aft |
Dummy node with axes positioned such that (a) green axis points in line with barrel and is lined up so that it is 'shooting' at the gunner and (b) red axis points up. Links to gun0_l_r. As with the previous node, place this node at the base of the gun mount. You may find it easier simply to clone gun0_l_r and rename it as gun0_fore_aft. Just remember that the axes must be oriented differently. |
|
gun_grp0b0 |
Same as in fixed guns. Links to gun0_fore_aft. Place this at the end of the gun barrel. |
|
Now we come to an important point ... but only if you are building a tank that has both a main cannon and a co-axial machine gun. This is a very common arrangement whereby the tank's main cannon has a machine gun mounted right next to it. As it happens, you will want to configure your turret slightly differently depending on whether you wish this version of your vehicle to be driveable or non-driveable. Here are the differences:
One point that I alluded to in the preceding discussion is that guns can be configured to seek out specific types of targets. I'm speaking here of the files in the Guns directory of CFS3. If you look through enough of the XDP files in this directory, you'll find that some have a parameter called Target Category. This can contain values like Wheeled, Tracked, Buildings, and so forth. Thus, it is important to select the most appropriate guns when configuring the XDP file for your vehicle. If you like, you can also configure the gunner's eyepoint to swivel in line with the barrel of the gun. To do so, simply link the eyepoint# to GUN#_FORE_AFT. Try positioning the eyepoint towards the back of the gun and just above so that the player can look along the entire length of the barrel. | |
|
No other subject caused me more anxiety than that of cockpits, notwithstanding assurances from the CFS3 forums that building them was a snap. Well, they are pretty easy to build - once you understand the basics.
I should also mention that virtual cockpits are only required if you are building a driveable vehicle. If not, then you can completely ignore this section. For the most part, your virtual cockpit will be made up of existing parts from your LOD_100. Thus, I recommend that you first finish building the external portions of your model and then map those textures. Once this is done, it will be very easy to clone any needed parts and to add them into your virtual cockpit. To make things simple, I'll describe this process through a quasi-tutorial. I will assume that you have finished building all of the required parts for your LOD_100. Let's assume that you're building a tank.
|
|
Before you begin painting your vehicle, you'll need to create a wireframe diagram of its pieces. Once you've created the wireframe diagram, you'll simply paint over top of it - the wireframe will help you judge where the hull ends, for example. Remember to keep a copy of the unpainted wireframe handy, just in case somebody wants to do a repaint of one of your models.
The simplest way to create a wireframe diagram is to take a bunch of screenshots of each of your parts. You'll need top and bottom screenshots for the wings, left and right shots for the fuselage, and so forth. For each screenshot, you'll press "Prnt Scrn" and then paste into your graphics program. Next, you'll clean up the screenshots by removing the background colour so that you're left with a bunch of wireframe mesh. Generally, the screenshots of your external parts should all be proportionately sized. The easiest way to maintain proportionality between separate screenshots is to capture them all from the same viewport but without changing scale or zooming in between screen captures. A few points to bear in mind:
Before you begin painting, jump to the next step to apply the wireframe images to your model. From here on in, it's just a matter of painting all of the parts so that they look right to you. Save your wireframe original somewhere safe and make a new copy to do the actual painting. When painting, remember to leave a bit of overlap at the edges. For a good tutorial on the whole screen capture process, see Hugh Shoult's "The Stupid Idiots' Guide to starting with gmax" at http://www.simviation.com/gryphon/tutorials/gMax_00.htm. |
|
Now that you've created your wireframe bitmaps, it's just a matter of applying them to the parts. First, you'll create textures within gmax (which are just combinations of bitmaps and settings, like opacity). Use the Material Navigator as directed below.
To create a texture in gmax, open the Material Editor. Click New, click the box next to Diffuse, click Bitmap, click Open, and select your bitmap. For exterior textures, you will also want to add a Specular Level which will be your 's' bitmap. You'll also want to click the tiny blue buttom that says 'Show Map in Viewport', which lets you see your bitmap in gmax - eventually. Close the Material Editor. By the way, the editor won't usually let you rename a texture when you first create it, so just configure it, save it, close the window, and then open it again to rename it. If you mess up the configuration, just delete the material and start over.
Applying textures is the next and final step. When it comes to texturing, gmax thinks of this as holding a bitmap over top of an object and then letting the pixels 'project' onto the part. In doing so, it will let you make the image larger or smaller and move it around and rotate it as well. Let's take this process one step at a time. Step 1 - Apply the Texture Step 2 - Add a Poly Select Modifier Once you've added the Poly Select, open the roll-down and select 'Polygon'. Then, you can either fence the entire object to select all of the polygons or you can just pick-and-click the polygons that you want to be textured. Step 2 - Add a UVW Map Modifier Here's how you do the math.
At this point, you may see something but it probably won't look quite right. Fiddle with the 'Alignment' section of the UVW Map modifier until you see a big orange box surrounding your object. You only have three choices, X, Y, and Z. Step 3 - Add an Unwrap UVW Modifier If you've calculated your UVW coordinates correctly, then the part will precisely match the size of the wireframe part. If you need to adjust things, just go back and edit the UVW Map coordinates. Also, make a note of the correct numbers as you will likely use them for other parts. That's pretty much it. Once you've mapped some of the polygons of a particular part, you can add another Poly Select, another UVW Map, and another Unwrap UVW to map some other parts. It's not unheard of to see stacks of ten or more modifers for a single part. For a good tutorial on basic texturing, get Milan Lisner's "gmax Texturing Tutorials Part 2". You'll find it at http://www.freeflightdesign.com/tutorials.html. |
|
It doesn't take much to export your vehicle to CFS3. Before you do, I recommend that you save your current version. Ensure that the vehicle when viewed from the TOP view has the nose pointing up. Then, select File and Export. Keep the name of the model short but descriptive.
Before you do your export, you will need to create Damaged versions of your vehicle. You can do this very quickly simply by mass-cloning your entire LOD_100 vehicle and linking the cloned hierarchy to Vhcl_Damaged_LOD_100. You'll also want to reassign the texture for these parts to the Damaged material. However, you won't need to re-do all of the texture mapping. Do the same for LOD_10. Two warnings will often appear during exports. The first relates to scaling. If you encounter these errors, just reset the scale for those parts on the Hierarchy menu, as we did in the tutorial. The second error relates to duplicate part names. In this case, you'll need to rename the parts. When you're in CFS3, perform as many checks as you can think of, paying particular attention to the rotation of wheels, gun flashes, and so forth. In addition, look closely at the textures you've applied. If they're distorted, then you may need to re-apply them. For these to operate, you must export the M3D file to a subdirectory of the Vehicles directory with the same name as the M3D file and the XDP. Take a glance at any of the existing vehicles and you'll immediately see the pattern. In addition, you'll need to modify the XDP file so that you have the right name, country, M3D file, number and type of guns, etc. These are the same as aircraft. You must export the M3D file to a subdirectory of the Aircraft directory. See the GMAX Aircraft tutorial for more details. One piece of good news is that flight models are much simpler for vehicles than for aircraft. In particular, contact points pretty much work the same for one vehicle as for any other. |
|
Driveable vehicles can be tested in Quick Combat. Just remember that trees, buildings, and various other objects will probably destroy you. Non-driveable vehicles can be tested by including them in a mission.
For my tests, I generally use a mission which includes an existing driveable vehicle. This allows me to weave amongst the models being tested. Also, I include a few enemy trucks to give them something to shoot at. Muzzle flashes will cofirm that the guns are working properly, and a few shots from my own vehicle's cannon will quickly confirm whether the damaged models are appearing correctly or not. |
|
You're done! That is, you're probably done reading this document. Congratulations to you if you've just finished building a vehicle!
As this has been an overview, a lot of detail has been left out. This is an immense subject area and you could probe much further in any area. My goal has been to give you an overview of the entire process. Now that you can find your way into and out of the woods, you can explore the trees on your own. |
|
Microsoft's SDK recommends creating the illusion of moving tracks by swapping differently textured objects in and out. However, I have observed that this tends to create a most displeasing flickering motion which detracts from the vehicle's appearance. As a result, many designers equip their vehicles with smooth treads and leave things along.
However, if you are patient, there is another method which I will teach. This method allows you to include actual moving tracks on your vehicle by using key frame animation. As noted earlier, this type of animation allows any object named key_frame_animation (or key_frame_animation_00, key_frame_animation_34, etc) to move along a defined path. In the steps below, I will outline the process so that you can try it for yourself. Beware, however, that creating animated tracks may require 4 hours or more of highly repetitive work!
I hasten to add that the amount of detail on your model is suitable only for LOD_100. Therefore, it is CRITICAL that you build lower LODs with reduced levels of detail in order to make your model more efficient. By LOD_70 you will want to replace your detailed tracks with a much simpler, non-animated version. By LOD_50, a single cylinder can be used to capture all of your suspension detail; for texturing, include a screen capture of all the suspension detail in a single image so the painters can include one for you. |