• 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 Added Landing lights won't turn off

Messages
16
Country
us-washington
Hi,
If I setup the default 747 in the sim on the ground at night, all the lights (wing, landing, taxi etc) -- all work perfectly as expected. No mods done to the aircraft at all -- everything default.

Then, using MCX I can open and attach an fx_landing effect to the default B747 model as an added (uniquely named) attach point "effect" using the Attached Object Editor' s ADD>EFFECT menu and adding the fx_landing effect from the effects folder. After I export the mdl (no errors, 1 warning about a dds texture) it exports no problem (using the Exporter setting: p3dv4_xtomdlpath: C:\Program Files\Lockheed Martin\Prepar3D v4 SDK 4.2.21.24048\Modeling\3ds Max\3DSM2017_x64\Plugins\XtoMDL.exe )

When I then look at the model in P3d v4, the added landing light shows up very nicely in exactly the place expected, and also illuminates the ground and everything else in its path as expected etc. (so the orientation is correct) See attached image. It shows all the other aircraft lights OFF, but the newly added light stays ON no matter what.

The problem is that when I use the L key as usual, all the aircraft lights turn on and off as expected, EXCEPT/BUT my new light addition stays lit and wont turn off.

What are the steps to add a landing light to an existing (MDLXMDLH model) and ALSO have the added/new light "obey" the L key as an on-off switch for the model? (like all the other lights do)

Thanks for the help.
 

Attachments

  • AddedLightWontTurnOFF.JPG
    AddedLightWontTurnOFF.JPG
    34.9 KB · Views: 1,399
Use the Hierarchy Editor to set the visibility condition for that part to landing_light? There is also an R_landing_light, but confusingly no L_landing_light. ??
 
Effects are simply that and they have no inherent visibility conditions. If you place a landing light, it will remain placed and "on" until you remove, or place a controller onto, it.
The hierarchy editor does not display effects, there are no left and right landing lights and "r_landing_light" is not present in a default installation of FSX. The hierarchy editor does display objects to which effects are attached and it is the visibility condition of those which you can control and by extension, the lights via the switch.
 
Roby's is the absolute best way and you can do it in MCX to confirm it's placement.
 
OK solved!. Thanks for the input everyone!

Here's what I needed to do -- tgibsons first post gave me the clue and everyone else's input gave me things to check to make sure all was well too. So thank you.

(Just to be clear -- my sim is P3d v4, not FSX, Im using MCX and have the correct MDL make from the P3d v4 SDK in the MDX options -- see my post above)

The solution to the problem that I outline in my post above is to do 3 things. I was missing step 3.

1) The first thing I was doing correctly was to use the MCX Attached Object Editor's ADD function to add an EFFECT (from the drop down) + selecting fx_landing.fx from the effects subdir for that added effect attachpoint. I found it was important to use the fx_landing.fx file because I experimented with a number of other landing effects I had in the effects dir, but in my judgement, fx_landing.fx gave the best dynamic lighting results in the sim -- perhaps its been optimized by LMartin. Anyway, I assigned the landing light fx effect file, customized its name for my purposes, positioned it correctly in the place where I wanted the the landing light to be in the model to orient the effects gizmo (especially the green-go axis -- the others I've learned to think of are Red-right, Blue-sky) in the direction the beam needed to point.
2) The second thing that I had done was to use the aircraft cfg file to assign a light effect and position it to match the same place/point on the model that I had placed the just-added effect attach point in the mdl file (example: light.10=5, 0.95, -26.15, 0.10, fx_landing, ) -- the SDK documents these params and requirements so I won't here. BTW -- the params in MCX can't be reused/copy-pasted into the aircraft.cfg file. ** UPDATE: I did step 2 only because I did not like having just the dynamic light from step 3. For me, the dynamic light without the added "beam" effect just looked like a small light dot in the wing. Just not the " diffused beam effect" I wanted. By adding an effect via the aircraft.cfg file I got the lighting beam "effect" i wanted to see (see my pic). Sure, you could also add the beam effect in MCX too, but for me, it was easier to use the Lights section since that way allowed me to experiment very quickly with different "effects" to get what I wanted. (see also my response to RK below)
3) The third and MISSING step which DID finally solve my problem, was to:
a) Load the mdl into MCX
b) open Hierarchy Editor (clue from tg :)
c) find the newly created "AttachedEffect" (look for the same attachpoint name created in AOEditor in the properties window of HEditor -- to know you are working on the right entry)
d) (and here's the important part) -- SELECT "General light" from the Visibility Condition option drop down. I tried Light_landing_vis with mixed results -- I think it has something to do with other parts of the HEditor entries, so I did not waste time trying to debug that root cause. Anyway, the general_light selection worked fine for me and fully functioned with the generic L key when the sim was running to turn the attached dynamic light on and off.
e) Exported the model with these changes to the models MODEL dir, made sure the model.cfg's normal= entry was pointing to the newly complied mdl, and Yipeee... problem solved, everything worked!

