Resource icon

P3Dv4 Tutorial: Adding New Gauge Polygons to the Virtual Cockpit (without the source file)

This tutorial will show you how to place gauges on virtually any non-animated surface in the VC. This has only been tested with the P3Dv4 SDK, but I imagine it will work for FSX as well. This is useful in many ways, particularly if the aircraft has things such as a non-functioning weather radar, dummy gauges, or just a blank area that you wish to add something to. Please remember that modifying someone else's work does not make it your own; if you use this technique, you may not distribute modified files without permission of the copyright holder.

I've written this for people who have never touched MCX before, but I am assuming the reader knows how to use 3DS Max and image editing software. If you're someone who knows what you are doing, you will probably have your own techniques for certain steps and you will definitely notice that many of my steps are optional or unnecessary. I have written this to be as foolproof as I can for anyone who isn't familiar with how VC gauges and FS modelling works.

Prerequisites:
ModelConverterX (Make sure you have the latest version)
P3Dv4 SDK
3DS Max with P3D SDK tools enabled

Optional:
FS Panel Studio (will make your life a lot easier)
Photoshop or similar image editing program

Here's a simplified version of the process for people who already understand MCX and the P3D SDK:
  1. Load your VC into MCX
  2. Isolate the modelpart that you wish to add a gauge polygon to
  3. Export as an OBJ
  4. Import the OBJ into 3DS Max, set the material as a P3D material
  5. Select the polygons you want to turn into gauge polygons, and detach them into a separate object
  6. Apply a new material to the new object; set it as a virtual cockpit texture
  7. Export as an X file, load it into MCX, export as an MDL
  8. Merge the new MDL into the original VC MDL, delete the original modelpart
  9. Export the new VC MDL, add a new VCockpit entry to the panel.cfg, and add gauges to your heart's content
If you didn't follow that, here's a more detailed tutorial based on an example:

Part 1: Setting Up MCX and 3DS Max Settings

Open MCX and click on "Options."


Most of these do not matter, but the options necessary for this are highlighted in green:


For 3DS Max, make sure your units are set up correctly. I also recommend working in orthographic mode for this project.



Part 2: Isolating what you want to edit

In this example, we are going to add working instruments and a radar screen to the TSO station on the default C-130. Right now, there is no way to add gauges to it:


Open MCX, Select "Import," browse to and open the interior model for the aircraft you are trying to add the polygon to.


You may notice a lot of missing parts and textures. The missing parts are to be expected for the interior model, but the missing textures are because MCX cannot find them. This is because textures common to all versions of the C-130 are stored elsewhere to save space. P3D has better support for this than MCX, so it will still look correct in the sim.


Zoom in to the area you want to add gauges to.


Open the Material Editor.


With the "Highlight Selected" box checked, use the arrow keys to flip through the materials until the area we want to add gauges to is highlighted. Do not worry if a bunch of extra objects are highlighted as well.


Even if it's displaying correctly, make a note of the material name (in this case "c130_c4_t"). The next few steps (in blue) are optional, but can help MCX find the missing texture.

Now we know what texture we are looking for. You can read the texture.cfg to help find it. Once you find the texture file, copy it over to the folder for the livery that MCX loaded.


Reload the model (hit the green refresh button in MCX). Now the part we care about has visible textures, making it much easier to work with.


Open the Object Hierarchy Editor:


In the search bar, enter the name of the material you found earlier:


Select the item labeled "ModelPart," then hit "Isolate"


Select "Export Object" from the top left of the screen, and save the file as a Wavefront OBJ. Name it something you can remember.


Close MCX, do not save/overwrite the MDL.


Part 3: Adding the Gauge Polygon

In your image editing software, create a 1024x1024 image. This is the texture you will apply to the gauge polygon. For simplicity in this example, we are going to turn the entire flat area on the TSO panel into a gauge polygon, so I copied details from the original texture to fill in the extra space around the gauges we will place later:


Save the file as a bitmap starting with "$," and put it in the panel folder of the aircraft. You can rename it to whatever you want after the final MDL has been exported.


Open 3DS Max, and import the .obj file you created. Use these settings on import:


Your model should look like this. The textures will probably be upside down; this is normal and does not need to be fixed.


In order to successfully export to P3D, you must set up your materials correctly. Open the Material Editor and change the material type from "standard" to "P3D." Apply the texture you identified earlier (not the one you just made) as a diffuse map.


Select the Polygons you wish to add gauges to, and detach them into their own object.


Now, create a new material with these settings:


Add the image you created as a diffuse map, and apply it to the new object:


Run the P3D Export and LOD tool. Create a GUID and friendly name (does not matter what it is). Do not build an MDL, save the .x file somewhere you will remember it.



Part 4: Re-Inserting into the original model and exporting to P3D

Open MCX and import the .x file you just created. Do not worry if it appears untextured.


Export the model as a P3Dv4 MDL. Do not overwrite any existing MDL.


Import the original VC model, open the hierarchy editor, and navigate to the part you isolated earlier. Remove it:


Click the "Merge Objects" button.


Browse to the MDL you exported from the .x file you created in Max:


Make sure the LOD settings match (some VC models are not at 100), and hit "Merge."


Now, the model you created in 3DS Max should appear in the VC. The gauge polygons are displayed with a checkerboard texture by MCX.


Export the model as a P3Dv4 MDL, overwriting the original (make sure you backed it up!)


Part 5: Adding gauges to the new gauge polygon

If your polygon is entirely filled by gauges with no empty space, you can delete the bitmap you created at the beginning of part 3. If not, keep it in you panel folder. You can rename it if you wish, I have chosen not to. Add the following entry to your panel.cfg (make sure you change the number in [VCockpitXX] to the next number):


From here, you can add gauges manually. I prefer to use FS Panel Studio:


Load up P3Dv4. If you did everything correctly, you should now have gauges in places you never thought possible:


The above example looks terrible, but it also took less than an hour to create. There are a lot of possibilities for what you can do with this technique.
Author
TurboCompound
First release
Last update
Rating
3.33 star(s) 3 ratings

Share this resource

Latest reviews

Thanks for putting this together. It is great work!
A little more expansion on some things for those new to 3DS Max would be great though if you got time to update it. I managed to get things working after a bit of trial and error. I used a different panel on the C130.
I don't agree with the previous comments about copyright - unless you are distributing modified files I couldn't ever see it breaching copyright to edit models for your own use. Modifying files and 'tweaking' has been the going trend in FS since before I started using it in the late 90's! All credit goes to every developer though, it's great to have a vibrant FS community.
This script shows copyright violation. Source-File owners have no chance to protect the model file!
T
TurboCompound
ModelConverterX has been around for years, I'm merely telling people how to use it. If you have a problem, take it up with the devs for MCX. That being said, if people edit models for their own use I really don't see the problem.
An excellent tutorial. Many many thanks. Thank you for taking the time to help.
Top