• 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 Limitation? Color Multipliers

Messages
78
Country
france
I don't think so. I use another computer to export and i have the same problem.
And when i export without animation, i don't have problem.

I've tried to export from my blend file directly under D:\ and the result is same
The message error and only ...LOD00 exported and ...LOD01.bin (not ..LOD01.gltf)
 
Messages
78
Country
france
After more tests, the 0.41.3 have problem with batch export.
No problem for create the package, but in the sim, LOD01 and more are not textured.
Only LOD00 is textured.

When i export LOD separatly, the size of LOD01 and more are differents compare to file exported with Batch.
 
Messages
41
Country
unitedstates
Hello,

I've tested a bit this version 0.41.3 and it seem to work better for batch export LODS.

I still have an error for exporting animated objects when exporting batch (no problem when exporting each LOD separatly).

In the image the error message.

If i select only non-aminated objects and check the box "selected objects" in the "Include" part of the export windows. The export is working without problem but only non-animated objects are exported.
So the problem is clearly for animated objects.

Good luck
View attachment 76144
Thanks, Marcoh! I have never used animation in MSFS since, I hope, my bridges never move! I will look into this, since I now know more or less how the batch export operates. For what it's worth: it seems that the batch export was an afterthought in the development by Vitus, and I can understand that by this time he was exhausted from testing every possible scenario. As I said before: the current fix is a hack. I'm getting closer to a real fix that will include animation and any other exportable that I haven't tried yet. Please remember, though, that I only learned Python last month plus a little session a year or so ago where I developed a wheel driver class just for Blender. It's all logic, however. Thanks for wishing us luck.
The latest SDK is making me crazy again with its "wizard", but they're going in the right direction. Lagaffe may be onto something also. I get the feeling there's some secret directory structure we don't know about and can't access. Also, the latest SDK has stopped updating the Scenery Editor display object when you just make a tweak in one little detail of an object. I'm trying to work that out, too.
 
Messages
343
Country
austria
After more tests, the 0.41.3 have problem with batch export.
No problem for create the package, but in the sim, LOD01 and more are not textured.
Only LOD00 is textured.

When i export LOD separatly, the size of LOD01 and more are differents compare to file exported with Batch.
You have to copy the materials. The name of the materials has to be unique in every LOD. Then it gets properly exported.
 
Messages
78
Country
france
Thanks Mikea.at for this information. I was doing exactly in the opposite to minimize the number of materials.
 
Messages
41
Country
unitedstates
After more tests, the 0.41.3 have problem with batch export.
No problem for create the package, but in the sim, LOD01 and more are not textured.
Only LOD00 is textured.

When i export LOD separatly, the size of LOD01 and more are differents compare to file exported with Batch.
Thanks marcoh and mikea.at for your reports.
Yes, I'm aware of this. The cause is that each LOD model needs to have its own texture. I work around by the way I generate each collection:
Make your LOD00 model perfect, and place all parts into the 'x00' collection.
Create a new, empty collection 'x01'.
Copy (CTRL-V) all of the parts of the 'x00' collection.
Select the new, empty x01 collection.
Paste all the copied parts into the 'x01' collection using CTRL-V.

If you now look at the textures in the 'x01' components, you will see that they have the same names as in the 'x00' collection, but they have a number attached to the end.
You can now work on the 'x01' collection to reduce its detail.
Repeat this for the 'x02' collection. I copy either the 'x00' or the 'x01' collection parts and paste them into the 'x02' collection. Do not use the "Duplicate Collection" function; it will not create numbered textures.
I have discovered that you must have at least three LODs for the batch export to work and compile without errors. I can see why this is in the code, and I am working on it. When I finally get to the actual problem, I should be able to fix all of this. Again, wish me luck.
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
4,780
Country
us-wisconsin
Of course you can simply create and export each LOD as separate objects and simply create an XML to create the combined LOD object... This is actually the process MCX uses to create LODs
 
