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

FSXA effectParams

GHD

Messages
12,244
Country
england
Can anyone please explain why, with the following effectParams, the effect doesn't display at any time during a 24 hour period?

Code:
      <Effect
         effectName="fx_Blueedge.fx"
         effectParams="DAWN=1,DAY=0,DUSK=1,NIGHT=1"/>

If I omit the effectParams it displays at all times of the day and night.
 
If I remember correctly you can't have day/night AND dawn/dusk parameters on the same effect. Why you ask? Because the engine if F'ing stupid.

You have to make two objects and assign day/night parameters to one, dawn/ dusk to another.

I generally make a small box, call it X, clone it, call the clone y, and then clone these two and place them wherever I need the light to be. Then run two multiple effects attach scripts, one for X: day night, one for Y: dawn/dusk.
 
Hi George:

As Shaun alludes to above, and AFAIK, a quirk of the FS Effects engine (since FS2000 or earlier ?) is that one cannot "place" an individual Effect with more than (1) pair of parameters at a time, from within a "Basic-type" *.FX file. ;)


XML Placing or Attaching to an 'AttachPoint', a FS Effect Controller *.FX file, or a *.FX file with integral "Controller-type" code which 'calls' other "Basic-type" *.FX files ...may allow more adaptability for FS Developers, and may also prove more efficient for run time performance.

IIUC, a FS Effect Controller *.FX file, or a *.FX file with integral "Controller-type" code which 'calls' other "Basic-type" *.FX files can ex: "call" another *.FX file more than once ...and pass unique parameters with each "call".


The FS default "Fireworks" *.FX files are an excellent example of how adaptable (and FPS efficient ?) the FS Effect engine can be when we use the proper syntax and file management protocol. :idea:




BTW: One also can't mix day and dawn Effect parameters; IIRC these "gotchas" are not clearly documented in SDK docs. :banghead:


Using syntax acceptable to the BGLComp.xsd criteria, "allowed" Effect parameter pairs are: :pushpin:

* Day/Night

...or:

* Dusk/dawn

http://www.fsdeveloper.com/forum/newreply.php?do=newreply&noquote=1&p=644206


PS: Another "gotcha" with Effects is that the *.FX files and any mapped files (ex: Textures, *.Wav files etc.) must be in their specified path locations when FS first starts (not just by re-indexing the Scenery Library during a flight) ...in order for Effects to be detected, registered, and executed at run time via any means other than that of the FSX SDK VisualFxTool.dll (aka Special Effects Tool)

Hope this helps ! :)

GaryGB
 
Last edited:
When you say xml placement is better for performance, do you mean instead of using the multiple attach scripts?
 
Hi Shaun:

Although I haven't personally used the "multiple attach script" referenced in this wiki:

http://www.fsdeveloper.com/wiki/ind...he_Effect_using_a_script_for_multiple_objects



...I suspect that 'multiple objects attach script' imputes a redundant function burden on the FS rendering engine for a FSX format *.MDL file resulting from that script being used in ex: GMAX /3DSMAX to generate the *.X file code prior to running XtoMDL and processing by BGLComp to place the MDL . :scratchch

So, my best 'guess' would be that the effective FS run time performance with "Placing the Effect using a script for multiple objects" ...'might' be lesser than with just (1) attached FS Effect Controller *.FX file, or a *.FX file with integral "Controller-type" code which 'calls' other "Basic-type" *.FX files externally to the execution of a MDL file instance. :twocents:


Perhaps Arno or others here may have experience with this option, and could offer a more authoritative opinion on performance with the "multiple attach script" for "Placing the Effect using a script for multiple objects via "effectboxwriter.ms" :confused:

[EDITED]

PS: Some additional info which may be of incidental interest to use of FS Effects for lights at airports:

http://blogs.technet.com/b/torgo3000/archive/2006/01/25/418037.aspx

http://www.fsdeveloper.com/forum/showthread.php?t=6674

http://msdn.microsoft.com/en-us/library/cc526978.aspx#AttachedObject

http://msdn.microsoft.com/en-us/library/cc526976.aspx#TheAttachTool

[END_EDIT]


Hope that offers some additional info worthy of consideration ! :)

GaryGB
 
Last edited:
Gary,

Can you explain why using a controller would be more efficient than having duplicate effects with different parameters?

By definition, a controller implies that FSX reads two files anyway.
 
Hi George:

Not being a programmer, I'd have to say that probably someone like Arno or Dick Ludowise might have more insight into the inner workings of the rendering engine when processing a MDL file versus Effect *.FX code to render "light" Effects which result from the code we configure inside FS Effects *.FX files. :teacher:


I suspect that "instancing" versus repeated file reads is used at run time in FSX for certain code from both MDLs and the Effect objects generated from processing of *.FX files.


[EDITED]

And there does seem to be file I/O taking place with execution of *.FX files, as I have seen in SysInternals' Process Monitor (aka "ProcMon") filtering for 'FSX.EXE' events, based on my observation that Effect driven playing of sounds in FSX results in mapped *.WAV files being loaded and unloaded repeatedly when flying circuits in an area with locally active Effect sound placment BGLs.

http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

[END_EDIT]


Thus, it certainly may be that each method has its Pros and Cons, with different Effects involving a commensurate measure of "efficiency" and "in-efficiency" ...depending on what the FSX rendering engine has to deal with at run time. :confused:


But certainly, IIUC, file I/O which reads / re-reads an entire file at run time (rather than specific sections of a file) imparts one of the biggest performance challenges to the FS rendering engine.

Again, as a non-programmer, I'm not sure that *.FX files themselves are read / re-read at run time by virtue of needing to be "all in their places with bright shining faces" ...when FS itself first initializes; to me, that suggests a virtual Effect object 'library' is being created somewhere from which 'instances' may be spawned after processing of the *.FX code instructions.



And from another standpoint of "efficiency", I personally find it convenient during the development process, to be able to tinker with Controller-type *.FX file(s) and any "called" Basic-type *.FX file(s) mapped by a actively working placement BGL, or attached to a MDL.

IMHO, it is easier to test different Effects loaded via different *.FX files "called" by a working Controller placed at a specific geographic location ...without having to instead create multiple MDLs mapped to different *.FX files.

PS:

By definition, a controller implies that FSX reads two files anyway.

I also thought I had a working 'definition' of there being 2 types of *.FX files: a "Controller-type", and a "Basic-type".

And thus I thought, by inference, use of a Controller would always require that (at least) 2 files must be read. :scratchch


Then.... Dick Ludowise (thankfully) showed me that a single *.FX file can contain both types of code ! :eek: :p

http://www.fsdeveloper.com/forum/showthread.php?t=19185&highlight=chicken

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


Hope these ideas might be of some help ! :)

GaryGB
 
Last edited:
Back
Top