• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v5 Blender2P3D/FSX

Messages
591
Country
france
Hi,

First some details of my installations for a better understanding:

F:\FSX
S:\P3D (v5.0HF1)
Z:\Prg\Blender-2.79
Z:\Prg\Blender-2.82
Z:\Tools\SDK ..............................................................(for FSX:A)
Z:\Tools\SDK_P3D ....................................................(for P3D v1.4)
Z:\Tools\SDK_P3D2 ..................................................(for P3D v2.x)
Z:\Tools\SDK_P3D3 ..................................................(for P3D v3.x)
Z:\Tools\SDK_P3D4 ..................................................(for P3D v4.4)
Z:\Tools\SDK_P3D5 ...................................................(for P3D v4.5)

The Blender2FSXP3D 0.9.5 plugin is installed on Blender-2.79a and works perfectly with a few modifications to find my SDK of FSX and P3Dv4.5

The Blender2P3DFSX 0.98.1 is installed on Blender-2.82 and I have some troubles.
Whether I use auto-selection or I browse myself the tree structure of my disk to find the SDK directory and select my modeldef.xml file, at each compilation (a map with a material and an associated texture) I always get an error.
In fact looking at the log file, I realize that the SDK directory is well found but that in the creation of the full path to modeldef.xml one \ is forgotten:
======================================================================================================
Creating MDL file

SDK root directory:
Z:\Tools\SDK_P3Dv5
XtoMdl.exe path:
Z:\Tools\SDK_P3Dv5Modeling\3ds Max\Common\Plugins\XToMdl.exe
======================================================================================================
To counter the problem I modified with Notepad++ the file func_export.py on lines 284 to 300 to overload this missing sign \ which gives:

if self.config.ExportMDL:
##### XToMDL and ModelDef file paths #####
if (Scene.global_sdk == 'fsx'):
XToMdl = ''.join([self.sdkTree, "\\Environment Kit\\Modeling SDK\\3DSM7\\Plugins\\XToMdl.exe"])
bglComp = ''.join([self.sdkTree, "\\Environment Kit\\BGL Compiler SDK\\BglComp.exe"])
elif (Scene.global_sdk == 'p3dv1'):
XToMdl = ''.join([self.sdkTree, "\\Environment Kit\\Modeling SDK\\3DSM7\Plugins\\XToMdl.exe"])
bglComp = ''.join([self.sdkTree, "\\Environment Kit\\BGL Compiler SDK\\BglComp.exe"])
elif (Scene.global_sdk == 'p3dv2'):
XToMdl = ''.join([self.sdkTree, "\\Modeling SDK\\3DSM7\\Plugins\\XToMdl.exe"])
bglComp = ''.join([self.sdkTree, "\\Environment SDK\\BGL Compiler SDK\\BglComp.exe"])
elif (Scene.global_sdk == 'p3dv3'):
XToMdl = ''.join([self.sdkTree, "\\Modeling SDK\\3DSM7\\Plugins\\XToMdl.exe"])
bglComp = ''.join([self.sdkTree, "\\Environment SDK\\BGL Compiler SDK\\BglComp.exe"])
elif (Scene.global_sdk == 'p3dv4'):
XToMdl = ''.join([self.sdkTree, "\\Modeling\\3ds Max\\Common\\Plugins\\XToMdl.exe"])
bglComp = ''.join([self.sdkTree, "\\World\\Scenery\\bglcomp.exe"])
elif (Scene.global_sdk == 'p3dv5'):
XToMdl = ''.join([self.sdkTree, "\\Modeling\\3ds Max\\Common\\Plugins\\XToMdl.exe"])
bglComp = ''.join([self.sdkTree, "\\World\\Scenery\\bglcomp.exe"])
else:
self.log.log("SDK not specified. Please select a valid SDK version and initialize the SDK paths.",False,True)
return {'CANCELLED'}
With theses modifications, the export is a success !
Perhaps my installation isn't common :confused: but I think there's something missing in the code.
 

Pyscen

Resource contributor
Messages
2,549
Country
us-texas
@Lagaffe

what line did you replace the missing "\" exactly?

was this the line?

Code:
XToMdl = ''.join([self.sdkTree, "\\Environment Kit\\Modeling SDK\\3DSM7\Plugins\\XToMdl.exe"])
 
