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

MCX Using LOD to Change Objects - Runway Lights

Messages
44
Country
thailand
I know there is Airfield Light Toolbox out there for the purpose, but I'd like to try this one to see how it works.

I created 3 different sizes of runway light sets, so the runway can be seen during the final approach (large white light), and the light details (small white light with bulb) can be seen while I'm on the ground.

The 3 complete sets of runway lights were placed on 3 different files, all of the same coordinates and center (0,0), then converted from SketchUp file to Collada (.dae).

1639493659752.jpeg

1639493677193.jpeg

1639493692612.jpeg


Here's how the size of the lights are different in each set

1639493788563.jpeg


In MCX (v1.5), I loaded the 1st set (detailed runway light), set coordinates and a heading to my airport references. Then I open the LOD window to add LOD.

At this point, I'm not sure what is the value I should put to each LOD, in order to get the them displayed at appropriate distances (the large light set should be displayed miles away, the middle light set should be displayed during the final approach, and the detailed light set should be displayed when on ground).

Are there any rules of thumbs to assign certain numbers to the LOD? Does it depend on the size of the individual object in the group or the size of the group of objects?

I tried to put a set of green / yellow / red cubes (each cube is 20x20x20 meters, put them in a row with 100 meters spacing to get the total length of 2000 meters, pretend as they are runway lights) and assigned different LOD numbers, but the results were still not the way I like.

Green cubes are LOD 800
Yellow cubes are LOD 600
Red cubes are LOD 400

1639493837343.jpeg


The cubes change from green to yellow at 3NM, then changed from yellow to red at 4.8 NM.

1639493969308.jpeg

1639493979812.jpeg

1639493991136.jpeg


I think there should be better solutions to solve this than trying assigning different LOD numbers randomly.
 

Attachments

  • 1639493809984.jpeg
    1639493809984.jpeg
    50.7 KB · Views: 49

tgibson

Resource contributor
Messages
10,942
Country
us-california
I have been told that they change based on how many pixels they cover on your screen. Since this is highly variable (and also involves the size of the objects themselves) I can't imagine a way to do this other than trial and error. What I did was change the color of the light for each LOD so I could watch them change color as I approached the airport, much like your cubes.
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,726
Country
us-wisconsin
Zooming in the viewport will also change the LOD. It's not a good way to control visibility by distance. The LOD is controlled by the percentage of vertical size of the viewport.
 
Messages
44
Country
thailand
Zooming in the viewport will also change the LOD. It's not a good way to control visibility by distance. The LOD is controlled by the percentage of vertical size of the viewport.
I already tried that and found the result exactly the way you explained. So, there's no way to make it work the way we want?
 

tgibson

Resource contributor
Messages
10,942
Country
us-california
That depends on how you want it. I don't see a problem with changing LODs when zooming - that seems logical to me.
 
Messages
44
Country
thailand
That depends on how you want it. I don't see a problem with changing LODs when zooming - that seems logical to me.
At night, during the final leg when we try to line up with the runway, we normally try to aim at the runway light, and PAPI (in case of a small airport without more advanced runway lights). It's important to make sure we put the appropriate LODs so the lights can be properly seen as we are getting closer, without zooming.
 

rhumbaflappy

Administrator
Staff member
Resource contributor
Messages
5,726
Country
us-wisconsin
I think there may be a way using code similar to the Marshaller SimObject animation. It uses distance from the Marshaller to the Aircraft.
 
Messages
35
Country
norway
This was posted under msfs, but I believe the Sim you're using is p3d?

Why not just use the lights included with runways in the Sim?

I've done several airports with custom runway lights, and I'd suggest looking into manually editing mipmaps. With imagetool you can use the texture/mipmap to achieve the lod switching you are talking about.

- Finn

Sent fra min MAR-LX1A via Tapatalk
 
Messages
44
Country
thailand
This was posted under msfs, but I believe the Sim you're using is p3d?

Why not just use the lights included with runways in the Sim?

I've done several airports with custom runway lights, and I'd suggest looking into manually editing mipmaps. With imagetool you can use the texture/mipmap to achieve the lod switching you are talking about.

- Finn

Sent fra min MAR-LX1A via Tapatalk
Ah! Sorry I started in the wrong section. Yes, it's P3D.

