Difference between revisions of "MDL Tweaker II"

From FSDeveloper Wiki
Jump to: navigation, search
 
(Installation)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Infobox-Applicable-FSVersion
 +
| FSXI = false
 +
| FSXA = false
 +
| FSX = false
 +
| FS2004 = true
 +
| FS2002 = false
 +
| FS2000 = false
 +
| FS98 = false
 +
}}
 +
 
This is the manual of MDL Tweaker II. At the moment a beta version of this tool is available. So as the tool is still under development it might be that the manual is not always up to date. Still this manual should give you enough information to get started with MDL Tweaker II. Any additions or suggestions on how to improve this manual and which functionality needs to be explained in more detail are welcome.
 
This is the manual of MDL Tweaker II. At the moment a beta version of this tool is available. So as the tool is still under development it might be that the manual is not always up to date. Still this manual should give you enough information to get started with MDL Tweaker II. Any additions or suggestions on how to improve this manual and which functionality needs to be explained in more detail are welcome.
  
Line 9: Line 19:
 
If you have downloaded the ZIP version, please make sure that you register the AgSdLib.dll file correctly with windows. This can be done with the regsvr32 command, but you can also use the batch (BAT) files provided in the ZIP file you downloaded.
 
If you have downloaded the ZIP version, please make sure that you register the AgSdLib.dll file correctly with windows. This can be done with the regsvr32 command, but you can also use the batch (BAT) files provided in the ZIP file you downloaded.
  
