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

Bleder2FSXP3D Wish-list for Added Functions

I just found I miss some extended bloom options in the material which I know fom MCX:
"Bloom material by copying" and "Bloom material modulating by copying".

Is it possible to add these or is that even covered by a different option already?

Also it seems I found another bug: The "no base material specular" flag seems to export inverse (showing inverse in MCX at least)
 
I just found I miss some extended bloom options in the material which I know fom MCX:
"Bloom material by copying" and "Bloom material modulating by copying".

Is it possible to add these or is that even covered by a different option already?

Also it seems I found another bug: The "no base material specular" flag seems to export inverse (showing inverse in MCX at least)

Hi Dave,

It might be possible. I'll try to explain in very short words how the python files work.

FSX_Material.py
- Find the section that starts with "class FSXMaterial"
- There, find the section that says "def draw(self, context)"
- You find numerous layout.label sections that each define one section of the FSX Material Params tab
- You can add another one by yourself. What I did last summer (just an example):

Code:
layout.label(text = "Specularity")
box = layout.box()
box.prop(mat, 'fsxm_specvalue')

- Then proceed to the section right below the "#############", the "def register()" section
- There I added:

Code:
Material.fsxm_specvalue = FloatProperty(name ="Specular Value", min = 0.0, max = 999.0)

- Then proceed to the section "def unregister()" where I added:

Code:
del Material.fsxm_specvalue

- Done for this file. We created the property "Material.fsxm_specvalue". This property, we can take it along in our export, see below.