The point is that I want to create the light that can be seen, not the bright dots that will disappear when we get close to each one of them.

1639890891400.png


I consulted with another airport builder, and he also suggested editing MipMaps, but I still don't have a clue how to achive that.

So you meant we need the appropriated LODs numbers with appropriate MipMaps?
 
Messages
44
Country
thailand
I think I got it now, figured out how to modify MipMap to get the appropriate result, together with setting appropriate LODs numbers.


Case closed.
 
Messages
20
Country
netherlands
I think I got it now, figured out how to modify MipMap to get the appropriate result, together with setting appropriate LODs numbers.


Case closed.
May I ask how you did this exactly?
 
Messages
44
Country
thailand
May I ask how you did this exactly?
You need to edit your light texture file using "ImageTool", which can be found in all versions of P3D SDK packages.

1640253161320.png


Once you open your light texture file (.DDS), it will show mipmap images (a total of 8). My light texture file is 512x512 pixels. The next image will be 256x256, 128x128x, 64x64 unti it becomes 4x4.

You need to use any graphic editor to edit the runway light (and the green light in my case) and safe them in DXT5 format before you add it (or them) (using command "Add mipmap" back to the original light texture file (.DSS) , to make sure it's big enough to be seen when P3D will pick the smaller images when you're far away from the obect (i.e. the runway). You can see that image 6-7-8 is a white stripe, not light dot, to make sure they can be seen.

If you change itmage 4, the smaller images will be changed following the size (devided by half), so you may need to create image 5-6-7-8 for your complete mipmap texture.

Again, you will still need to set appropriate LOD numbers in MCX for each LOD, so the texures can be called at the appropriate distance. This is totally trial and error method, you have to assign nubmers for each LOD and test the flights (Slew away, or back and forth, from or to the runway at night).

Hope this helps.
 
Messages
20
Country
netherlands
You need to edit your light texture file using "ImageTool", which can be found in all versions of P3D SDK packages.

View attachment 79104

Once you open your light texture file (.DDS), it will show mipmap images (a total of 8). My light texture file is 512x512 pixels. The next image will be 256x256, 128x128x, 64x64 unti it becomes 4x4.

You need to use any graphic editor to edit the runway light (and the green light in my case) and safe them in DXT5 format before you add it (or them) (using command "Add mipmap" back to the original light texture file (.DSS) , to make sure it's big enough to be seen when P3D will pick the smaller images when you're far away from the obect (i.e. the runway). You can see that image 6-7-8 is a white stripe, not light dot, to make sure they can be seen.

If you change itmage 4, the smaller images will be changed following the size (devided by half), so you may need to create image 5-6-7-8 for your complete mipmap texture.

Again, you will still need to set appropriate LOD numbers in MCX for each LOD, so the texures can be called at the appropriate distance. This is totally trial and error method, you have to assign nubmers for each LOD and test the flights (Slew away, or back and forth, from or to the runway at night).

Hope this helps.
This has been some great information already,

I do have some follow up questions though. When we add an LOD we have to import another model again, this would then be the same one as we had before. Do we need to create a bigger model? How do we tell it to take another mipmap? Also what is the LOD logic exactly, 1 = closer and 100 = farther?

Could you maybe tell us some baseline numbers. I'll be forever grateful!

Kind regards
 

tgibson

Resource contributor
Messages
10,942
Country
us-california
Mipmap loading and LOD loading are really two separate things. Mipmaps work even with a single object, they will change as distance increases. The LODs are to keep frame rates up. They usually do not change at the same time mipmaps do.
 
Messages
20
Country
netherlands
Mipmap loading and LOD loading are really two separate things. Mipmaps work even with a single object, they will change as distance increases. The LODs are to keep frame rates up. They usually do not change at the same time mipmaps do.
Do the mipmaps load automatically in MCX? And can you see the different looks it gets in MCX?
 
Messages
44
Country
thailand
Do the mipmaps load automatically in MCX? And can you see the different looks it gets in MCX?
Yes, mipmaps will change as you move away from the object, the very same object. I haven't tried using a single LOD with adjusted mipmap yet. We might not need to even make more model, the way I did at the beginning of this thread.

Base line LOD that I use for the airport light (that covering 2100x45 m. of the runway) is 900. I made 5 models, and assigned LOD 900 / 850 / 800 / 500 / 200.
 
Top