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

P3D v4 /xanim for LODs

Messages
473
Country
hungary
Hi Arno!

I was converting some gltf objects with LOD into P3D objects (I merged the separate gltf LODs with the merge tool in MCX into a single a object). In MCX everything looked fine but in P3D the LOD never switched to the smaller LOD.
I did some experiment created a model with LODs without MCX (standard .x to mdl then to BGL) and still P3D did not switched the LODs. I thought the LOD system is somehow broken in P3D so I contacted them on their official forum. It turned out LOD switch only happens if the model has animation hence exported with .xanim and compiled with /xanim tag.

I could not find any option in MCX to force xanim export and compilation. Could you please have a look in the logic?
Thanks a lot!
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

Yes, that has been the case since FSX already. MCX uses the /xanim flag when you export a MDL file. Only when you have drawcall batching enabled and the DrawcallBatchingWorkingLOD setting set to false it will not use that flag (to get drawcall batching on the cost of no LODs).
 
Messages
473
Country
hungary
Hi,

Yes, that has been the case since FSX already. MCX uses the /xanim flag when you export a MDL file. Only when you have drawcall batching enabled and the DrawcallBatchingWorkingLOD setting set to false it will not use that flag (to get drawcall batching on the cost of no LODs).
THanks Arno!
Drawcallbatching is still a thing in P3D?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Yes, that still works in P3D as well.
 
Messages
473
Country
hungary
Hi Arno!

Maybe I am overcomplicating a littlebit.
So if I understand well a functional drawcall batching will only work if LODs are not and vica-versa.

If I understand well the settings if batching and batching LOD is both set to true then LOD will work if the object has LOD, if the object has no LOD then drawcall batching will work.
Interestingly I had True-True setting and LOD did not work anyway.

1636983988306.png
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

Correct, drawcall batching and levels of details don't work together, so you have to choose one of the two.

With the default true true setting you will get levels of detail when they are present and drawcall batching otherwise.
 
Messages
473
Country
hungary
Hi Arno!

Of course it turned out that I was wrong again and MCX were working properly. The LOD switch happened just it happened from much farer distance. And this is due to the LOD calculation difference between P3D and MSFS.
In P3D the LOD number represents pixels, in case of MSFS it represents percentage of pixels on display. In MCX manual the MSFS method is not discussed.
It means if we convert MSFS models to P3D (or vica-versa) we need to recalculate the LOD values to have similar behaviour of the objects.

e.g.
If the P3D LOD is 400, it means for MSFS we need to give 400 / 1920 = 20 (%).
Other way round. If MSFS LOD is 80 then P3D LOD should be 1920 * (80/100) = 1536 (pixel)
If we consider screen size 1920 pixels.

I hope my logic is right.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

MCX does attempt to convert between the values already. But it uses the screen resolution from the settings for that.

In the MSFS model xml there is a mimumum size specified, I'm not sure it's a percentage though.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Let me double check my conversion then. It was implemented based on information from a asobo developer when the SDK was still almost empty :)
 
Messages
473
Country
hungary
Let me double check my conversion then. It was implemented based on information from a asobo developer when the SDK was still almost empty :)
I know... The LOD documentation part and behaviour they changed already 2 times since the release.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
I have checked the implementation, but it is OK already. It converts indeed from a number of pixels on screen (FSX/P3D) to a size as a percentage between 0 and 100.

In MCX itself you will always see the FSX/P3D value. When exporting to glTF MCX will convert the LOD values when it writes the model XML file. On importing from glTF the inverse conversion is done.
 
Top