Difference between revisions of "Blender2P3D/FSX"

From FSDeveloper Wiki
Jump to: navigation, search
Line 4: Line 4:
 
| imageright = [[Image:Broom icon.jpg|40px]]
 
| imageright = [[Image:Broom icon.jpg|40px]]
 
| style = width: 100%; color: black; background:#EFFFB0; font-style: italic
 
| style = width: 100%; color: black; background:#EFFFB0; font-style: italic
| text = The current version of the '''Blender2P3D/FSX''' addon is '''v1.0.2'''.  The '''Blender2P3D/FSX toolset''' is an addon for [http://www.blender.org/download/ Blender].|] }}
+
| text = The current version of the '''Blender2P3D/FSX''' addon is '''v1.0.2'''.  The '''Blender2P3D/FSX toolset''' is an addon for [http://www.blender.org/download/ Blender] which can be used for FSX (including FSX: SE) and P3D 3-D Modeling.|] }}
 
[[Category:Tools]]
 
[[Category:Tools]]
 
[[Category:Blender]]
 
[[Category:Blender]]
Line 92: Line 92:
 
== Animations ==
 
== Animations ==
 
[[Image:Blender2p3dfsx animation tool.jpg|thumb|left|The Animation tool of the Blender2P3D/FSX toolset.]]
 
[[Image:Blender2p3dfsx animation tool.jpg|thumb|left|The Animation tool of the Blender2P3D/FSX toolset.]]
To register an animation for a P3D/FSX asset, open the ''P3D/FSX Animation Tool'' panel. You will be presented with a list of animations, as found in the modeldef.xml file. To assign an animation to a selected object, choose it from the list and click on ''Assign''. You can use the search function to filter the list for certain keywords, click on the little arrow on the bottom of the list to expose the search bar.
+
To register an animation for a P3D/FSX asset, open the ''P3D/FSX Animation Tool'' panel. You will be presented with a list of animations, as found in the modeldef.xml file. To assign an animation to a selected object, choose it from the list and click on ''Assign''. You can use the search function to filter the list for certain keywords, click on the little arrow at the bottom of the list to expose the search bar.
 
[[Image:Blender2p3dfsx object properties.jpg|thumb|right|Object properties for the Blender2P3D/FSX toolset.]]
 
[[Image:Blender2p3dfsx object properties.jpg|thumb|right|Object properties for the Blender2P3D/FSX toolset.]]
 
Once an animation has been assigned, make sure to enter an animation length in the object's properties as well. Open the objects properties panel and scroll to the ''P3D/FSX Properties'' section. Here, you'll find the properties of the attached animation as well as a list of all utilized attachpoints for that object.
 
Once an animation has been assigned, make sure to enter an animation length in the object's properties as well. Open the objects properties panel and scroll to the ''P3D/FSX Properties'' section. Here, you'll find the properties of the attached animation as well as a list of all utilized attachpoints for that object.
Line 99: Line 99:
  
 
== Attachpoints ==
 
== Attachpoints ==
Open the Attach Tool to access the various options for attachpoints. You can activate or deactivate a number of different functions by clicking on the corresponding buttons in the list. The buttons turn blue when active. Don't forget to assign the selected attachpoint and its parameters to an object by selecting the object in the scene and clicking on ''Attach'' on the bottom of the panel.
+
 
 +
Open the Attach Tool to access the various options for attachpoints. You can activate or deactivate a number of different functions by clicking on the corresponding buttons in the list. The buttons turn blue when active. Don't forget to assign the selected attachpoint and its parameters to an object by selecting the object in the scene and clicking on ''Attach'' at the bottom of the panel.
 
To see what attachpoints are active for any given object in the scene, select the object and open the object properties. Under ''P3D/FSX Properties'', you'll find a list of all attachpoints under the animation properties for the selected object.
 
To see what attachpoints are active for any given object in the scene, select the object and open the object properties. Under ''P3D/FSX Properties'', you'll find a list of all attachpoints under the animation properties for the selected object.
 +
 
=== Effects ===
 
=== Effects ===
 +
 
[[Image:Blender2P3DFSX attach effect.jpg|thumb|left|Attachpoint properties for effects.]]
 
[[Image:Blender2P3DFSX attach effect.jpg|thumb|left|Attachpoint properties for effects.]]
 
To attach an effect to an object in your scene, click on the ''Effect'' button in the P3D/FSX Attach Tool panel. This will extend the panel and allow you to specify the parameters of the effect you'd like to attach.
 
To attach an effect to an object in your scene, click on the ''Effect'' button in the P3D/FSX Attach Tool panel. This will extend the panel and allow you to specify the parameters of the effect you'd like to attach.
Line 108: Line 111:
 
* '''Param''': define paramters for the effect. Those can be, for instance, conditions for the effect to trigger. Refer to the P3D/FSX SDK for more information on valid syntax for this field.
 
* '''Param''': define paramters for the effect. Those can be, for instance, conditions for the effect to trigger. Refer to the P3D/FSX SDK for more information on valid syntax for this field.
 
<br clear=all>
 
<br clear=all>
 +
 
=== Visibility ===
 
=== Visibility ===
 +
 
[[Image:Blender2P3DFSX attach visibility.jpg|thumb|left|Attachpoint properties for visibility.]]
 
[[Image:Blender2P3DFSX attach visibility.jpg|thumb|left|Attachpoint properties for visibility.]]
 
Add a visibility tag to the selected object by clicking on ''Visibility'' on the P3D/FSX Attach Tool panel. This will open a list of available visibility tags, which you can attach to a selected object in the scene using the "Attach" button.
 
Add a visibility tag to the selected object by clicking on ''Visibility'' on the P3D/FSX Attach Tool panel. This will open a list of available visibility tags, which you can attach to a selected object in the scene using the "Attach" button.
Line 114: Line 119:
  
 
=== MouseRect ===
 
=== MouseRect ===
 +
 
[[Image:attach mouserect.jpg|thumb|left|Attachpoint properties for mouserects.]]
 
[[Image:attach mouserect.jpg|thumb|left|Attachpoint properties for mouserects.]]
 
To add a mouserect to the selected object in the scene, click on ''Mouse Rect''. This will reveal a dropdown list of all available mouserects, as defined in the modeldef.xml file.
 
To add a mouserect to the selected object in the scene, click on ''Mouse Rect''. This will reveal a dropdown list of all available mouserects, as defined in the modeldef.xml file.

Revision as of 14:14, 3 December 2022

This addon is a continuation of the Blender2FSX Toolset manual and it incorporates compatibility with the latest API for Blender version v3.x.x and above. The new toolset also features full support of PBR materials for Lockheed Martin's Prepar3D v4.4 and above, as well as some changes to the interface and file structure of the addon. This wiki will help you install and use the new toolset.

Installation

Requirements

  • Windows 11 and 10
  • Microsoft Flight Simulator X SDK including updates to SP2 or Acceleration or
  • Lockheed Martin Prepar3D SDK v1.x, v2.x, v3.x, & v4.x (FSX Steam Edition should use the Prepar3D SDK v1.x)

Make sure that ALL SDKs that you are using are installed prior to installing/ activating this Toolset!

Setup

After downloading the add-on, open Blender 3.x.x and open the Preferences (Edit->Preferences). Navigate to the "Add-ons" tab and click on "Install...". In the file manager, navigate to where you have downloaded the Toolset file, select it and click on "Install Add-on". This will extract the content of the zip file to your Blender script folder (by default under %APPDATA%\Blender Foundation\Blender\<version number>\scripts\addons). Next, you need to activate the addon by clicking on the check-mark next to "3DView: P3D/FSX Toolset". That should enable the addon and the various panels and properties. Close the Preferences window.

To ensure that the addon was correctly installed, press "N" on your keyboard while the mouse pointer is in one of the main viewports. This should open the main panels of the addon under the tab named "P3D/FSX".

Using the Tools

Overview

P3D/FSX Toolset panels

Once installed, the Blender2P3D/FSX toolset will append the list of toolkit panels in your viewport. Press "N" to open or close the list of tools. There will be a new entry named "P3D/FSX", which gives access to the tools of this addon. The different tools are organized in different panels, which are grouped by function. The addon adds object properties to the scene. These properties are for instance the references to the various SDKs you can utilize or object properties like attached animations or scenery properties. Furthermore, the addon will append the material parameters by P3D or FSX specific parameters. Lastly, the addon extends the exporter capabilities and allows you to export your scene to an x-file format and from there calls XToMdl.exe to generate a Prapar3D/Flight Simulator X compatible 3d model.

Setting up your scene

To ensure that your 3d asset export properly to Prepar3D or Flight Simulator X, you must make sure to prepare and configure the Blender scene. To get started, open the toolset panels by pressing "N" on your keyboard with the main viewport in focus. This will open a list of panels you have currently activated in your Blender configuration. Click on the tab "P3D/FSX" to bring up the panels of the Blender2P3D/FSX toolset.

Configure the SDK

Firstly, go to the P3D/FSX Toolset Settings and select which SDK you would like to utilize. If "Auto Detect SDK path" is enabled, simply click on "Initialize the SDK". The addon will then look up the file paths of the SDK in the Windows registry. This method should work in 99% of the cases, however, if the Addon cannot find the file paths, you can also use the Manually Find ModelDef file option to set up the path. Please note that it is necessary to initialize the SDK every time you restart Blender, or load a new scene. This way you ensure that all entries of the modeldef.xml are properly loaded into Blender.

Configure the scene

In order for your 3d asset to export properly, you have to ensure that both a GUID and a friendly name are assigned to your scene. To do so, open the P3D/FSX File Properties panel and type the friendly name in the first edit box. You can use the button Generate GUID to automatically generate a valid GUID for your scene. Alternatively, you can generate the GUID externally and copy and paste the string into the GUID edit box.

Scenery properties

Scenery tool of the Blender2P3D/FSX addon.

[feel free to enter the information here.]

Quicksave information

With the latest update of the toolkit, you'll be able to quicksave the location data of your scene. To do so, go to the Load/Save scenery data section, enter a location name and click on Add Location. This will save all settings of latitude, longitude, etc. into an XML file on your hard drive. To recall any of those previously saved datasets, click on Load Location, to open a list of names of previously saved locations. Select the location you wish to load and click on LOAD. This will populate all fields of the Scenery Tools with those from the XML file.

Note that there is currently no interface to remove entries from the list. But if you'd like to edit or update your quick-save list, you can find the XML file in the following location: %APPDATA%\Blender Foundation\Blender\<version number>\config\p3d_locations.xml

The addon will try to load the XML file whenever you initialize the SDK (see [Setting up your scene]). There will be a warning message in the system console of Blender if the file wasn't found on your hard drive. You can safely ignore this warning if you don't use this feature of the toolset.

Animations

The Animation tool of the Blender2P3D/FSX toolset.

To register an animation for a P3D/FSX asset, open the P3D/FSX Animation Tool panel. You will be presented with a list of animations, as found in the modeldef.xml file. To assign an animation to a selected object, choose it from the list and click on Assign. You can use the search function to filter the list for certain keywords, click on the little arrow at the bottom of the list to expose the search bar.

Object properties for the Blender2P3D/FSX toolset.

Once an animation has been assigned, make sure to enter an animation length in the object's properties as well. Open the objects properties panel and scroll to the P3D/FSX Properties section. Here, you'll find the properties of the attached animation as well as a list of all utilized attachpoints for that object. You can also delete an animation by clicking on the Clear button.

Attachpoints

Open the Attach Tool to access the various options for attachpoints. You can activate or deactivate a number of different functions by clicking on the corresponding buttons in the list. The buttons turn blue when active. Don't forget to assign the selected attachpoint and its parameters to an object by selecting the object in the scene and clicking on Attach at the bottom of the panel. To see what attachpoints are active for any given object in the scene, select the object and open the object properties. Under P3D/FSX Properties, you'll find a list of all attachpoints under the animation properties for the selected object.

Effects

Attachpoint properties for effects.

To attach an effect to an object in your scene, click on the Effect button in the P3D/FSX Attach Tool panel. This will extend the panel and allow you to specify the parameters of the effect you'd like to attach.

  • Name: set an attachpoint name for the object.
  • Effect: type the filename of the effect you would like to attach to the object.
  • Param: define paramters for the effect. Those can be, for instance, conditions for the effect to trigger. Refer to the P3D/FSX SDK for more information on valid syntax for this field.


Visibility

Attachpoint properties for visibility.

Add a visibility tag to the selected object by clicking on Visibility on the P3D/FSX Attach Tool panel. This will open a list of available visibility tags, which you can attach to a selected object in the scene using the "Attach" button.

MouseRect

Attachpoint properties for mouserects.

To add a mouserect to the selected object in the scene, click on Mouse Rect. This will reveal a dropdown list of all available mouserects, as defined in the modeldef.xml file.

Platform

Attachpoint properties for platforms.

You can define an object as a "platform" by activating Platform in the P3D/FSX Attach Tool panel. Make sure to select a surface property for the platform in the dropdown list.

No Crash

Enable the no crash flag for the selected object in the scene by clicking on No Crash in the P3D/FSX Attach Tool panel.

Empty

Attachpoint properties for empty attachpoints.

You can also attach an empty attachpoint to an object in the scene by clicking on Empty in the P3D/FSX Attach Tool panel. This will enable you to assign a name for the attachpoint. These empty attachpoints can be used for instance to create various equipment for aircraft carriers. Simply assign one of the keywords to the object to trigger the wanted behavior of the object. Valid names are:

  • attachpt_catapult_start_n,
  • attachpt_catapult_end_n,
  • attachpt_blast_shield_n,
  • attachpt_runway_start,
  • attachpt_runway_end,
  • attachpt_runway_edg,
  • attachpt_cable_n_1,
  • attachpt_cable_n_2.


Material parameters