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

MSFS Blender2MSFS support thread

Status
Not open for further replies.
Messages
5
Country
unitedkingdom
Not sure if I am doing something wrong, but the add-on doesn't seem to work with Blender 2.81.16
I get the follow error when I try to enable it.
1599642060953.png

Initially I had extracted the zip and copied the directory to Blender addons folder
C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\addons
Started Blender and tried enabling it.
I then closed Blender, removed it. Opened Blender and used the Install option and pointed it to the downloaded zip and got the same problem.

What am I missing?

Many thanks,
Lee
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
Yes it does, it's actually required. But you're running an old version of Blender. Update to 2.83x and this error will go away.

I think Khronos made some changes to the glTF exporter between those versions, that's why Blender versions older than 2.83 won't run the toolkit.
 
Messages
5
Country
unitedkingdom
There was me thinking I was actually up to date with Blender. I have installed 2.9 and that seems to work.

Thanks for your help Vitus :)
 
Messages
181
Country
germany
Hi guys, short question. Is any of you have experience/problem with alpha on the texture? I implement alpha in PNG albedo but It's not visible so well in FS. I suppose I didn't set well shader in Blender? Here are examples and how it looks in Blender and in the MSFS. It's part on the top of the building. It's antena and I would like to make it with alpha. Tnx.!

For me it is a same, I couldn't export something successfully with an alpha texture. I get the same results as you. Has someone else here done that successfully?
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
@boba3d Switch your blend mode to "blend". Dithering is for hair and similar things, and Blender doesn't have a proper representation of that anyway. Not sure if that solves your problem, but that'd be a start.

Another things I noticed working with alphas: if you're using PSD files in your Blender project, the alpha maps don't seem to be copied to the PNG when exporting! So make sure that in Blender you work either with semi-transparent PNGs or TGA files with an alpha channel.

If your alpha blending doesn't work, I suggest you first check the converted texture in your package and make sure that the DDS file has an alpha channel. If it doesn't, something went wrong in the conversion process. If it does, there's something fishy about the material parameters you use.

Quick FYI for @everyone else:
There's currently two issues in the toolkit that I'm working on.
1. There is an issue with behaviors and I'm not entirely sure how to solve it. If you have multiple parts that need to use the same template you're kinda screwed. Because you can only provide ONE <ANIM_NAME> to the XML file. The animation node in the glTF is supposed to hold all animations for that particular animated group.

I thought that there was a rather easy solution, which would be to parse all animation names and remove the .001, .002, etc. That way, you'd end up with multiple animations under the same name. I tried that, and unfortunately the sim doesn't like it - it finds the FIRST animation of that name and then skips any others.

Soooo, I will have to recreate what Asobo did for the 3dsmax toolkit. Animations need to be grouped together and multiple nodes and channels need to be written into the glTF. But this is not a simple fix. Effectively, it requires re-writing that part of the exporter. I'm thinking about not to create a custom panel, but instead follow through what I already started. Meaning that the exporter will go through the list of animations and automatically group together all the ones with shared names (omitting the .001, etc.). But if someone has a better idea of how to solve this, please let me know!

This is a great time not to be me.

I need to spend some days working on that and hopefully there will be a solution for that at some point.

2. I spent the last two days on my aircraft's lighting, which wasn't fun. There's something really strange how the sim handles emissive values. When I export the nav light mesh from Blender, the exporter will set the emissiveFactor to [1,1,1]. This seems logical to me - the emissive value gets multiplied with the emissive factor. So if that was 0, there's no emissive light and 1 is the full emissive effect of the texture. However, the sim seems to handle this differently - my nav lights were permanently -kind of- switched on. It took me a while to get this, but when I change the emissiveFactor to [0,0,0], the light was turned off, and came on when turning on the aircraft's lights. Brilliant! It seems that the emissiveFactor acts more like an offset, rather than a scalar. So number two on my list is to make Blender export zeros in that slots to enable this form of lighting - and I hope that this doesn't interfere with the other uses of emissive textures. We'll find out I suppose.
 
Messages
407
Country
ca-britishcolumbia
Values for light emission work on a logarithmic scale like f/stops in photography. So you need very small values to see a change in intensity. There is a thread about it in the MSFS third party developer forum which I believe you have access to. Just search for lights not linear.
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
Thanks for the tip! I read through that thread, but I think this is something different. Because if the emissiveValue is anything other than 0, the mesh will emit some light, which it shouldn't if the light switch is "off" ;)

In other news: turns out the animation problem isn't one after all.


HOW TO ANIMATE GROUPS


Open the Animation view, change from the Dope Sheet to the Action Editor. Select your first object and it's animation and click on "Push down". Go through the list of objects you'd like to group and push all of them down.

Once done, change the view to "Non-Linear Animation". All the animations that you pushed down should now be in a NLA track. The only thing left to do is to rename the NLA track for each of the animations and export.



As you can tell, I'm not 100% firm in what all of this means, so if you want to find out what you're actually doing, check out some Blender tutorials on NLA and thou shalt be enlightened.

I hope that someone who has a better understanding of that topic could write up a how-to section for the Blender2MSFS wiki. If you'd like to do that, either make the changes in the wiki yourself, or PM me your article and I update it.


At least for now we've got a working method to get our gear animations into the sim. :wizard:
 