Last edited:
Messages
591
Country
france
Yes, but also the others between lines 284 to 300 of the file func_export.py in order to correct other types export lines (the ones for the other SDK).
It was the firt "\" who is missing during the auto name resolution code: ''.join([self.sdkTree, "\\Environment Kit

It certainly due to my not academic installation but I used it since 2004 without any problem: Z:\Tools\SDK_P3D5
- dev programs have their own partition (Z:\),
- the path used short names (8+3 convention as MS-Dos convention)
The only thing that I can change is the "_" in the name perhaps a "-" will be better.
 

Pyscen

Resource contributor
Messages
2,549
Country
us-texas
I see...

So you padded each of the lines with "\\" in front of the

"Environment Kit\\Modeling SDK\\3DSM7\\Plugins\\XToMdl.exe" to "\\Environment Kit\\Modeling SDK\\3DSM7\\Plugins\\XToMdl.exe"
"Environment Kit\\BGL Compiler SDK\\BglComp.exe" to "\\Environment Kit\\BGL Compiler SDK\\BglComp.exe"

etc.
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
Hi Didier,
Sorry for not getting back to you sooner. This definitely is of interest and importance to me. On my machines, my SDK are installed in my D: drive, but other than that I left the installation path complete. Looking into the registry, the paths to the SDK always have their trailing / which is why I never had a problem with this.
But this might explain why some people had trouble with the SDK auto-detect. Their paths to the SDK might have the trailing slash missing as well, so the path wasn't completed properly.

Since we're currently working on an update for the toolset, I just made the changes as you suggested. And it seems that it works for me, despite the fact that there now must be a double slash in my path. But if it works, it works, so I'll include this in the update and we'll see if that doesn't solve some issues (hopefully without causing more).

Thanks for bringing it to my attention!
 
Messages
591
Country
france
Thanks for your Replay.
This is not the first time that i have this kind or problème: with Blender2FSXP3D i have had the same
 
Last edited:

Vitus

Resource contributor
Messages
1,480
Country
newzealand
Update to v.0.98.21

Hi gang!

I just uploaded a new version of the toolset to the resource section of the forum. As always, it's been in review by the mods, so give it some time until the addon becomes available to you.

This update has been brewing for a long time, and so far there has been a 24-page-long conversation in the back to suss out problems and improve on the functionality of the tool. So I want to say thanks to all the great people who help making the tool better and better. In this round especially:
@dave hoeffgen for his new additions to the material workflow (see below)
@Pyscen for his relentless effort in testing and finding problems.
@arno and @spotlope for their expert opinions and wisdom.
@MANOCHVARMA RAMAN for his great ideas and suggestions.


Here's what's new:

Materials
The most significant change was implemented by @dave hoeffgen, who improved the interface for the materials. There's now a new interface to set up your textures:
1591266944544.png


Adding files to your material in this way will automatically set up the node tree. If you plug in DDS files, the node tree will automatically flip the UVs and perform the RedInAlpha change. However, if you use WIP textures like PSD, TGA or PNG [...], it'll set up the graph without those changes.
This allows for a more stream-lined workflow when developing model and textures, while at the same time maintaining the WYSIWYG functionality we originally implemented.

The exporter was also updated to accommodate the changes, while still retaining the flexibility it has before. You can still make all the changes to the node tree as you had before to adjust the rendering to your liking, without affecting the outcome of the exporter. When writing the material the exporter will detect and correlate textures in the following way:
1. The exporter looks at the content of the new interface. If a texture slot is used in the interface, that texture filename is written into the .x/.mdl file.
2. If the slot is empty, the exporter will check if something is connected to the input node of the appropriate node (e..g the "base color" node for diffuse/albedo). If a texture node is found along the path to that input node, it'll write that texture filename in the .x/.mdl file.
3. If nothing is connected to the node OR more than one texture node is connected, the exporter will look for the texture node of a set name, even if it's unconnected to the main shader node (e.g. "emissive" for the emissive node). If the node is found and it has a texture assigned to it, that texture filename is written to the .x/.mdl file.

