• 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.

Blender2FSX After Blender 2.75a Crash (CLOSED)

krispy1001

Resource contributor
Messages
707
Country
unitedstates
Hi All Blender Users!

This will be the new thread that I will Post new Blender2FSX updates to.

I would first like to give a very, very big "THANK YOU" to Mr. Felix aka (Catp_X) for giving us this incredible tool set. I would also like to give a very big "THANK YOU" To Mr. Rohn for updating the tool set for P3D and fixing the problem with not being able to use Blender version other than 2.75a.

I have modified Blender2FSX tool set that was created by Mr. Felix aka (Capt_X) and a version that was updated for P3D by Mr. Rohn. I have made changes so that this version will work using FSX SDK and Blender version 2.75a and newer.

Noted changes in this version:
1. This version is no longer plagued by the file extension problem that was caused by version of Blender new than 2.75a. This modification was wrote by Mr. Rohn.
2. Creation of BGL, xml files for the placement of objects in FSX and P3D was implemented by Mr. Rohn.
3. Update to tool-set setting for "No Base Material Specular", FSX Material Params, Export Selection, Export MDL, and Export Selection was made by me Kris aka (krispy1001).

I have tested this version of the tool set with Blender 2.77a and everything works good.

update[08/13/2016] 0.8.5:
1. fixes the file name extension problem caused by Blender version beyond 2.75a (Fixed by Mr. Rohn)
2. adds BGL and Xml file automation (By Mr. Rohn)
3. Update settings for "No Base Material Specular", FSX Material Params, Export Selection, Export MDL, and Export Selection was made by me Kris aka (krispy1001)

update[08/14/2016] 0.8.6:
1. fixed code so that there is not a conflict running Blender2P3D.
Note: Because I changed some of the variable names for the tool-set because of the conflict with Blender2P3D. Projects that were made with the older version of the Blender2FSX tool set may need animation, attach point, tags re-applied. Sorry!

I have tested this version with Blender 2.77a and everything works. I was also able to get my test tower with attach points "No Crash", and "Platform" to work in FSX.

update[02/17/2017] 0.8.7: (errors does not work)
1. Add <NoAutogenSuppression /> for scenery developers (Requested by FSX3D)
2. Fixed bug with mouse rectangles

I have tested this version with Blender 2.78a and everything works.

update[02/21/2017] 0.8.8:
1. Add <NoAutogenSuppression /> for scenery developers (Requested by FSX3D)
2. Fixed bug with mouse rectangles

Thanks, Kris
 

Attachments

  • Blender2FSX_086.zip
    50.9 KB · Views: 510
  • Blender2FSX_088.zip
    36.8 KB · Views: 485
Last edited:
Messages
544
Country
germany
Hi Kris,
that's great news thank you very much, that gives me the chance to update my blender version. Did you test it with current version 2.77a of blender?
Joerg


Gesendet von iPad mit Tapatalk
 

krispy1001

Resource contributor
Messages
707
Country
unitedstates
Hi Kris,
that's great news thank you very much, that gives me the chance to update my blender version. Did you test it with current version 2.77a of blender?
Joerg


Gesendet von iPad mit Tapatalk
Hi Jdberg!

Yes I have tested the tool-set with Blender 2.77a. The only issue that I had is that I could not get my Bgl file to show up in FSX. I do not do much with scenery objects. So it was probably something that I have done wrong.

If you could test the automatic bgl function I would appreciate it. And maybe you can tell me what I am doing wrong.

Thanks, Kris :)
 
Messages
284
Country
france
Hi all

it's really awesome!!
Yes thank you Felix

With krispy 1001 blender2fsx is in good hands :)
Good luck and thank you
 
Messages
1,243
Country
canada
Kris,

Good start to the update, however you still some of my P3D code in your version. It will mess up if the user has my P3D version.

Look at the __init__.py

Code:
class ExportP3D(Operator, ExportHelper):
    """ Export a lockheed martin P3D format .X file """
    bl_idname = "export_scene.p3d"  # important since its how bpy.ops.import_test.some_data is constructed