LandingLightInMCX.JPG
I-a-gonna-go-now fix all the crappy non dynamic landing lights in some of the aircraft I've ported over from my old sorry-but-i-have-to-move-on FSX. (I own every FS back to the first SubLogic -- BTW my claim to fame: I'm the voice of ATC in the Italy and Monsoon missions -- used to work for ms back then but not in the FS group, and did a lot of early pre-release testing and feedback for the group.. lots of fun in those days. :))

PS.. Unless I can be corrected, I've found that the aircraft.cfg file can add fx_landing.fx to a model, but that will not function as a dynamic light in the sim. (the kind that lights up scenery at different levels of intensity and depth depending on distance, as and example of Dynamic lighting). To get true dynamic landing lights (the kind that reflects off objects and the ground) and the "beam" effect I wanted, I found that I needed to follow all 3 steps above.

Has anyone found a way to add a TRUE dynamic light (see how I think about dynamic in the paragraph above) by simply using the aircraft.cfg lights section? Share the effect you are using to be able to achieve that so we can try it too. (It would be so much simpler if that were possible).

Thanks everyone!

Eye candy:

LandingLightDynamicDoneRight.JPG

LandingLightInFullGlory1.JPG
 
Last edited:
After you sucessfully implemented the landing light feature using step 3, did you try eliminating steps 1 or 2, on the basis that they might be redundant, or unnecessary? If you will accept that the F-35A is about as default as a P3Dv4 aircraft can be and you agree that it has dynamic lighting, you may be dismayed to learn that it has been compiled without a landing light entry in the aircraft.cfg file.
[LIGHTS]
//Types: 1=beacon, 2=strobe, 3=navigation, 4=cockpit, 5=landing
light.0 = 3, -38.00, -17.80, 1.30, fx_navredm ,
light.1 = 3, -38.00, 17.80, 1.30, fx_navgrem ,
//light.2 = 3, -50.20, 7.91, 9.20, fx_navwhi ,
light.3 = 2, -38.30, 17.80, 1.30, fx_f35_beaconb ,
light.4 = 2, -38.30, -17.80, 1.30, fx_F35_beaconb ,
light.5 = 10, -14.6, -1.00, 3.00, fx_F35_vclight,
light.6 = 10, -14.6, 1.00, 3.00, fx_F35_vclight,
//light.7 = 8, -20.6, 0.00, 3.00, f35_Vapor,

(no landing light)

Meanwhile, if we take a step into the wayback machine and examine the default Beech Baron from FSX, we can see that it's landing lights have also been compiled into the model file:
J0bz0iM.jpg


and of course, the relevant entries are missing from the aircraft.cfg file.

Using the above two default models as a base, it appears that the normal and expected procedure for both FSX and P3D dynamic lighting, is to add landing lights to the aircraft model and that the recommended procedure, to add landing lights to the aircraft.cfg, may work in some circumstances, but deviates from the standard procedure and also lacks implementation of some features.

In the end, it is a simulator and illusions must be applied to provide a sensation of immersion. To me, a dynamically lit, but otherwise default building looks like a glowing chunk of quartz. This is what a hangar looks like at night:



Completed-Hangar_Exterior-800x533.jpg
ghns52wi.jpg


and in my mind, a much more satisfying effect would be to go about replacing older scenery models with those that include their own dynamic lights.

18891781_1447288231998131_3879844822962620941_o.jpg

18953141_1447288235331464_2500957342831100215_o.jpg
 
Fyi: VC lights in P3Dv4 are also dynamic (for scenery objects at the least)! And less heavy on the FPS than landing lights are. The only thing that does not work is to make them shine in a 'bundle' in a certain direction (as far as my experience goes, but my experience is probably not far enough).
 
After you sucessfully implemented the landing light feature using step 3, did you try eliminating steps 1 or 2, on the basis that they might be redundant, or unnecessary? If you will accept that the F-35A is about as default as a P3Dv4 aircraft can be and you agree that it has dynamic lighting, you may be dismayed to learn that it has been compiled without a landing light entry in the aircraft.cfg file.
[LIGHTS]
//Types: 1=beacon, 2=strobe, 3=navigation, 4=cockpit, 5=landing
light.0 = 3, -38.00, -17.80, 1.30, fx_navredm ,
light.1 = 3, -38.00, 17.80, 1.30, fx_navgrem ,
//light.2 = 3, -50.20, 7.91, 9.20, fx_navwhi ,
light.3 = 2, -38.30, 17.80, 1.30, fx_f35_beaconb ,
light.4 = 2, -38.30, -17.80, 1.30, fx_F35_beaconb ,
light.5 = 10, -14.6, -1.00, 3.00, fx_F35_vclight,
light.6 = 10, -14.6, 1.00, 3.00, fx_F35_vclight,
//light.7 = 8, -20.6, 0.00, 3.00, f35_Vapor,

(no landing light)

Meanwhile, if we take a step into the wayback machine and examine the default Beech Baron from FSX, we can see that it's landing lights have also been compiled into the model file:
J0bz0iM.jpg