Please note that I would advise you to re-assign ALL textures in your scene using the new interface. I know that's a PITA, but if you carefully do this now, you ensure there aren't any issues later down the line.
Note also that it is necessary to re-initialize the material once to make sure the node tree is set up correctly! To do so, open the drop-down for the "material mode" and select your mode, either PBR or specular. Making this selection again will cause the node tree to be re-build. Once done, go ahead and select the textures for the material using the new interface.



Armatures/Bones

We also fixed some major problems with bone-related animations. You can now assign individual animation tags to individual bones. This allows for instance for the mixing of different movements for skinned mesh animations - like the movement of the pilot or the passengers.

Note however that it is currently NOT possible to use bones as the controllers for hard surface animations directly. I ran into this problem earlier, see here:
There's a workaround posted below in this thread if you're having issues with this as well.

Minor changes

There are some more minor changes in this version that address issues I found working with the addon, as well as the ones pointed out by you. The more-or-less complete changelog is here:

Changelog (4.06.2020):

  • Huge change! Implemented a new interface to set up textures, synchronized with the node tree of the material. Read about it in the support thread and in the updated wiki!
  • Fixed issues with the detail and bump map scaling
  • Updated armature animations. It is now possible to assign individual bones with different animation tags in Pose mode.
  • Visibility tags are now displayed in the same way that animation tags are listed. This was done to de-clutter an unreadable drop-down list when too many visibility tags were present.
  • Added leading "/" to the paths of the P3D/FSX SDK. This should help the addon finding your SDK properly.
  • Fresnel map texture filenames are now correctly converted to .dds/.bmp
  • Changed the default reflection value of specular material to "0"

  • Tested and approved for Blender 2.83!
 
Last edited:

Vitus

Resource contributor
Messages
1,480
Country
newzealand
I did a preliminary edit of the wiki to reflect the changes to the material workflow. There might still be some inconsistencies from the previous versions in it, but at least you have something to work with. Please let me know if you think I need to elaborate on any point or if you find things that make no sense.
Or, even better: edit the wiki yourself :)

Furthermore, I forgot to mention in the changelog that the new material handling allowed us to automatically set the color space for the image texture node for normal maps to "non-color". So no more manual editing necessary any more. Yay!
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
FYI: Doug pointed out to me that the term "shader graph" is not commonly used in Blender terminology. To be more consistent I changed the wording to the Blender terminology "node tree". I already edited the wiki and I'll try to remember using this term for consistency and easier communication.
 
Messages
229
Country
ecuador
Update to v.0.98.21
Hi Vitus,
Many thanks for this new update...!
Maybe I'm not wide awake, but I can't find any link in the resources allowing me to download this version...!??!? Please tell me where I can download it...!
 
Last edited:

Pyscen

Resource contributor
Messages
2,549
Country
us-texas
Hi Vitus,
Many thanks for this new update...!
Maybe I'm not wide awake, but I can't find any link in the resources allowing me to download this version...!??!? Please tell me where I can download it...!
Mods haven't released/ validated it yet. So, there is nothing wrong with your eyes. ;)
 

Kekelekou

Resource contributor
Messages
226
Country
france
I have no idea about how the previous versions of the addon worked with Blender2.8x, but after a full, indepth 10 min test, I feel it's great!
If I may, I would just suggest to rearrange the plugin tab, because the "attach point", "scenery setting", "file parameter", etc do not look like sorted out in a logical manner.
I would have :
- Toolset Settings
- File Properties
- Scenery Properties
- Attach Tool
- Animation Tool

But this is a tiny eyecandy change, nothing close to a showstopper.

This toolset is a very nice piece of work indeed. Thank you to all involved.
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
Unfortunately, we have limited control over the order of the panels, which is unfortunate. The panels show up in the order at which the scripts are registered within Blender, and in some cases some scripts have to be loaded before others in order for the addon to work. I'll keep it in mind for the next update though, maybe we have some wiggle room and find a way to adjust the load order.
 
Messages
57
Amazing! Thanks to all the contributors and amazing community for all the hard work on this wonderful tool. Truly Awesome.

One feature that I liked from the older versions of the tool in Blender 2.79 is that you could create simple materials (color, specular, transparency, etc.) or just change specular highlight levels without creating specific specular image textures. The basic specular shader in 2.83 doesn't seem linked up to change specular highlight levels in P3D materials like previous versions.
 
Top