export_fsx.py
- Find the section "# FS10 material parameters" (mine was around line 1270)
- Somewhere in this section, I added our previous made property.
Code:
if Material.fsxm_isFSXmaterial:
                Exporter.File.Write("FS10Material {\n")
                Exporter.File.Indent()
                
                Exporter.File.Write("{:9f};{:9f};{:9f};{:9f};;\n".format(Diffuse[0],
                    Diffuse[1], Diffuse[2], Diffuse[3]))
                Exporter.File.Write("{:9f};{:9f};{:9f};;\n".format(Specular[0],
                    Specular[1], Specular[2]))
                Exporter.File.Write(" {:9f};\n".format(Material.fsxm_specvalue))
                Exporter.File.Write("{:9f};{:9f};  // Detail and bump scales\n" .format(
                                                Material.fsxm_detailscale,
                                                Material.fsxm_bumpscale))
                Exporter.File.Write("{:9f};   // Reflection scale\n" .format(RefScale))
                Exporter.File.Write("%i;            // Use global env\n" %(Material.fsxm_globenv))
                Exporter.File.Write("%i;            // Blend env by invdifalpha\n" %(Material.fsxm_bledif))
                Exporter.File.Write("%i;            // Blend env by specalpha\n" %(Material.fsxm_blespec))
                Exporter.File.Write("%i; %i; %i;      // Fresnel affects dif - spec - env\n" %(
                                     Material.fsxm_fresdif, Material.fsxm_fresspec, Material.fsxm_fresref))
                Exporter.File.Write("%i; %i; " %(Material.fsxm_precip1, Material.fsxm_precip2))
                Exporter.File.Write("{:9f};  // Precipitation...\n" .format(Material.fsxm_precipoffs), Indent = False)
                Exporter.File.Write("{:9f};     // Specular Map Power Scale\n" .format(
                                     Material.fsxm_specscale))
                Exporter.File.Write("\"{}\"; \"{}\";  // Src/Dest blend\n" .format(
                                     Material.fsxm_srcblend, Material.fsxm_destblend))
                Exporter.File.Write("BlendDiffuseByBaseAlpha { %i; }\n" % Material.fsxm_blddif)
                Exporter.File.Write("BlendDiffuseByInverseSpecularMapAlpha { %i; }\n" % Material.fsxm_bldspec)
                Exporter.File.Write("AllowBloom { %i; }\n" % Material.fsxm_allowbloom)
                Exporter.File.Write("SpecularBloomFloor {\n")
                Exporter.File.Write("    {:9f};\n" .format(Material.fsxm_bloomfloor))
                Exporter.File.Write("}\n")
                Exporter.File.Write("EmissiveData {\n")
                Exporter.File.Write("    \"{}\";\n" .format(Material.fsxm_emissivemode))
                Exporter.File.Write("}\n")
                Exporter.File.Write("AlphaData {\n")
                Exporter.File.Write("    %i;    // ZTest Alpha\n" %(Material.fsxm_ztest))
                Exporter.File.Write("    {:9f}; // Alpha test threshold\n" .format(Material.fsxm_ztestlevel))
                Exporter.File.Write("    \"{}\"; // Alpha test function\n" .format(Material.fsxm_ztestmode))
                Exporter.File.Write("    %i;    // Perform final alpha write\n" %(Material.fsxm_falpha))
                Exporter.File.Write("    {:9f}; // Final alpha value\n" .format(Material.fsxm_falphamult * 255.0))
                Exporter.File.Write("}\n")
                Exporter.File.Write("EnhancedParameters {\n")
                Exporter.File.Write("    %i;    // Assume vertical normal\n" %(Material.fsxm_assumevertical))
                Exporter.File.Write("    %i;    // Z-Write alpha\n" %(Material.fsxm_zwrite))
                Exporter.File.Write("    %i;    // No Z-Write\n" %(Material.fsxm_nozwrite))
                Exporter.File.Write("    %i;    // Volume shadow\n" %(Material.fsxm_vshadow))
                Exporter.File.Write("    %i;    // No shadow\n" %(Material.fsxm_noshadow))
                Exporter.File.Write("    %i;    // Prelit vertices\n" %(Material.fsxm_pverts))
                Exporter.File.Write("}\n")
                Exporter.File.Write("BaseMaterialSkin {\n")
                Exporter.File.Write("    %i;    // Skinned\n" %(Material.fsxm_skinned))
                Exporter.File.Write("}\n")
                Exporter.File.Write("DoubleSidedMaterial {\n")
                Exporter.File.Write("    %i;    // Double sided\n" %(Material.fsxm_doublesided))
                Exporter.File.Write("}\n")
                Exporter.File.Write("BlendConstantSetting {\n")
                Exporter.File.Write("    %i;    // Blend constant\n" %(Material.fsxm_blendconst))
                Exporter.File.Write("}\n")
                Exporter.File.Write("ForceTextureAddressWrapSetting {\n")
                Exporter.File.Write("    %i;    // Force texture adress wrap\n" %(Material.fsxm_forcewrap))
                Exporter.File.Write("}\n")
                Exporter.File.Write("ForceTextureAddressClampSetting {\n")
                Exporter.File.Write("    %i;    // Force texture adress clamp\n" %(Material.fsxm_forceclamp))
                Exporter.File.Write("}\n")
                Exporter.File.Write("BaseMaterialSpecular {\n")
                Exporter.File.Write("    %i;    // AllowBaseMaterialSpecular\n" %(Material.fsxm_nobasespec))
                Exporter.File.Write("}\n")
                Exporter.File.Write("NoSpecularBloom {\n")
                Exporter.File.Write("    %i;    // Allow specular bloom\n" %(Material.fsxm_nospecbloom))
                Exporter.File.Write("}\n")
                Exporter.File.Write("EmissiveBloom {\n")
                Exporter.File.Write("    %i;    // Allow emissive bloom\n" %(Material.fsxm_emissivebloom))
                Exporter.File.Write("}\n")
                Exporter.File.Write("AmbientLightScale {\n")
                Exporter.File.Write("    {:9f};\n" .format(Material.ambient))
                Exporter.File.Write("}\n")

- To find out to what thing it should be written, dig in a .X file. But I advice to dig into the py files as well. I might have forgotten one section in one file, to explain here.

Test anything with your .X file. It is very structured and hence I was able to locate the specular value slot in the .X file. Then it was a matter of inserting the fsxm.specvalue variable at the right location in the exporter script.

Hope this makes sense ;-)

Hopefully this gets you somewhere closer.

Cheers, Daan
 
So here's my idea..

Following up on what Ronald said.

One thing that I do think would be great, is to manually choose from within the toolset where to find and which modeldef.xml is used, and which xtomdl.exe is used.
Just open dir, find and select those items. And eliminate the initialize toolset portion.

It doesn't need to run any checks or verify or dump to text. Just manually find it and done.