Code:
# Only needed if you want to add into a dynamic menu
def menu_func_export(self, context):
    self.layout.operator(ExportP3D.bl_idname, text="DirectX for FSX(.x)")

def menu_func_import(self, context):
    self.layout.operator(ImportP3D.bl_idname, text="ModelFile for FSX(.mdl)")

Also some in export. Just change P3D back to FSX and p3d to fsx. like P3DExporter to FSXExporter.

You can remove the references to import as this is a future function. (I should do that in my code too)

You have also named the FSX_Material.py and FSX_Toolset.py to FSX_MaterialFSX.py and FSX_ToolsetFSX.py. This will conflict with the existing versions of Blender to FSX so we need to warn the users to remove all of the previous blender to FSX files.


Edit:

remove - p3d only

Code:
                if Material.fsxm_nozwrite:
                    Exporter.File.Write("ZBiasValue {\n")
                    Exporter.File.Write("    {:9f}; // ZBiasValue\n" .format(Material.fsxm_zbias))
                    Exporter.File.Write("}\n")

Also review the version numbers part of the code - still my numbering.

I use a program called winmerge - free - it compares text and binary files. You can edit too.

In material.py remove
box.prop(mat, 'fsxm_zbias')

Material.fsxm_zbias = FloatProperty(name ="Z-Bias", default = 0.0, min = -50.0, max = 0.0)

del Material.fsxm_zbias

Also remove the __pycache__ folder from your download as this gets rebuilt
 
Last edited:

krispy1001

Resource contributor
Messages
707
Country
unitedstates
Hi Mr. Rohn!

Yes, I will remove the code that you suggested. I do not want to cause any problems between the two versions of the tool set. And If anyone finds something that is not working let me know.

Thanks, Kris :)
 

krispy1001

Resource contributor
Messages
707
Country
unitedstates
I posted an new update to the tool set. Version 0.8.6

This version fixes problems that you would of had if you used both tool-sets Blender2FSX and Blender2P3D. You can find the new version at the top of this thread.

If anyone finds any bugs please let me know.

Thanks, Kris :)
 

spotlope

FSDevConf team
Messages
346
Country
portugal
Thanks a whole lot for uploading these fixes and features, Kris! I'm excited to have my P3D and FSX tools living together in harmony in the latest version of Blender. I'm in the midst of a big modeling push right now, so I'll let you know if I come across any weirdness. :)
 
Messages
544
Country
germany
Hi Jdberg!

Yes I have tested the tool-set with Blender 2.77a. The only issue that I had is that I could not get my Bgl file to show up in FSX. I do not do much with scenery objects. So it was probably something that I have done wrong.

If you could test the automatic bgl function I would appreciate it. And maybe you can tell me what I am doing wrong.

Thanks, Kris :)
Hi Kris,
  1. I started with a simple car which works perfect.
  2. Also a windsock with bone animations compiled perfect for fsx.
  3. The last test with automatic bgl function with a simple object also compiled fine and the object is visible in the scenery
So all tests worked perfect, great job Kris
Joerg

Edit: I don´t know what you did wrong with the automatic bgl function but we will find that for sure. My first mistake was misinterpreting the altitude which is above ground level. So my object was 319 ft above ground. With entering 0 here it was shown on the ground :)
 
Last edited:

krispy1001

Resource contributor
Messages
707
Country
unitedstates
Hi Mr. Joerg!

So, are you saying that I have done something wrong with the altitude? Or is it that something is not right with altitudeIsAgl="TRUE"? I do not do much work with scenery items so I do not really know how it should work. I though that the switch altitudeIsAgl, if set to True would make the altitute of "0'" be at ground level no matter how high the ground is actually above sea level.

Please let me know if I need to change something.

Thanks, Kris :)
 