Messages
6,629
Country
us-illinois
Thanks marcoh and mikea.at for your reports.
Yes, I'm aware of this. The cause is that each LOD model needs to have its own texture. I work around by the way I generate each collection:
Make your LOD00 model perfect, and place all parts into the 'x00' collection.
Create a new, empty collection 'x01'.
Copy (CTRL-V) all of the parts of the 'x00' collection.
Select the new, empty x01 collection.
Paste all the copied parts into the 'x01' collection using CTRL-V.

If you now look at the textures in the 'x01' components, you will see that they have the same names as in the 'x00' collection, but they have a number attached to the end.
You can now work on the 'x01' collection to reduce its detail.
Repeat this for the 'x02' collection. I copy either the 'x00' or the 'x01' collection parts and paste them into the 'x02' collection. Do not use the "Duplicate Collection" function; it will not create numbered textures.
I have discovered that you must have at least three LODs for the batch export to work and compile without errors. I can see why this is in the code, and I am working on it. When I finally get to the actual problem, I should be able to fix all of this. Again, wish me luck.

Hello:

I am still in the early learning phase of working with the MSFS 2020 SDK, but I am curious if we may be able to (re-)use MIPMAP-ed textures and thus use less texture sheets to accommodate LODs that are either full resolution duplicates- or lower resolution versions- of 3D models ? :scratchch

Thus far there appears to limited info in the MSFS SDK regarding use of MIPMAPs: :oops:





IIUC, by using embedded MIPMAPs in textures, we may potentially reduce the number of required texture sheets / draw calls per 3D object. :idea:


BTW: Regarding MSFS SDK texture requirements:


Does MCX use legacy FS SDK ImageTool (ex: in Material Editor > { Textures } tab) ...for creation of glTFs with MIPMAP-ed textures for LODs ?

If so, does it comply with MSFS SDK "Multiple of Four" criteria ? :oops:


PS: Those developing for the future further implementation of VR with MSFS 2020 may find this interesting:


"Texture filtering – Negative Lod bias = allow
This provides texture sharpening via a negative Level of Detail (LOD) value for mipmap selection. A mipmap is a hierarchically organized set of LOD textures."

GaryGB
 
Last edited:
Messages
41
Country
unitedstates
Of course you can simply create and export each LOD as separate objects and simply create an XML to create the combined LOD object... This is actually the process MCX uses to create LODs
Your point is very well taken, and I couldn't agree more. As the LODs get less detailed (down by powers of two at each level according to the SDK documentation) not only the models must change but the texture load must also decrease. See my comment in support of separate textures for each LOD above. I still work this way, because I rebuild my textures or eliminate them as the detail goes down. For that reason I don't worry about the batch export not exporting any texture/material that is the same between the first and subsequent levels. In fact, my main motivation for wanting to see the batch export work is when I have to change a model component that spans several levels: I can make the changes in each level and then re-export all levels at the same time. The batch LOD export should not take the place of individual attention to each level. It's just a time saver in certain situations - not all.
I'd like to see more sharing of complexity reduction techniques and workflows. I've had to develop quite a few as I've progressed in my learning. Decimate is certainly not one of them! It took me a long time to realize that the LOD00 design needs to be tailored to subsequent reduction in detail.
Thank you for bringing this up.
 
Messages
34
Country
unitedstates
I have been testing the latest MSFS Toolkit from github without much luck on a 1 pass BATCH EXPORT all .bin & .gltf working.
BUT I am still hopeful and grateful for your dedicated work in updating this... Blender is the poor mans way to develop, yet is crucial for startups and general hobbyist.

Currently this procedure yet tedious works: (credit given to reddit research etc)
  1. Create Collection x00
    containing any model objects/lights etc.
  2. Copy all contents of x00 using CTRL-C
  3. Create Collection x01
    Paste all into x01 using CTRL-V
  4. Repeat step 3 for x02, x03 (I read they recommend 4)
  5. Add a Decimate modifier / Apply it permanently to objects in x01.
  6. Remove any Normal Map, Metal textures to materials in x01.
  7. Repeat steps 5-6 for remaining collections.

    BATCH EXPORT using MSFS ToolKit (any version at moment)

  8. Select contents of x00 collection only.
  9. Select EXPORT - extended glTF for MSFS (see screenshot)
  10. Export it to your working folder.
  11. Create a TEMP folder.
  12. Copy/Backup files _LOD00.bin and _LOD00.gltf into this Temp Folder

    REPEAT Steps 8-12 for x01, x02, x03
    * Copying _LOD01, _LOD02, _LOD03 files into TEMP.

  13. Finally cut/replace all files with the backups from TEMP folder.