Messages
407
Country
ca-britishcolumbia
I've been slowly setting up my model for export, creating the MSFS materials and adding objects to those I'm exporting. Somewhere along the line I have developed a problem in which the resulting model in the sim will only display a single texture. So once I have added more than one textured material, all textured parts show that one texture. I've spent a whole day trying to discover the source and am getting nowhere.
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
With these type of issues it's always hard to tell if the problem is on our end or if the buggy dev tools threw a wrench between your spokes. In this case I would start with the result of the exporter. Check that the Blender2MSFS exporter converted all the textures correctly. Then check the glTF file. Open it with a text editor and search for the "materials" section. Make sure that all your materials are listed by name. Then scroll further down to the URIs and check that your textures are appearing in there as well. If anything is unusual up to here, it's either something to do with the exporter or with your methodology.
If everything checks out so far, keep going. Run the package tool and run the same checks, but this time on the contents of the package folder. All your textures should be converted to .PNG.DDS at that stage and your glTF should look quite different as well. But look out for the same markers as before.

Let's see where it screws up :)
 
Messages
407
Country
ca-britishcolumbia
I've gone through the gltf files and can't see anything amiss there. As far as I can tell, the exporter is doing something untoward to the texture files. If re-export from Max (without exporting textures) then I will see similar problems with the Max model in the sim -- the textures in the package source folder are the ones from Blender. If I replace those textures with my originals and then rebuild the package, the Max model looks OK.

I should be then be able to export from Blender again without exporting textures and its seems that this works. I have only one texture not displaying correctly after that. I'll keep on this track as I seem to be making progress.

The fact that my Max model will display the problem with the Blender exported textures does suggest that the problem lies in something the exporter is doing to the textures. Some of the difficulty in nailing down the cause is that the package builder or the way the model loads doesn't always reflect changes until the sim is restarted.
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
Sometimes it helps to bring out the garbage first. Depending a bit on how you have your folders organized, I'd remove not only the package and packageInt folders, but also all the textures that come out of Blender. Then export your model, check the new textures and then rebuild the package. What comes out of that?
I'm pretty sure that the problem is not with the exporter, since it seems to work with anyone else. So either MSFS is screwing this up, or you got some issues with the setup of the material. Maybe re-initialize them by changing the material mode to Disabled and then back to MSFS Standard, or whatever else you use. Check the texture slots with the textures assigned in the shader node tree and make sure that those are synchronized too.
 
Messages
407
Country
ca-britishcolumbia
Already done all that except for flipping materials out of MSFS material and back again, but I will I try that if the problems persist. When I remove the textures sent out of Blender and substitute originals to the package source folder (and delete the entire package folder just to be sure files update) both Max and Blender exported models are OK. The only exception are the decals with the Blender exported model. My decal files are originally tiffs and I couldn't get them to work with the Blender exported models. That was when I started exporting textures from Blender and that is when the problems started, although the decals became OK if no other textured parts export. Previously I couldn't figure out how to get a png out of photoshop with an alpha layer (is it possible?). I'll post again if things work OK consistently without Blender exported textures. That seems to be the case, but I want to see it a few more times before I can be sure.

Regardless of the cause, there is no general requirement to export the textures and I wonder if this option could be disabled instead of having to send the textures to the model folder?

The fact that no one else has reported this is definitely a factor to take into consideration. That is one reason why I posted -- too see if anyone else says "me too". So far apparently not.
 
Messages
407
Country
ca-britishcolumbia
Problem solved. I found a photoshop plugin called super png that allows photoshop to export a png with alpha which I imported into Blender in the appropriate slot. Decals are working and all other texture mismatches were solved by not using textures exported by the Blender exporter. I don't have any need to export the textures so it's not really a problem for me to work this way. Again, maybe I have some weird material settings, but I did try to make everything the same as I had it in Max so really not sure what if anything I did wrong.

Next to try are variable gauge lighting and then skinned mesh and if those work I think my project (L1011) will be good to go using Blender.
 
Messages
31
Country
australia
View attachment 61677

Getting the error above, has anyone found a solution to this. I have changed all the xml files in the tutorials as required. Nothing seems to fix it. Any help is greatly appreciated.
I can fix one of them, go to packageInt, tempFiles, **your package name**, mymodellib, **object name**. Paste in that specific objects bin and gltf files so you have the 3 files in there that you also have in your package sources/modeLib
 
Messages
244
Country
england

HOW TO ANIMATE GROUPS


Open the Animation view, change from the Dope Sheet to the Action Editor. Select your first object and it's animation and click on "Push down". Go through the list of objects you'd like to group and push all of them down.

Once done, change the view to "Non-Linear Animation". All the animations that you pushed down should now be in a NLA track. The only thing left to do is to rename the NLA track for each of the animations and export.

Thanks for this. So if I understand correctly, if you do this you only need one c_gear (for example) entry in the behaviour XML, and the NLA track is then named c_gear?
I'll have to experiment when I'm back on the PC this evening.
 

Vitus

Resource contributor
Messages
1,480
Country
newzealand
Thanks for this. So if I understand correctly, if you do this you only need one c_gear (for example) entry in the behaviour XML, and the NLA track is then named c_gear?
I'll have to experiment when I'm back on the PC this evening.
correct.
 
Messages
100
Country
france
Hello Vitus, and many thanks for your exporter.
I've done my first object and place it in the sim.

There is a little problem. The metallic texture and normal texture seem to be inverted compare to Blender.
In Blender, more the texture is dark, more the surface is metallic but in MSFS it's the opposite. Same for the mormal, in Blender, it's look like in relief and in MSFS in Hollow.

What's i'm doing wrong ? In the basic MSFS tutorial, it's said that more it's white, more it's mettalic (reflective).
Is it a question of channel in the texture ?

Thanks
 
Status
Not open for further replies.
Top