Messages
544
Country
germany
Hi Mr. Joerg!
So, are you saying that I have done something wrong with the altitude? Or is it that something is not right with altitudeIsAgl="TRUE"? I do not do much work with scenery items so I do not really know how it should work. I though that the switch altitudeIsAgl, if set to True would make the altitute of "0'" be at ground level no matter how high the ground is actually above sea level.
Please let me know if I need to change something.
Thanks, Kris :)
Hi Kris,
no you do not have to change anything in the toolset for now. My tests were ALL ok so it works fine. When I some issues in the future, I will let you know.
I made my comments concerning the altitude because you said, you couldn´t see the scenery objects when testing automatic bgl function. So I thought it could be an altitude problem, so please forget the comment.
For me all works perfect!
Thanks again for the improvement so that we can use the current Blender version now for fsx and p3d development.
Joerg
 
Messages
284
Country
france
Hello,

After some tests ...


Very good work!

Version 2.77 Blender 086 Toolset

A very big thank you and good luck

Best regards,
 
Messages
1,004
Country
us-florida
I though that the switch altitudeIsAgl, if set to True would make the altitute of "0'" be at ground level no matter how high the ground is actually above sea level.

Hi Kris,
Your assumption is correct. When the switch altitudeIsAgl is false then the object is placed at sea level plus whatever value is in the altitude field. When the switch altitudeIsAgl is true the object is placed at the ground level of the terrain mesh at that location(whatever that height is above sea level) plus whatever value is in the altitude field. Hope this helps. Thanks for your work on this valuable tool.
Ed
 

Pyscen

Resource contributor
Messages
2,994
Country
us-texas
Hello,...

@krispy1001:

The way in which you have the tool layout within the .zip file of the Blender2FSX Tool. (v0.86),... I was unable to automatic install the tool within Blender, this was due to the fact that it started as a folder (ex. ../Blender2FSX_086/... ) within the zip file. I believe you did this for clarity of versions, which I understand. Just wanted to point that out.;)

So in this case,... the Tool version (v0.86) above will need to be installed manually and then activated, or installed automatically and then the tools 'parts' moved or placed out of the folder (... /Blender2FSX_086/... ) and then activated.
 

krispy1001

Resource contributor
Messages
707
Country
unitedstates
Hello,...

@krispy1001:

The way in which you have the tool layout within the .zip file of the Blender2FSX Tool. (v0.86),... I was unable to automatic install the tool within Blender, this was due to the fact that it started as a folder (ex. ../Blender2FSX_086/... ) within the zip file. I believe you did this for clarity of versions, which I understand. Just wanted to point that out.;)

So in this case,... the Tool version (v0.86) above will need to be installed manually and then activated, or installed automatically and then the tools 'parts' moved or placed out of the folder (... /Blender2FSX_086/... ) and then activated.

Hi Pyscen!

Thank you for letting me know That. I have zipped just the toolset files and I removed the extra folder, but there is still a problem with the add-on install. So until I can figure out what is wrong the files will have to be installed manually. The easiest way is to put them in the following location. If you did a defualt install for 64bit you will need to add the file to this location. C:\Program Files\Blender Foundation\Blender\2.77\scripts\addons . If you installed Blender any where else install them in the "Blender Foundation\Blender\2.77\scripts\addons" location. Next start Blender click on the File tab then User Preferences. (See image 1) Now click on the "add-ons" tab and then under "Supported Level" click and check each one of the add-ons file. (See image 2).

Putting the add-ons in this location you will not have to turn on "Show hidden file, folders, and drives" in folder options.

I will try to have this fixed as soon as I can.

image 1
upload_2016-8-16_12-51-42.png


image 2
upload_2016-8-16_12-53-57.png

Thanks, Kris :)
 
Last edited:

krispy1001

Resource contributor
Messages
707
Country
unitedstates
Hi everyone!

Ok, I just attached a new zip file for the Blender2FSX tool set to this thread. (See first post) I have found a problem with Blender 2.77a when it installs add-ons for the first time. It will not create a "Compiled Python File" for more than on module in a add-on when the add-on is fist installed. So if you have used Blender2FSX before you will have no problem installing it with the zip file. But if you are installing Blender2FSX for the fist time. You will need to follow the these steps.