* It appears the batch exporter correctly exports the 1st collection only.
so this procedure will backup each LOD and your full LOD set will be clean.

Just sharing what I have to the group and if it helps fix the issue.
 

Attachments

  • STEP8-9.jpg
    STEP8-9.jpg
    54.5 KB · Views: 20
Messages
41
Country
unitedstates
I have been testing the latest MSFS Toolkit from github without much luck on a 1 pass BATCH EXPORT all .bin & .gltf working.
BUT I am still hopeful and grateful for your dedicated work in updating this... Blender is the poor mans way to develop, yet is crucial for startups and general hobbyist.

Currently this procedure yet tedious works: (credit given to reddit research etc)
  1. Create Collection x00
    containing any model objects/lights etc.
  2. Copy all contents of x00 using CTRL-C
  3. Create Collection x01
    Paste all into x01 using CTRL-V
  4. Repeat step 3 for x02, x03 (I read they recommend 4)
  5. Add a Decimate modifier / Apply it permanently to objects in x01.
  6. Remove any Normal Map, Metal textures to materials in x01.
  7. Repeat steps 5-6 for remaining collections.

    BATCH EXPORT using MSFS ToolKit (any version at moment)

  8. Select contents of x00 collection only.
  9. Select EXPORT - extended glTF for MSFS (see screenshot)
  10. Export it to your working folder.
  11. Create a TEMP folder.
  12. Copy/Backup files _LOD00.bin and _LOD00.gltf into this Temp Folder

    REPEAT Steps 8-12 for x01, x02, x03
    * Copying _LOD01, _LOD02, _LOD03 files into TEMP.

  13. Finally cut/replace all files with the backups from TEMP folder.
* It appears the batch exporter correctly exports the 1st collection only.
so this procedure will backup each LOD and your full LOD set will be clean.

Just sharing what I have to the group and if it helps fix the issue.
That's strange. Could it be that when you batch export you don't have all the models selected? From the graphic you sent, only the x00 objects are selected. If you are only selecting one, you want to turn off the Batch Export checkbox and then export only to the LOD you're working on. You should see a gltf icon in the export window for each LOD you've exported via Batch. Just click on the proper one to set the destination in the box below. I recommend, also, that after the first complete export that you turn off the Generate XML so you don't mess up any LOD minsize settings you may have changed. I hope I'm interpreting your steps correctly - sorry if not.
Objects 00.001 and so on appear to be meshes, and the points seem to be lights.
Step 8 may be the problem. Try box-selecting all your models at once and then batch-exporting. Then turn off Batch and work on each one individually. I've done it both ways: selecting them one by one after the first export and exporting singly, or: re-exporting them all with batch even if I've only changed one.
Looks like you've done everything right except selecting all for the batch export. I'll test this later,though.
Thanks for the feedback.
 
Messages
34
Country
unitedstates
That's strange. Could it be that when you batch export you don't have all the models selected?

Yeah disregard that screenshot as it was meant for exampling a working procedure.
I have attempted SELECT ALL CTRL-A or manually selecting all and BATCH EXPORT selected objects checked etc.

What I have found is it does export all LODS and the kbps seem correct comparing to my final TEMP backup.
But LOD00.gltf is the only file that will open in MCX or WINDOWS 3D VIEWER and display.
LOD01 LOD02 LOD03 are all corrupted. hence its always the first collection that works 100%

@PhysicsTeacher attached is a comparison of what exactly makes the .gltf corrupt.
LEFT SIDE is 100% WORKING
RIGHT SIDE is CORRUPTED the 2nd collection exported with ALL selected 1 pass BATCH EXPORT

It adds a section of Buffer Views that the working file does not contain and the "byteLength" is incorrect.

HOPE THIS HELPS FURTHER THIS FIX.
Thank you again.
 

