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

How to use Visibility controller and export it?

Messages
108
Country
france
Hi all,

I'm working on (an attempt to make) a rotating lightbeam for lighthouses.
I am facing the problem of visibility. Not distance visibility, but angular visibility.
Since the beam may be obstructed by the coastline and other obstacles, and also because a lot of lighthouses do have precise sectors to cover dangers, indicate channels etc.

I can't restraint the visibility of the beam in a successful way.

My first idea has been to "mask" the beam by making it abruptly disappear into the ground for a part of its rotation then emerge again, so that it mimics the effect of shades in the lantern. It works, but whatever I do there's always a small but noticeable bounce of the beam when displayed in the sim (FSX/P3F2). The "dive" and "surge" occur frankly in Gmax and MCX but are not perfectly rendered in the sims.

So my other idea was to use the visibility track. I thought I could make the beam visible/invisible/visible again by placing visibility keys in the track view mode. When I do that, I can see my beam rotating and be "turned" off and on again inside Gmax. But once exported into a MDL and seen in MCX, it rotates but stays always on. Same thing when further exported into the sim.

So...

1 - Is this "visibility" feature really useable and rendered by FSX/P3D2?
2 - And if yes, what do I do wrong, or don't do, that prevents my visibility effect to be exported the proper way in a correct FSX MDL?
 
Tom are you sure?
Really?

Boooooo, what a pita pity!
That would have been so handy and elegant...
So I imagine I'll have to live with my bouncy beam.
Well, if there's no other option...

Thanks for answering, even if I was secretely hoping better news. ;)
 
Hi Pierrot:

There is another possible method that might provide the appearance of a "rotating light beam as seen from above" by innovative use of a FS Effect file (which is rather obscure, as I've seen this nowhere else in FS scenery to date). :idea:


This was originally implemented in a FS9 add-on scenery package by Al Heline & Jim Bosworth: "Keweenaw Peninsula, Michigan":

http://simviation.com/1/search?submit=1&keywords=KewPen.zip&categoryId=&filename=Y


In the KewPen.zip "Effects" sub-folder are 2 files that provide the appearance of a "rotating light beam as seen from above":

* FR153Lightbeam.fx

...and:

* fx_ FR153Lightbeam.fx


The above 2 files might merit some experimentation in a live FSX flight session via the FSX Visual Effects Tool:

[FSX SDK install path]\Environment Kit\Special Effects SDK\visualfxtool.dll

NOTE: The above tool must be manually enabled via the "active" DLL.XML file.


FYI: One can more easily modify the "active" DLL.XML file via Alexander Brand's "ModuleToolX 0.4":

http://library.avsim.net/esearch.php?CatID=fsxutil&DLID=117187


BTW: The appearance of these Effects may be further modified via edits to a re-named copy of:

[FSX install path]\Effects\texture\fx_beam.bmp

...providing that new mapped texture name is also changed inside the code of the above Fx files. :pushpin:




I have not yet located my tests from a few years ago using code adapted from the above FX files, but IIRC, with some tinkering in the FSX Visual Effects Tool tabular dialog GUI, one can re-orient the rotating light beam on the flat plane so that it is aligned parallel to the ground within a live FS flight session to match that seen at run time via the scenery BGLs.


However, AFAIK, the Fx file as coded will still display aligned parallel to the ground from the point of origin at the lighthouse(s) within a live FS flight session via the scenery BGLs even when FSX Visual Effects Tool is not being run.

[EDITED]

IIRC, there may be a way to prevent the "light beam" on the flat plane from being 'visible' peripheral to the point of origin beyond where it passes through interposed "ground" / terrain / solid objects. :scratchch

For example, the BMP file format used with each Effect (Fx) file allows only (1) Alpha channel per image file.

TIFF normally allows 2 Alpha channels per image file, but AFAIK only BMP may be used with Fx files.

When one views the light beam Effect layer 'through' another superimposed 2D layer with a BMP containing no RGB image but having an Alpha channel, perhaps the interaction of the visible RGB image and Alpha channels from each textured Effect (Fx) layer ...might allow for control over display of the 'light beam' portion of the image in the areas beyond interposed "ground" / terrain / solid objects.


But it is possible that other more esoteric capabilities of Effect (Fx) files may allow additional means of control over visibility within a single file, due to the capacity for having more than 1 Emitter "layer".


The Special Effects SDK states:

"There is no limit to the number of emitters that can be added to an effect""

...and thus Emitters create Particles which have mapped textures:

https://msdn.microsoft.com/en-us/library/cc526969.aspx#Properties


This may allow such parameters as "Blend Mode=1/2/3" to be implemented:

"Blend mode specifies which blending mode is used to display the texture, which should be one of:

0: No Alpha
1: Alpha blending
2: Additive blending
3: Multiply blending

Alpha textures are full color and include a transparency mask (alpha channel).

Additive textures, on the other hand, have no alpha channel. The transparency of an additive texture is based off of color values within the texture. Color values in the texture are added to the background color. If an additive texture is triggered against pure white, nothing happens because the values are already maximized at 255, 255, 255, which represents the RGB value for white. Any part of the texture that you want to be invisible must be pure black (or else you’ll just get expanding squares). Additive textures are best used when the effect is simulating something bright—like fire or a light."


Effect (Fx) files also allow creation of "animations" with parameters such as:

"FPS=0.00

The frames per second at which the animation changes textures. For example, a value of 8 means that every eight of a second the animation will advance from one texture cell to the next."

...and related parameters, ex:

"TextureSize=256/512/1024

CellSize=64

CellStart=0

CellEnd=7"

[END_EDIT]


PS: I'm not certain whether Arno's "FXEditor" may also be able to manipulate all display parameters of these particular Effect (Fx) files.


Hope this info might prove to be of some use in developing an alternative or supplemental light beam display. :)

GaryGB
 
Last edited:
Thank you Gary for such a complete answer and your thinkings about a way to do it! Much appreciated.

But it is not the way I want to go. For a simple reason: Prepar3d v2xx DOES NOT handle effects like FSX or FS9 do. At all! (and even 'at all' is an understatement) ;)
For example, in P3D all the beam effects I've tested so far (the one coming with FSX and the one you mention, too) are not rendered the way they are in FSX. It's a major annoyance and many (all?) developers do complain for that on LM forums.

In fact the first reason I had to investigate this matter is because I had bought a nice package of the french coastal lighthouses for FSX, which doesn't work in P3D. Instead of having normal rotating beams, P3D displays them along erratic angles, they do not rotate or partially, and twist around their origin in a weird manner. A total mess. Same thing fot many other effects, wakes for instance.

It is so difficult to understand why (and how to correct) that even LM did nothing for that until now AFAIK.

Thus my choice of using "solid" objects I'm supposed to be more able to manage (and I do!).

It's a pity, btw. because many light beam effects (like the one you mention) look very fine... in FSX. :(
 
Back
Top