• 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 Apron light effects disappearing. [SOLVED]

NMG

Messages
78
Country
southafrica
I have a funny question which involves the apron light effects in P3D v4.

When I take off at this one payware airport, all the lights work. I then fly to another payware airport and when I arrive there, the apron lights there does not work. Everything else works; runway lights, taxiway lights, but no apron lights. If I quit P3D v4 and start it up again at the destination airport, then the apron lights work there, but flying back to the original airport and the apron lights have switched off there as well!

I have seen this problem in FSX and always though this had something to do with the memory management of FSX since it is just a 32-bit program, but now I am seeing the same thing happening in P3D v4... Has any one of you guys seen this? Is it a bug in P3D or is there something I can do to overcome it?

Your help will be greatly appreciated!

Regards,
 

tgibson

Resource contributor
Messages
11,324
Country
us-california
It is a problem with effects in general. They don't always activate when you fly into airports. An effects controller file may help, but I know little about them.
 

NMG

Messages
78
Country
southafrica
Someone in another forum suggested that it may be a dynamic light controller problem, but just like you, I know nothing about them. Thanks for replying though.
 

NMG

Messages
78
Country
southafrica
Just to clarify...
I have done another test and it is the dynamic lights that disappear. The light effect on the poles all stay. Weird!
 
Messages
5,214
Make a new text file and call it cntrl_'name of your effect'.fx and just write in the following:
[Library Effect]
Lifetime=5
Version=1.00
Radius=200
Priority=0
[controller.0]
lifetime=0.0, 0.0
type=3
distance=10000.00, 10000.00
delay=1000000.00, 1000000.00
x offset=0.00, 0.00
y offset=0.00, 0.00
z offset=0.00, 0.00
effect.0='name of your effect', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00

Make sure that you have the extension .fx for your text file, not .txt and do not use the apostrophy, please.

That should do it :).
 

NMG

Messages
78
Country
southafrica
Make a new text file and call it cntrl_'name of your effect'.fx and just write in the following:
[Library Effect]
Lifetime=5
Version=1.00
Radius=200
Priority=0
[controller.0]
lifetime=0.0, 0.0
type=3
distance=10000.00, 10000.00
delay=1000000.00, 1000000.00
x offset=0.00, 0.00
y offset=0.00, 0.00
z offset=0.00, 0.00
effect.0='name of your effect', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00

Make sure that you have the extension .fx for your text file, not .txt and do not use the apostrophy, please.

That should do it :).

No joy unfortunately... maybe I should link the controller to the object and then let the controller call the effect instead of attaching the effect to the object directly. I will try that next!

Thanks anyway!
 

NMG

Messages
78
Country
southafrica
This will be my final post on this subject, but I am going to share my findings for whoever may find it useful. This method works in Prepar3D v4, but I had problems getting it to work in FSX. I have therefore not implement it in FSX, but only in my P3D airports and it works!

The problem was that the Dynamic Lights in P3D will turn off when flying from one airport to the next. When taking off at your departure airport, all the apron lights will work perfectly, but when arriving at your destination, the apron lights will all be dark. The solution was to call the Dynamic Lights effect via a controller file and then to link the controller file to your object.

I have slightly modified the controller file that was supplied by another author and here is the one I am using now. Save this code as cntrl_Apron_SpotLight_Dynamic.fx or what ever name you like, but make sure you start the filename as CNTRL. It just makes it easier to distinguish from effects and controllers.

XML:
[Library Effect]
Lifetime=5
Version=1.00
Radius=5
Priority=0

[Properties]
Cockpit=1
VirtualCockpit=1
Spot=1
Tower=1
Map=1

[controller.0]
type=3
x offset=0.00, 0.00 
y offset=0.00, 0.00 
z offset=0.00, 0.00
lifetime=0.0, 0.0
distance=10000.00, 10000.00
delay=1000000.00, 1000000.00
effect.0=fx_avalon_apron_light, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00

Please do not change any of the distance or the delay values in the above coding. Doing so will create havoc with your effect and it may stop working all together. Just leave it as is and then use it as it is.

The Dynamic Light effect I am using is called x_avalon_apron_light.fx and it was an example that was supplied by Lockheed Martin. I am listing it below and you may use it freely.

XML:
[Library Effect]
Lifetime=5
Version=2.00
Display Name=Avalon Apron Light
Radius=-1
Priority=0

[Properties]

[Emitter.0]
Lifetime=0.50, 0.50
Delay=0.00, 0.00
Bounce=0.00
Light=1
Rate=1.00, 1.00
X Emitter Velocity=0.00, 0.00
Y Emitter Velocity=0.00, 0.00
Z Emitter Velocity=0.00, 0.00
Drag=0.00, 0.00
X Particle Velocity=0.00, 0.00
Y Particle Velocity=0.00, 0.00
Z Particle Velocity=0.00, 0.00
X Rotation=0.00, 0.00
Y Rotation=0.00, 0.00
Z Rotation=0.00, 0.00
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
Pitch=0.00, 0.00
Bank=0.00, 0.00
Heading=0.00, 0.00

[Particle.0]
Lifetime=0.00, 0.00
Type=19
X Scale=80.00, 80.00
Y Scale=130.00, 130.00
Z Scale=0.00, 0.00
X Scale Rate=0.00, 0.00
Y Scale Rate=0.00, 0.00
Z Scale Rate=0.00, 0.00
Drag=0.00, 0.00
Color Rate=0.00, 1.00
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
Fade In=0.00, 0.00
Fade Out=0.00, 0.00
Rotation=0.00, 0.00
Static=1
Cast Shadow=1
Face=0, 0, 0

[ParticleAttributes.0]
Blend Mode=2
Texture=avalon_fx2_nmg.bmp
Bounce=0.00
Color Start=20, 20, 20, 60
Color End=60, 60, 60, 180
Jitter Distance=0.00
Jitter Time=0.00
uv1=0.00, 0.00
uv2=0.50, 0.50
X Scale Goal=0.00
Y Scale Goal=0.00
Z Scale Goal=0.00
Extrude Length=0.00
Extrude Pitch Max=0.00
Extrude Heading Max=0.00

Enjoy and have fun!
 
Messages
7,450
Country
us-illinois
Hello:

Thanks for sharing a 'worked example' of a P3D Dynamic Light Effect *.Fx file implemented via a 'Controller'.

Although I typically prefer use of separate 'Basic' and 'Controller' Effect *.Fx files (as described by Roby above), there may also be occasions where one may wish to utilize a 1-piece solution Effect *.Fx file (when there is no need for random parameters), by implementing a (modified) version of the (1-file) *.Fx code posted by Rhumbaflappy: :wizard:

http://www.fsdeveloper.com/forum/showpost.php?p=126024&postcount=12

[EDITED]

FYI: FS run time rendering may be susceptible to a performance hit from file I/O even more than it is from Draw Calls.

Thus, one might wonder whether implementing an adapted version of Rhumbaflappy's 1-file Effect *.Fx method cited above may be more efficient for run time rendering, especially when a Effect *.Fx is 'called' from an AttachPoint on a 3D model. :scratchch

[END_EDIT]

Hope this helps with further innovative use of Effect *.Fx files in FSX ...as well as in P3D. :)

GaryGB
 
Last edited:
Top