Attachments

  • 2021-08-24_12-53-05_ApplicationFrameHost.jpg
    2021-08-24_12-53-05_ApplicationFrameHost.jpg
    359.9 KB · Views: 21
  • 2021-08-24_12-59-48_notepad++.jpg
    2021-08-24_12-59-48_notepad++.jpg
    53.7 KB · Views: 23
Messages
41
Country
unitedstates
Yeah disregard that screenshot as it was meant for exampling a working procedure.
I have attempted SELECT ALL CTRL-A or manually selecting all and BATCH EXPORT selected objects checked etc.

What I have found is it does export all LODS and the kbps seem correct comparing to my final TEMP backup.
But LOD00.gltf is the only file that will open in MCX or WINDOWS 3D VIEWER and display.
LOD01 LOD02 LOD03 are all corrupted. hence its always the first collection that works 100%

@PhysicsTeacher attached is a comparison of what exactly makes the .gltf corrupt.
LEFT SIDE is 100% WORKING
RIGHT SIDE is CORRUPTED the 2nd collection exported with ALL selected 1 pass BATCH EXPORT

It adds a section of Buffer Views that the working file does not contain and the "byteLength" is incorrect.

HOPE THIS HELPS FURTHER THIS FIX.
Thank you again.
Hmmm ...
This is exactly what the error was before the fix. Give me a little time. I'm going to set up what I think is exactly what you are doing.
In the meantime, could you please check your add-ons and verify the we are both using the same version?
Addon Version.jpg

To try to duplicate your error, would I be correct in creating 3 or 4 LOD models that are just cubes and adding two point lights to each? I'll color the cubes differently.
I opened some previously batch-exported gltf files with no trouble in Windows 3D Viewer. It had problems with the MSFS textures for all LODs, though. I'm not familiar with MCX.
I've had problems with gltf viewers and the toolkit files even without batch exporting. Sorry, I'm no expert there. However the error you describe will certainly give the project builder major problems.
The old workaround was to batch export the x0(x) collections first to get the xml and all but one gltf as errors. Then turn off Batch and Generate xml before re-exporting each collection separately. Does this work for you?
I'll get back to you as soon as I can.
 
Messages
34
Country
unitedstates
In the meantime, could you please check your add-ons and verify the we are both using the same version?
Yes correct MSFS Toolkit 0.41.2 as shown... However I am using Blender 2.93 latest.
I've actually cleansed my blender object only no lights and tested as well...

Here is a test CUBE.blend project only object no textures at all.
x00 = works when opening .gltf 3d viewer
x01 = corrupt
x02 = corrupt
x03 = corrupt

FOR TESTING BATCH EXPORT.

No rush at all TY again workaround is the game with this dev stuff as long as we all strive for better.
 

Attachments

  • Cube_LODS.zip
    128 KB · Views: 15
Messages
41
Country
unitedstates
Up to my ears with something else thanks to the 7 inches of rain we had over the weekend. I'm 2.93 also.
Thanks for the test files.
More later.
 
Messages
34
Country
unitedstates
The lod fix is included in 0.41.3 update to the latest version of the exporter pls.
@Mikea.at THANK YOU sorry for the confusion on this topic.

CONFIRMED all x00 x01 x02 x03 LODS exported in 1 PASS with version 0.41.3.
tested each glTF just fine.... what a huge fix guyz much appreciated.

VERSION 0.41.3
 
Messages
41
Country
unitedstates
Whew! Thanks, mikea.at!!! Also, thanks to ashmanmedia for the detailed feedback! Now I've got to figure out why my 0.41.2 works fine.
Remember: this is not a "fix"; it's a hack by a first-generation hacker. I still want a permanent and comprehensive solution. I'm willing to bet that Vitus would agree. Thanks for getting this rolling, Vitus, wherever you are.
For those out there who are also experimenting, I learned that whenever I added a debug print or changed some code in the addon, I had to restart Blender for the changes to take effect.
 

Pyscen

Resource contributor
Messages
2,550
Country
us-texas
I must be blind!! Where and how am I to download the updated zip file, please?
 
Top