and of course, the relevant entries are missing from the aircraft.cfg file.

Using the above two default models as a base, it appears that the normal and expected procedure for both FSX and P3D dynamic lighting, is to add landing lights to the aircraft model and that the recommended procedure, to add landing lights to the aircraft.cfg, may work in some circumstances, but deviates from the standard procedure and also lacks implementation of some features.

In the end, it is a simulator and illusions must be applied to provide a sensation of immersion. To me, a dynamically lit, but otherwise default building looks like a glowing chunk of quartz. This is what a hangar looks like at night:



Completed-Hangar_Exterior-800x533.jpg
ghns52wi.jpg


and in my mind, a much more satisfying effect would be to go about replacing older scenery models with those that include their own dynamic lights.

18891781_1447288231998131_3879844822962620941_o.jpg

18953141_1447288235331464_2500957342831100215_o.jpg
RK -- you are right. Step 2 in my post was not "really necessary". As you pointed out in your example, you could just add the dynamic landing light.fx into the model and it works fine. BUT I found that having just a dynamic light without an added light "effect" via the LIGHT Section of the aircraft.cfg file just did not have added the light "effect" I wanted to see. Just having the dynamic light looked like a small white dot in the wing. See the image in my post for the effect I achieved by placing a shock-wave light "effect" I own on top of the dynamic light from the model. In P3dv4 shock wave lights are just "effects" that does not illuminate the ground etc. like they did to some extent (not very well) in FSX. True, I could have added these effects to the model in the same way I added the dynamic light into the model using MCX and then I would not need to do anything in the lights section, but I fould that to be a way harder route (you have to get the order right and positioning it is a pain in MCX, then you have to compile to see the result etc etc. ).

Your point about "normal and expected procedure" is also well taken, stated and correct. But again, there was an added "effect" I wanted to achieve, thats why I added those into the light section because it was easier.

BTW I would not get the effect I achieved by entering an effect into the lights section if there was wing flex in my model (like some of the larger 747, 37's models out there). If there is wing flex -- then since adding an effect in the aircraft.cfg file places the effect at the Aircraft.cfg LIGHTS section coordinates it looks bad because as the wing wing flexes upward during flight, the dynamic lights compiled into the model will follow the flex, but an effect added to enhance the landing light effect would look good on the ground, but since its a static point in the aircraft.cfg the effect would not "follow" the wing flex. So you'd see a weird separation of landing light and landing light effect.

See the problem is not whether its necessary to add an added effect in the lights section if the mdl already has dynamic lights attached to the model -- that's a choice a modeler will make depending on what effect they want (like I did in my model see pic). I was asking to see if anyone had achieved the opposite -- found a way to add a TRUE dynamic light to a model by ONLY using the aircraft.cfg file. (the way FSX allowed). I get that the new P3d architecture creates true dynamic lighting that reflects off objects the way FSX never did. But I was hoping that someone clever would author an effect to behave like a true dynamic light so one could simply add it to the Aircraft.cfg file Lights section instead of having to compile it into the model to achieve true Dynamic lighting...that's why I was asking if anyone had tried that. I doubt its possible for an effect to act like a dynamic light in P3D. but I asked anyway :)
 
Have you tried combining (or nesting) a vc light with a spotlight? I have not (I am not at my P3D computer) but I think it is worth a try.
 
Not sure I understand you post above. I see VC lights in the effects folder, but where would one locate a "Spotlight" -- is it an effect? Remember the objective of this post is to see if there is a way to add a true dynamic light via the aircraft.cfg lights section since that's way easier/faster -- albeit with its wing-flex limitations/constraints as I mentioned above. We already know how to add a DLight by compiling it into the model. (see my post above).
 
Not sure either what you are trying to get at anymore.
A VC light is diffuse and would light up the wings and the ground below the wings. Even if the aircraft model has flex wings, the VC light would not bother you as it does not have a visible 'point' origin. Your hangar examples are a good reason to use VC lights instead of 'spotlights'.
A spotlight (=effect) is a dynamic light that points into a certain direction (like from a lamp post downwards to the ground). A VC light (also dynamic) is diffuse and though it does have an origin, it will never be pinpointed to an exact wing position because it is diffuse.
You may want to clarify what exactly you want achieve.
I hope you do know how to make your own effects, don't you?Then add a VC light to your aircraft.cfg.
But as I am not sure any longer what you want, I cannot give you any further ideas until you have explained better what you would like to get done.
 
I don't want anything else. I solved the problem I had outlined in the posts above.
I was reacting to your suggestion for using a vc light. I did not understand what you meant, but with your last post I do now understand what you are now saying. Thanks!
Placing a vclight under the wind in place of a directional landing light in the model as described above is an intriguing idea to get a landing light (without having to rebuild the model). But I wonder if the VClighting option as you described, using the cfg file as the authoring point, casts the same light-distance as a landing light does when compiled into the model -- especially when actually landing, not just on the ground. I'll have to try it some time.
I'm good, have answers needed. :)
 
Back
Top