1. Start Blender then click on the "File" tab.
2. Next click on the "User Preferences" (See Image 1)
3. Now Click on "Add-Ons" tab. And then under "Supported Level" click "Testing" tab.(See Image 2)
4. Next at the bottom of the "User Preferences" page click on "Install From File" tab.(See Image 3)
5. Now navigate to where you have your Blender2FSX .zip file and select it.
6. Next click on "Install From File" tab. (See Image 4)
7. Now in the "User Preferences" Page you will see one module of the Blender2FSX add-on "FSX Materials. Click on it to check it. (See page 5)
8. Next click on the "Save User Settings" button and then close the "User Preferences Page"
9. Close Blender.
10. Now re-start blender and go to "User Prefernces", add-on tab page again. Follow steps 1, 2, and 3.
11. You should see now 3 modules in the the window but only FSX Materials is checked. (See Page 6)
12. Click and check the other 2 modules and then click on "Save User Settings".
13. Close the "User Preferences" window and close and re-start Blender. You are now ready to go.

Thanks, Kris :)


Image 1:
upload_2016-8-16_14-16-40.png


Image 2:
upload_2016-8-16_14-19-50.png


Image 3:
upload_2016-8-16_14-22-19.png


Image 4:
upload_2016-8-16_14-26-9.png


Image 5:
upload_2016-8-16_14-30-30.png


Image 6:
upload_2016-8-16_14-42-1.png
 

krispy1001

Resource contributor
Messages
707
Country
unitedstates
Hi Chris!

Here is the file that I fixed. Fix for "Final Alpha Multiply" being out of range when exporting to .x file.

NOTE:"This is a single file of the Blender2FSX tool set. This is not the Full version" FIX ONLY MUST BE INSTALLED MANUALLY!!!!!!!!

Thanks, Kris :)
 

Attachments

  • FSX_Material4FSX.zip
    3.2 KB · Views: 327

krispy1001

Resource contributor
Messages
707
Country
unitedstates
Hi Blender Users!

I have had some requests for adding some functions to the tool-set. The one that I have been working on allows FS9 materials (BMP)'s to be used. This version also has the fix for "Final Alpha Multiply". Now I did not make it that you can use a combination of bmp and dds. I do not know it FS9 allows dds files. But if it is need I will add the functionality to the next version.

NOTE: THIS IS A BETA VERSION OF THE BLENDER2FSX TOOS-SET

I will not release this version at the top of the thread until proper testing can be done.

******************************************************************************
I have noticed some issues with Blender 2.77a not updating add-ons when installed if you have this problem please delete the folder "__pycache___". Blender will remake this folder when it re-starts. You can find this folder in the following location: C:\Users\User Account\AppData\Roaming\Blender Foundation\Blender\2.77\scripts\addons\io_scene_fsx

Replace the User Account in red with your user account for your system.
******************************************************************************
If you do not see the new function "Use Bmp" in the export window then you will have to follow the above instructions. See Image below

upload_2016-8-29_18-59-29.png


Please let me know if anyone finds any problems with this new function.
Thanks, Kris
 
Last edited:
Messages
284
Country
france
Hi kris :)
Great!

I'll try today.

Thank you for this work


edit:

BMP function works fine but I can not mix and BMP DDS
it would be nice if it was possible :)

I hope that you will find a possibility
(.DDS used for diffuse and use BMP for night texture)


Thank you again for all work
 
Last edited:

krispy1001

Resource contributor
Messages
707
Country
unitedstates
Hi kris :)
Great!

I'll try today.

Thank you for this work


edit:

BMP function works fine but I can not mix and BMP DDS
it would be nice if it was possible :)

I hope that you will find a possibility
(.DDS used for diffuse and use BMP for night texture)


Thank you again for all work

Hi FSX3D!

I did not know that FS9 used dds formats. I will setup the next version to allow the use of both dds and bmp.

Thanks, Kris :)
 
Top