That way we wouldn't have to rely on the toolset finding the SDK. For some, who have it installed in various locations, it's tough getting the toolset to find it outside of a registry edit.

Also, being able to select which modeldef.xml is used would be handy, as often those are modified on a per-project basis.

- Joseph
 
I would need to understand what "DrawCall Batching" means first. And how it applied to FSX.

Hello again on this one and sorry for taking that time, after being busy I finally had a talk with @arno who helped me understand the DrawCallBatching part:

DrawCallBatching happens automatically when an .x file is compiled without an .xanim file.
LODs will still be present in the resulting .mdl file but inop in the sim.

So basically it is already possible to export this using the Blender2FSX toolset, anyway I'd like to recommend the following:
  1. to rename the "export animations" export option to "export animations/LODs" as even if the model has no animations this is necessary for LODs to work
  2. if the above option is not checked, for the heck of file size only export the highest LOD in case multiple LODs are present (or have an option for the user to select which one to export)
I am aware that it's very well possible to achieve this result with the current version of the toolset. I still suggest the tweaks to make it easier to understand and handle.
 
Hi Blender users!

I am presently working on increasing my knowledge of the Python language. In the next couple of months, I will start implementing some of the updates that have been suggested in this thread.

Thank you for all the input.

Kris
 
Go Kris go! Tame the mighty Phython :)

If I may ask: Where are you learning Phython (from)?
 
Will be appreciate if you could add Orientation in the effect attachpoint.

orientation.PNG


There should be axis lines shows up (X,Y,Z) after the checked effect in the toolset. The axis should move according to the data we add on the orientation section. For the position, I think we don't need that since we can move it manually in blender.
 
Hi Everyone! Thank you for all the input. Here is an update of what I have been working on so far on the tool-set. I am working on allowing for manual or auto SDK path selection. Below are images.

As you can see in the image below, I have added a new function to the tool-sets tool and properties window. So if the "initialize Toolset" button is clicked with the "Auto Detects SDK" checked the SDK will be detected using the registry entry's.
upload_2017-7-3_21-56-43.png


If the "Initialize Toolset" button is clicked and the "Auto Detect SDK" is not checked then an error window will open letting you know that you need to manually find the SDK by using the "Manually Find SDK" button. (Note: I am at this time working on the code for the pop-up error window)
upload_2017-7-3_22-4-14.png


When the "Manually Find SDK" button is clicked a new window will open allowing you to choose the path to the SDK. (See image below)
upload_2017-7-3_22-9-28.png


The "Manually Find ModelDef File" button will be active in both auto sdk find and manual sdk find modes. (I am testing code to see if the path to the ModelDef file can be packed into the blender file it self, so that an external file is not needed to save path when the Blender file is re-opened.)
upload_2017-7-3_22-13-48.png


I have found a lot of functions that do not work or just is not added to the tool-set. Most of the functions are for scenery designers. So with everyone's help that finds a function that they would like added to the tool-set. Please give a description of function and an example of how it is used, and if possible an xml file example of the function. I do not do much with scenery in FSX. I Model scenery items for other peoples projects, but I usually do not place them myself in FSX. So I will need as many examples as possible to understand how the functions work.

If anyone has any suggestion or concerns on how I am allowing the SDK path to be picked please let me know. So far the code is working good. I also plan on testing the toolset with P3D SDK versions.

Thanks, Kris
 
The P3D part would be great. Then I can retire the P3D version and there would be one codebase for all to use.

might just work like in your toolset where one can select which sdk to use, just with FSX added to the list.
 
There is really no difference between the two. Only P3D searching. And P3D z bias. One codebase would be better.

post on github or sourceforge and make it a community effort.
 
I will try to have a beta test for the new version of the tool-set by this week-end. That will allow me to get more people testing for bugs that I may have missed. The new release will allow for automatic and manual choosing of SDK and MedelDef file paths. It will also have some bugs fixed that has been found. I will release a full detail of what has been updated or added with the beta this week-end.

It will take me some time to try to do all of the added functions that has been requested in the thread. I will take baby steps and try to make them one at a time.

Thanks, Kris
 
Hello Kris

I am very glad that you re-work on this fabulous tool :)
I need a function that would be very convenient!

I will return with more detail

thanks and good luck
 
Back
Top