To make use of the object preview, you will need to install the latest version of the graphical DLL files by Martin Wright as well. You can get these DLL files from his [http://www.mnwright.btinternet.co.uk homepage].
+
To make use of the object preview, you will need to install the latest version of the graphical DLL files by Martin Wright as well. You can get these DLL files from his [http://www.mwgfx.co.uk/ homepage].
  
 
If you ever want to uninstall MDL Tweaker II, you can run the uninstall program that is located in your MDL Tweaker II folder. You can also start this uninstaller from the "Add or remove software" section of the control panel. If you used the ZIP file distribution you can just delete the folder you placed the files in.
 
If you ever want to uninstall MDL Tweaker II, you can run the uninstall program that is located in your MDL Tweaker II folder. You can also start this uninstaller from the "Add or remove software" section of the control panel. If you used the ZIP file distribution you can just delete the folder you placed the files in.
Line 61: Line 71:
 
To add a new condition you first need to press the "New condition" button. After that you can alter the properties of the condition. When you change the condition type, the visibility of the other choices will be updated as needed. If you select multiple Between or Mask conditions, you can choose how they determine the visiblity of the object. See the table below for the options:
 
To add a new condition you first need to press the "New condition" button. After that you can alter the properties of the condition. When you change the condition type, the visibility of the other choices will be updated as needed. If you select multiple Between or Mask conditions, you can choose how they determine the visiblity of the object. See the table below for the options:
  
<pre>AND All conditions must be true for the object to display
+
* AND: All conditions must be true for the object to display
OR   One condition must be true for the object to display
+
* OR: One condition must be true for the object to display
NOT All conditions must be false for the object to display
+
* NOT: All conditions must be false for the object to display
NOR One condition must be false for the object to display</pre>
+
* NOR: One condition must be false for the object to display</pre>
  
 
You need to press the Apply to object button before the conditions are stored in the MDL object. The next time you load your tweaked MDL object, you will see the conditions in the list again.
 
You need to press the Apply to object button before the conditions are stored in the MDL object. The next time you load your tweaked MDL object, you will see the conditions in the list again.
Line 153: Line 163:
 
* Save: Save the MDL file you tweaked to disk. You get the option to choose a name, so that the origional is not overwritten.
 
* Save: Save the MDL file you tweaked to disk. You get the option to choose a name, so that the origional is not overwritten.
 
* Export:
 
* Export:
  * BGLC source: Export the MDL object as a BGLC source (ASM) file. This option is not functional yet and only serves debugging purposes at the moment.
+
** BGLC source: Export the MDL object as a BGLC source (ASM) file. This option is not functional yet and only serves debugging purposes at the moment.
  * OpenFlight: Export the MDL object as an OpenFlight file, this is a file format often used in professional flight simulators.
+
** OpenFlight: Export the MDL object as an OpenFlight file, this is a file format often used in professional flight simulators.
 
* Exit: Closes MDL Tweaker.
 
* Exit: Closes MDL Tweaker.
  
Line 180: Line 190:
 
== Support and feedback ==
 
== Support and feedback ==
  
This is still a beta version of MDL Tweaker II, so I am sure there will be faults and errors in it. So if you found a problem, or if you have comments or suggestions on how to improve this tool, please let me know. You can reach me either by [mailto:arno@scenerydesign.org email] or through the forums of my website [[http://www.fsdeveloper.com FsDeveloper.com].
+
This is still a beta version of MDL Tweaker II, so I am sure there will be faults and errors in it. So if you found a problem, or if you have comments or suggestions on how to improve this tool, please let me know. You can reach me either by [mailto:arno@scenerydesign.org email] or through the forums of my website [http://www.fsdeveloper.com FsDeveloper.com].
  
 
== Wishlist ==
 
== Wishlist ==
Line 206: Line 216:
  
 
[[category:Manuals]]
 
[[category:Manuals]]
 +
[[Category:FS9_(FS2004)]]
 +
[[Category:Tools]]

Latest revision as of 17:12, 29 November 2012

This is the manual of MDL Tweaker II. At the moment a beta version of this tool is available. So as the tool is still under development it might be that the manual is not always up to date. Still this manual should give you enough information to get started with MDL Tweaker II. Any additions or suggestions on how to improve this manual and which functionality needs to be explained in more detail are welcome.

MDL Tweaker II is a tool that allows you to alter MDL scenery objects, without having to edit the source code yourself. The tool can read the binary MDL file and alter it for you. For example to add additional conditions on the display of the object or to add seasonal textures to it. This manual will describe all the options.

Installation

The installation procedure of MDL Tweaker II depends on the version you have downloaded. If you have downloaded one of the installers, then you only need to run that installer and you are ready to go. If you have chosen to download the ZIP file version, you need to unzip the content of the file to a folder of your choice.

If you have downloaded the ZIP version, please make sure that you register the AgSdLib.dll file correctly with windows. This can be done with the regsvr32 command, but you can also use the batch (BAT) files provided in the ZIP file you downloaded.

To make use of the object preview, you will need to install the latest version of the graphical DLL files by Martin Wright as well. You can get these DLL files from his homepage.

If you ever want to uninstall MDL Tweaker II, you can run the uninstall program that is located in your MDL Tweaker II folder. You can also start this uninstaller from the "Add or remove software" section of the control panel. If you used the ZIP file distribution you can just delete the folder you placed the files in.

The interface

The interface of MDL Tweaker II has been designed so that it is easy to use for a novice user who just wants to make a few basic tweaks, but on the other hand it also contains a lot more options for the experienced designer, once you dive a bit deeper into the different forms.

Below you see the main screen of MDL Tweaker II that you see once you have started the tool. Based on the MDL file you load, different options can be available.

Mt2 main.jpg

The buttons on the left give you easy access to some basic tweaks. For the moment these are:

  • Remove the shadow (or add it back again)
  • Fix the problem that BGL_LIGHT lights do not appear after exporting with the Fs2004 version of MakeMDL
  • Add a condition to the display of the object
  • Add seasonal textures to the object

The buttons on the right give you access to more detailed forms, that show you all kind of details about the MDL file. At the moment these buttons give you access to:

  • The material list, shows all materials applied on the MDL object
  • The texture list, shows all textures applied on the MDL object and allows you to add night or seasonal textures
  • The vertex list, shows all vertices of the MDL object and allows you to alter them or their normals
  • The BGL command list, shows you all the commands that actually draw your object
  • Statistics, shows you some stats about your object

Object preview

Besides the main form, you will also see a preview form when you have started MDL Tweaker II. In this form a preview of your MDL object is shown. You can use the mouse to navigate in this preview, if you keep the left button pressed you can pan the object and if you keep the right button pressed you can rotate the object. To zoom in or out use the slider at the top, the values shown in the tooltip are a percentage. The default zoom value is 100 and that should show your entire object on screen properly.

If the textures do not show up in the preview, MDL Tweaker II can probably not find them. You can specify the search path for the textures in the options.

Mt2 preview.jpg

Condition manager

The condition manager allows you to add conditions to the display of the total object.

Mt2 condition.jpg

At the moment the following types of conditions are supported:

  • Between: The value of the given variable is checked and if it is between the supplied values the object is shown
  • Mask: The bitmask of the given variable is checked and if all bits of the supplied value are set the object is shown
  • Rotate to user: This will rotate the object around its 0,0 point to the user
  • Rotate with wind: This will rotate the object around its 0,0 point with the direction of the wind

Mt2 condition type.jpg

To add a new condition you first need to press the "New condition" button. After that you can alter the properties of the condition. When you change the condition type, the visibility of the other choices will be updated as needed. If you select multiple Between or Mask conditions, you can choose how they determine the visiblity of the object. See the table below for the options:

  • AND: All conditions must be true for the object to display
  • OR: One condition must be true for the object to display
  • NOT: All conditions must be false for the object to display
  • NOR: One condition must be false for the object to display</pre>

You need to press the Apply to object button before the conditions are stored in the MDL object. The next time you load your tweaked MDL object, you will see the conditions in the list again.

Mt2 condition added.jpg

Material list

The material list shows all the materials that are applied on your object. You can alter the attributes of these materials and once you press the update material button they are stored in the MDL object again.

Mt2 material.jpg

Texture list

The texture list shows you all textures that are applied to your object. It gives you the ability to add change their settings or add night or seasonal textures.

The Check texture sizes button makes sure that the texture size as stored in the texture list is updated based on the model. This can be used to correct this size, so that you do not get problems with blurry textures, because the wrong mipmap is displayed.

Mt2 texture.jpg

To add new variants to a texture, you need to select the checkbox next to the season you want. Make sure that you enter the correct days for this season. The values you enter must cover the entire year, there can not be any gaps in the days. To prevent you from keeping to type the values for your location all the time, you can enter the default values in the Options.

You need to press the Update texture button before any changes are stored in the MDL object. Once you do that the texture list will also update. If you click on a texture in the list, any seasonal variant of the same texture will be selected as well. If you want to alter some properties of that texture alone, you need to Alt-click on it.

Mt2 texture seasonal.jpg

Vertex list

The vertex list shows all vertices that are being used in your model. This list allows you to tweak the coordinates of these vertices, their normals and their texture mappings. If you have selected different rows in the list (does not matter which column you select), you can use the "Unify normals" button to make sure that the normals of all these vertices are the same. This results in an uniform shading in FS (like the autogen trees have). You can specify the direction of the normal in the options.

Mt2 vertex.jpg

To make it a little easier to select all polygons that belong to a certain part of your object, you can also use the texture dropdown box at the bottom. Choose the texture you want to select there and then press the "Select by texture" button.

Mt2 vertex select.jpg

To enter the edit mode you need to press Enter and the background color will change to indicate your are editing. After that you can enter the new values you want. Only the number 0 to 9 and the dot are valid characters you can enter.

Mt2 vertex edit.jpg

BGL command list

The BGL command list shows all the BGL commands that are defined in the BGL section of your MDL file. Basically these define how your object is actually drawn. At this moment this list only has the purpose to show you these commands (a bit like looking in the ASM source code). In the future editing functionality will be added to this list as well.

Mt2 bgl.jpg

If you click on a command, its parameters are shown in the grid on the right. If the command performs a jump to a certain offset, the destination of that jump will be highlighted in the BGL command list as well.

Mt2 bgl jump.jpg

Object statistics

The statistics window gives you an overview of some of the statistics of your object. For example how many vertices and triangles it uses. But also how many textures it has (and how many of these are seasonal and night variants). The number of state changes indicates how often a different material/texture combination is set as the active drawing state.

Besides this information, this form will also show you the bounding box of your object and some of the parameters contained in the header of the MDL object. You can change these, but be aware that this might make the MDL file invalid.

Mt2 statistics.jpg

Options

The options screen lets you specify a few preferences. These are:

  • Seasonal suffixes, you can specify which texture name suffix is used for which season. This information is used when you create new seasonal textures, but also to determine which textures are seasonal variants when you load a MDL file.
  • Seasonal days, you can specify at which day of the year the different seasons start for your geographical location. This ensures that you do not have to enter the same information over and over again on the texture list screen. Please make sure that the days of all seasons that you use fit together, there can not be a gap in the days.
  • Unify normals direction, you can specify the direction of the normal that is used with the unify normals option on the vertex form. For GMax objects the default values should be correct, but if you are using FSDS3 you might need to change them.
  • Texture searchpath, here you specify all folders that will be scanned for the textures of the object preview. The "a" button allows you to add a new path and the "x" button allows you to remove one. With the "r" option you can enter a relative path (relative to your MDL location that is).
  • OpenFlight texture format, you can specify the prefered texture format when exporting an object to the OpenFlight format.

Mt2 options.jpg

Event log

The event log shows you want happened while you were working with your object. You can find messages here showing the tweaks you apply, but also warnings when a texture could not be found. So if you see something weird in the preview, checking the event log is a good thing to do first.

Mt2 log.jpg

Menus

This section describes all the options that you can find in the different menus.

File menu

  • Open: Open a MDL file from disk.
  • Save: Save the MDL file you tweaked to disk. You get the option to choose a name, so that the origional is not overwritten.
  • Export:
    • BGLC source: Export the MDL object as a BGLC source (ASM) file. This option is not functional yet and only serves debugging purposes at the moment.
    • OpenFlight: Export the MDL object as an OpenFlight file, this is a file format often used in professional flight simulators.
  • Exit: Closes MDL Tweaker.

Tools menu

  • OpenFlight converter: Open a converter screen, that allows you to batch convert MDL objects to the OpenFlight format.
  • BGL browser: Show/hide the BGL browser window. This window allows you to open a library BGL and load the MDL objects contained in there into MDL Tweaker. These objects are opened as read-only.
  • Options: Shows the options dialog.

Window menu

  • Object preview: Show/hide the object preview window.
  • Material list: Show/hide the material list window.
  • Texture list: Show/hide the texture list window.
  • Vertex list: Show/hide the vertex list window.
  • BGL command list: Show/hide the BGL command list window.
  • Statistics: Show/hide the statistics window.
  • Event log: Show/hide the event log window.

Help menu

  • Manual: Show the manual (not yet active).
  • About: Shows an about screen for MDL Tweaker.

Support and feedback

This is still a beta version of MDL Tweaker II, so I am sure there will be faults and errors in it. So if you found a problem, or if you have comments or suggestions on how to improve this tool, please let me know. You can reach me either by email or through the forums of my website FsDeveloper.com.

Wishlist

This tool is not yet finished, but it has been released already because a the functionality it already contains will certainly be useful to you already. Here is an overview of some of the things that are on the wishlist for future updates:

  • Read translation and animation tables correctly
  • Read the crashbox information and display it in the object preview
  • Allow interactive editing of the BGL command list
  • Allow conditions to be inserted around parts of the object, not only the entire object

Users license

When using MDL Tweaker II you agree to the following user license:

I do hereby agree that I will only use MDL Tweaker II to change objects I have created myself. I will no change the work of others, without their prior written permission. This does include any objects obtained by decompilation of BGL files.

(c) 2005-2006 SceneryDesign.org / Arno Gerretsen

This software program is distributed without charge to other scenery designers, redistribution of the original installer EXE file is allowed. You are NOT allowed to sell this software program or ask money for its distribution. BGL files created with this software program can be used in commercial scenery projects if you wish.

The copyright and any intellectual property relating to this program remain the property of the author.

The software distributed in this way may represent work in progress, and bears no warranty, either expressed or implied.