- Messages
- 5
- Country

So I have an addon that modifies some of the lights in the iFly 737 Max8. I need to add a small little something into the
Here is the folder structure of some of the iFly 737 Max8 and some of the files I mention. Keep in mind this is not everything, just what I talk about. The only file listed here that I overwrite in my package is the
At first, I assumed it had to do with the relative file paths in the
But that is not the case. Every LOD model is being loaded just fine and each one is actually being used. But the minSize when the LOD changes is completely different than what is in the xml file.
To give some more context, the
So given this
Anyways, to get to the root of the problem... For whatever reason, when the
Again, the iFly737Max8_INTERIOR_178.xml file in my package is completely untouched. It is an exact copy of the original. And I know it has something to do with this file because when I add it to my package I get this broken behavior, and when it isn't in my package, it works just as it should.
If anyone has some insight or could help me with this, I would greatly appreciate it!
Thank you,
xhvxuvx
In the last picture, I moved the camera back just a slight amount so the size would drop below 180 so you could see the interior model disappears completely.
iFly737Max8_INTERIOR_178.xml file. What I'm adding is kind of irrelevant right now and I'll explain. Here is my main issue: when my package overwrites the iFly737Max8_INTERIOR_178.xml, the LODs get all messed up. In the exterior view, the cabin becomes invisible unless the camera is pretty close to the airplane. To be more accurate, the interior isn't being rendered at all. It is not an issue with LOD2 not being loaded correctly or something. All LOD models are being loaded. When the camera is far enough (which isn't that far) the interior gets culled completely and isn't rendered whatsoever, there is no LOD at all. Here is why what I'm adding to the xml file is irrelevant. This behavior occurs even if I do not change the xml file at all. It occurs just because it is being loaded from my package.Here is the folder structure of some of the iFly 737 Max8 and some of the files I mention. Keep in mind this is not everything, just what I talk about. The only file listed here that I overwrite in my package is the
iFly737Max8_INTERIOR_178.xml file.
Code:
SimObjects/Airplanes/iFly 737-MAX8/
├─ model/
│ ├─ iFly737Max.bin
│ ├─ iFly737Max.gltf
│ ├─ iFly737Max.xml
│ ├─ iFly737Max_INTERIOR_178.bin
│ ├─ iFly737Max_INTERIOR_178.gltf
│ ├─ iFly737Max_INTERIOR_178_LOD1.bin
│ ├─ iFly737Max_INTERIOR_178_LOD1.gltf
│ ├─ iFly737Max_INTERIOR_LOD2.bin
│ ├─ iFly737Max_INTERIOR_LOD2.gltf
├─ model.178Seat/
│ ├─ iFly737Max_INTERIOR_178.xml
│ ├─ model.CFG
├─ aircraft.cfg
At first, I assumed it had to do with the relative file paths in the
iFly737Max8_INTERIOR_178.xml file here:
XML:
<LODS>
<!-- Highest LOD -->
<!-- minimum display size in % (should be bounding sphere vertical screen size, sphere will often be slightly larger than you expect) -->
<!-- default minSize is 0 -->
<LOD minSize="200" ModelFile="..\model\iFly737Max_INTERIOR_178.gltf"></LOD>
<LOD minSize="170" ModelFile="..\model\iFly737Max_INTERIOR_178_LOD1.gltf"/>
<LOD minSize="10" ModelFile="..\model\iFly737Max_INTERIOR_LOD2.gltf"/>
</LODS>
To give some more context, the
aircraft.cfg has this line: model="178Seat" hence why the model.CFG is in the model.178Seat folder. In the model.CFG we have this:
Code:
; Reference LOD implementation, please keep these comments (for now).
[model.options]
; if true, when showing the exterior, also show the interior model (default false)
withExterior_showInterior=true
; if true, when showing the interior with the exterior, exclude interior.lod.0 (default false); only has an effect when withExterior_showInterior is true
withExterior_showInterior_hideFirstLod=true
; when showing the interior, force showing lod0 (default true)
withInterior_forceFirstLod=true
; when showing the interior, also show the exterior model (default false)
withInterior_showExterior=false
; animation definitions are shared by all LODs
; duplicate animations will use the animation definition from the first file it was encountered in (starting at 0)
; MULTIPLE BEHAVIOR FILES NOT YET SUPPORTED
[models]
normal=..\model\iFly737Max.xml
interior=iFly737Max_INTERIOR_178.xml
model.CFG, while in exterior view the interior LODs that should be visible correspond to LOD1 (iFly737Max8_INTERIOR_178_LOD1.gltf) and LOD2 (iFly737Max8_INTERIOR_LOD2.gltf)Anyways, to get to the root of the problem... For whatever reason, when the
iFly737Max8_INTERIOR_178.xml is loaded from my package, the Min Size for each LOD completely changes. As you can see in the code above, LOD0 should have a Min Size of 200%, LOD1 should have a Min Size of 170%, and LOD2 should have a Min Size of 10%. Without my addon/when it is working as it should, those values are correct and I'll attach some images of some debug info to show it, but the last LOD changes to a Min Size of 0.1% for both the exterior and interior. I assume this is something that MSFS does on its own to make sure the last LOD is always shown but I'm not 100% sure. With my addon/when it is broken, the interior LODs Min Sizes change to this: LOD0 has a Min Size of 425.1%, LOD1 has a Min Size of 395.7%, and LOD2 has a Min Size of 180.8%. And indeed, when the size of the LOD drops below 180.8, the interior disappears completely.Again, the iFly737Max8_INTERIOR_178.xml file in my package is completely untouched. It is an exact copy of the original. And I know it has something to do with this file because when I add it to my package I get this broken behavior, and when it isn't in my package, it works just as it should.
If anyone has some insight or could help me with this, I would greatly appreciate it!
Thank you,
xhvxuvx
In the last picture, I moved the camera back just a slight amount so the size would drop below 180 so you could see the interior model disappears completely.
