• 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 v4 Blender to P3D ToolSet - *To be retired - NEW FSX ver with P3D"

Messages
1,248
Country
canada
UPDATE 2016-08-20 - update and bug fix release v0.1.4

I have ported over the excellent Blender to FSX toolset for use with Prepar3d. I will be basically the exact same code as Blender to FSX (0.8.x) with the following enhancements/changes.

1. Uses Prepar3d v3 SDK and v2 SDK (0.1.4)
2. Will work with Blender 2.77a fixing the filename issues that broke in blender 2.65+
3. Added ZBiasValue to the FS10Material coding and allowing the user to enter 0 to -50 for different textures. (0.1.3 update 0 to minus 50)
4. Works separately from Blender to FSX - You will be able to have both options/panels available, there will be a Blender2P3D tab
5. If you go back and forth exporting between FSX and P3D you must initialize toolset to the FSX version or P3D version before making changes and exporting otherwise the export will reference the wrong modeldef and XtoMDL.exe

Future:

1. Jetways using skined mesh, IK constraints, bones - this is difficult with all the hard coding values expected by FSX/P3D for jetways

Release below.


2016-06-28 release v0.1 port from 0.82 0f Blender to FSX

Prepare3D v3 SDK integration
Can be used with Blender to FSX - different tab
Updated for Blender 2.77a - File naming change in blender causes errors in Blender to FSX
Added Z Bias in FS 10 Materials

This is an early beta for release for people that are willing to try it and report back any errors. Is installs in the same way as Blender to FSX. You must code the animations for FSX and P3D separately. When FS 10 materials are created and added the selections will be indicated in both the FSX rollout and P3D rollout - except for Z-Bias in P3D only.

I use the following:

F:\blender-2.77a-windows64\2.77\scripts\addons

folder to save the zip file extract. Enable it in blender with the preferences and addons.

upload_2016-6-28_22-40-34.png


Please ensure you are not using production files - and backup your existing FSX files - in fact create a whole separate folder structure for Blender to P3D.

Update 2016-07-01 v011 - bug fix for export without animations caused error in ReplaceFileNameExt function (update from v01a)

Update 2016-07-16 v012 - bug fixes on XtoMDL and modeldef locations (kept v011 as backup). Progress bar added - if you deselect Log Verbose and Log File and open a console view from the menu Window then Toggle system console you will see some text progress bar as the export takes place.

upload_2016-7-16_23-39-55.png


Update 2016-08-11 v013 - Added functionality for scenery developers. Now has textbox input for Lat, Lon, Alt, Pitch, Bank and Heading. You select export a) the sample XML placement file or b) the XML placement file with the LLAPBH data. Bug fixes for Z-Bias, now accepts values 0 to -50 instead of -1 to - 50 and should only be put into x file if no Z Write selected. Added fix proposed by Krispy for the Specular max value 255 instead of 256. Added bug fix for Final Alpha Multiply max value now 255, changed from max of 1.

Material Functionality: Z-Bias Level
In order to improve layering materials on the ground for airport ground polygons, Prepar3D has implemented a Z-Bias level material setting.
This functionality only works with "No Z Write" checked on the material. Using values between 0 and -50, you can set and order the layering of the ground polygon textures above the default airport aprons, taxiways and runways. The more negative the Z-bias, the later in the process it will draw. For example, the runway ground polygon could be -1, the white runway markings could be -2, the yellow runway markings could be -3, etc.

LLAPBH textbox input

Export xml placement with bglComp compilation to BGL file

upload_2016-8-11_20-21-46.png


Test model bgl placed in Prepar3d

Update 2016-08-20 v014 - Added Prepare3D v2 and v3 selector to compile the model with either v2.x or v3.x Prepar3D SDK. If you change the P3D SDK ver you MUST initialize. You can verify what folder was used by veiwing the log file or the console window in blender. Alpha multiplier has been changed from 0-255 to 0 to 1.0.

NOTE: If you have both Blender to FSX and P3D with notice that FSX values get loaded first. Example now is the change to Final Alpha. 0 to 1 may allow 0-255 if you have not updated Blender to FSX to Krispy's latest.

upload_2016-8-20_17-29-3.png


UPDATE 2017-06-01 v017 - Added Prepar3d v4 support. basically added the v4 selection button and internal code to find the files. I have added some features that are in Blender2FSX from Krispy's version. I don't think there is anything really special with XtoMDL and the modeldef.xml files for v4.

UPDATE 2017-07-09 ver to be retired - The codebase for Blender2P3D will be retired in the near future as Krispy has developed a single codebase that will/can use FSX and P3D SDK. See the beta at:

http://fsdeveloper.com/forum/threads/blender-tool-set-beta-for-fsx-p3d-test-files.440503/
 

Attachments

  • Blender2P3Dv3_v014.zip
    33.1 KB · Views: 1,100
  • Blender2P3Dv4_v017.zip
    34.3 KB · Views: 1,614
Last edited:
this is quite interesting aswell! Just one question, how would it relate to the Blender2FSX tools? For instance can I run both along side each other or do I need to redo all my FSX settings within the P3D toolset?
 
Great but what comes to my mind is, that one need to buy the p3d sdk license to get the permission of using it. Am I right?
 
this is quite interesting aswell! Just one question, how would it relate to the Blender2FSX tools? For instance can I run both along side each other or do I need to redo all my FSX settings within the P3D toolset?

That's what I am looking into before I release - ensure that I don't have a conflict with FSX to Blender - right now I have kept FSX to Blender Material function the same - except P3D now has ZBias which FSX does not.
 
Last edited:
Great but what comes to my mind is, that one need to buy the p3d sdk license to get the permission of using it. Am I right?
Not a lawyer but you can download the P3D SDK without purchasing P3D, but how would you test? (edit:and you must have a license anyway)

Yes, there is a developer license - please review LM's licensing and make your own choice - can't get into a discussion about licensing.
 
Last edited:
Very god job,

This morning, I will study this port and I am happy that others people has think the same thing. I wait with attention the release of BlenderToP3D ;)
 
Excellent Ron!! Looking forward to it. Is there a way of fixing the filename issue for the Blender2fsx plugin as well? Seeing Blender being updated but not being able to use it is a little bit frustrating!!
Thanks once again.

Daniel
 
Hi,

My works on my "Blender2P3D"version is at 90% operationnal and run under Blender 2.76 64bits. I have only to include the value Z-bias in the python code to be happy and begin to test.
To test I have create a ground poly P3Dv2.x compliant with 3DS and I will to make the same thing with "Blender2P3D" to verify that all is correct.

PS: I have programmed with python during 90's years so I's not so difficult to adapt Felix's code
 
Hi,

My works on my "Blender2P3D"version is at 90% operationnal and run under Blender 2.76 64bits. I have only to include the value Z-bias in the python code to be happy and begin to test.

We seem to be working on the same thing. I am currently testing with Krispy's tutorial- so far so good. I am at the prop step and I have a test plane in P3D with working animations.
 
Your timing is amazing. I just started working on porting my KACK ground poly to use P3D materials, and was hoping there'd be a way to do the proper z-bias settings. Thanks for working on this!
 
I have now added the Blender to P3D files in the first post in this thread.

Those of you that are brave enough can download and add it to your blender installation in the same manner as you did the Blender to FSX. You can have both. I was able to get the testplane in the krispy1001 tutorials up to video 10 - building the VC.

Here is the result:

 
Thank you very much Ron.
Works like a dream (so far, fingers crossed) in 2.77, installed without stress!
I have a model, built in 2.74, with most of the external animations finished, all I had to do was reassign them, no re-animation needed.
No errors when compiled.
About to start VC, this is perfect timing for me.
Thank you again.


Rob
 
Last edited:
Very nice modelling Rob. :wizard: I'm glad that it has worked for you. Than ks for letting me know your results.
 
Ron, I'm giving the new plugin a shot. In attempting to export a ground poly for P3D, I'm getting the following errors in Blender 2.76:

Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_scene_p3d\export_p3d.py", line 272, in Export
self.Log((ReplaceFileNameExt(self.Config.filepath, '.x')))
NameError: name 'ReplaceFileNameExt' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_scene_p3d\__init__.py", line 241, in execute
Exporter.Export()
File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_scene_p3d\export_p3d.py", line 279, in Export
raise ExportError("Export to .MDL failed. XToMdl.exe returned an error.")
io_scene_p3d.export_p3d.ExportError: Export to .MDL failed. XToMdl.exe returned an error.

location: <unknown location>:-1


It looks as if Blender can't find your extension to replace the file names. Any thoughts?
 
Back
Top